💄 Site > File tree > Add style
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
<template src="./template.html"></template>
|
||||
<script src="./script.js"></script>
|
||||
<style src="./style.styl" lang="stylus"></style>
|
||||
<style src="./style.styl" lang="stylus" scoped></style>
|
||||
@@ -1,3 +1,3 @@
|
||||
<template src="./template.html"></template>
|
||||
<script src="./script.js"></script>
|
||||
<style src="./style.styl" lang="stylus"></style>
|
||||
<style src="./style.styl" lang="stylus" scoped></style>
|
||||
@@ -0,0 +1,9 @@
|
||||
.icon
|
||||
display inline-block
|
||||
width 12px
|
||||
height 12px
|
||||
|
||||
img
|
||||
display inline-block
|
||||
width 100%
|
||||
height 100%
|
||||
@@ -1,9 +1,3 @@
|
||||
.icon
|
||||
display inline-block
|
||||
width 12px
|
||||
height 12px
|
||||
|
||||
img
|
||||
display inline-block
|
||||
width 100%
|
||||
height 100%
|
||||
.text
|
||||
padding-left 12px
|
||||
opacity 0.6
|
||||
@@ -1,12 +1,3 @@
|
||||
.name
|
||||
cursor pointer
|
||||
|
||||
.icon
|
||||
display inline-block
|
||||
width 12px
|
||||
height 12px
|
||||
|
||||
img
|
||||
display inline-block
|
||||
width 100%
|
||||
height 100%
|
||||
.text
|
||||
padding-left 12px
|
||||
opacity 0.6
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div v-show="visible">
|
||||
<a href="#" class="name" :style="{ paddingLeft:depth * 20 + 'px' }" @click.prevent="onNameClick">
|
||||
<a href="#" class="name" :style="{ paddingLeft:(depth + 1) * 20 + 'px' }" @click.prevent="onNameClick">
|
||||
<file-icon class="icon" extension="folder-active" v-show="open"></file-icon>
|
||||
<file-icon class="icon" extension="folder" v-show="!open"></file-icon>
|
||||
<span class="text">
|
||||
@@ -10,6 +10,6 @@
|
||||
</a>
|
||||
<div v-show="open">
|
||||
<files-tree-folder class="js-child" v-for="folder of content.folders" :key="folder.name" :content="folder" :depth="depth + 1" :directory="fullPath + '/'"></files-tree-folder>
|
||||
<files-tree-file class="js-child" v-for="file of files" :key="file.path.full" :content="file" :depth="depth + 1"></files-tree-file>
|
||||
<files-tree-file class="js-child" v-for="file of files" :key="file.path.full" :content="file" :depth="depth + 2"></files-tree-file>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,3 +1,3 @@
|
||||
<template src="./template.html"></template>
|
||||
<script src="./script.js"></script>
|
||||
<style src="./style.styl" lang="stylus"></style>
|
||||
<style src="./style.styl" lang="stylus" scoped></style>
|
||||
@@ -23,6 +23,11 @@ export default
|
||||
files()
|
||||
{
|
||||
return this.$store.state.files.tree
|
||||
},
|
||||
|
||||
scrollbarWidth()
|
||||
{
|
||||
return this.$store.state.scrollbarWidth
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
top 120px
|
||||
bottom 0px
|
||||
left 0
|
||||
width 290px
|
||||
overflow-y scroll
|
||||
background #26283B
|
||||
color #ffffff
|
||||
|
||||
.content
|
||||
line-height 28px
|
||||
font-size 14px
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="file-tree">
|
||||
<div class="file-tree" :style="`right: calc(100vw - 290px - ${scrollbarWidth}px);`">
|
||||
<input type="text" v-model="searchValue">
|
||||
<files-tree-folder v-for="folder of files.folders" :key="+ new Date()" :content="folder" :depth="0"></files-tree-folder>
|
||||
<files-tree-folder class="content" v-for="folder of files.folders" :key="+ new Date()" :content="folder" :depth="0"></files-tree-folder>
|
||||
<div>
|
||||
<a href="#" class="all-read" @click.prevent="onAllReadClick">Mark all as read</a>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<template src="./template.html"></template>
|
||||
<script src="./script.js"></script>
|
||||
<style src="./style.styl" lang="stylus"></style>
|
||||
<style src="./style.styl" lang="stylus" scoped></style>
|
||||
@@ -1,3 +1,3 @@
|
||||
<template src="./template.html"></template>
|
||||
<script src="./script.js"></script>
|
||||
<style src="./style.styl" lang="stylus"></style>
|
||||
<style src="./style.styl" lang="stylus" scoped></style>
|
||||
@@ -22,6 +22,11 @@ export default
|
||||
|
||||
downloadUrl()
|
||||
{
|
||||
if(!this.currentProject)
|
||||
{
|
||||
return ''
|
||||
}
|
||||
|
||||
return `${this.$store.state.url}/${this.currentProject.slug}/download`
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<template src="./template.html"></template>
|
||||
<script src="./script.js"></script>
|
||||
<style src="./style.styl" lang="stylus"></style>
|
||||
<style src="./style.styl" lang="stylus" scoped></style>
|
||||
Reference in New Issue
Block a user