diff --git a/frontend/public/themes/dark.css b/frontend/public/themes/dark.css index cba3e740..4e3c6f5f 100644 --- a/frontend/public/themes/dark.css +++ b/frontend/public/themes/dark.css @@ -69,13 +69,16 @@ nav > div { border-color: var(--divider); } -#breadcrumbs { +.breadcrumbs { border-color: var(--divider); color: var(--textPrimary) !important; } -#breadcrumbs span { +.breadcrumbs span { color: var(--textPrimary) !important; } +.breadcrumbs a:hover { + background-color: rgba(255, 255, 255, .1); +} #listing .item { background: var(--surfacePrimary); diff --git a/frontend/src/components/Breadcrumbs.vue b/frontend/src/components/Breadcrumbs.vue new file mode 100644 index 00000000..43ade6a3 --- /dev/null +++ b/frontend/src/components/Breadcrumbs.vue @@ -0,0 +1,67 @@ + + + + + \ No newline at end of file diff --git a/frontend/src/css/base.css b/frontend/src/css/base.css index 552fa691..bf34798b 100644 --- a/frontend/src/css/base.css +++ b/frontend/src/css/base.css @@ -83,29 +83,29 @@ main { width: calc(100% - 19em); } -#breadcrumbs { +.breadcrumbs { height: 3em; border-bottom: 1px solid rgba(0, 0, 0, 0.05); } -#breadcrumbs span, -#breadcrumbs { +.breadcrumbs span, +.breadcrumbs { display: flex; align-items: center; color: #6f6f6f; } -#breadcrumbs a { +.breadcrumbs a { color: inherit; transition: .1s ease-in; border-radius: .125em; } -#breadcrumbs a:hover { +.breadcrumbs a:hover { background-color: rgba(0,0,0, 0.05); } -#breadcrumbs span a { +.breadcrumbs span a { padding: .2em; } diff --git a/frontend/src/css/styles.css b/frontend/src/css/styles.css index c265c483..3b2df8d7 100644 --- a/frontend/src/css/styles.css +++ b/frontend/src/css/styles.css @@ -220,15 +220,19 @@ height: calc(100vh - 8.4em); } -#editor-container #breadcrumbs { +#editor-container .breadcrumbs { height: 2.3em; padding: 0 1em; } -#editor-container #breadcrumbs span { +#editor-container .breadcrumbs span { font-size: 12px; } +#editor-container .breadcrumbs i { + font-size: 16px; +} + /* * * * * * * * * * * * * * * * * PROMPT * * * * * * * * * * * * * * * * */ diff --git a/frontend/src/views/Files.vue b/frontend/src/views/Files.vue index 934d9cc7..5b247cbb 100644 --- a/frontend/src/views/Files.vue +++ b/frontend/src/views/Files.vue @@ -2,16 +2,7 @@
- + @@ -28,6 +19,7 @@ import { files as api } from '@/api' import { mapState, mapMutations } from 'vuex' import HeaderBar from '@/components/header/HeaderBar' +import Breadcrumbs from '@/components/Breadcrumbs' import Errors from '@/views/Errors' import Preview from '@/views/files/Preview' import Listing from '@/views/files/Listing' @@ -40,6 +32,7 @@ export default { name: 'files', components: { HeaderBar, + Breadcrumbs, Errors, Preview, Listing, @@ -71,39 +64,6 @@ export default { return 'preview' } }, - breadcrumbs () { - let parts = this.$route.path.split('/') - - if (parts[0] === '') { - parts.shift() - } - - if (parts[parts.length - 1] === '') { - parts.pop() - } - - let breadcrumbs = [] - - for (let i = 0; i < parts.length; i++) { - if (i === 0) { - breadcrumbs.push({ name: decodeURIComponent(parts[i]), url: '/' + parts[i] + '/' }) - } else { - breadcrumbs.push({ name: decodeURIComponent(parts[i]), url: breadcrumbs[i - 1].url + parts[i] + '/' }) - } - } - - breadcrumbs.shift() - - if (breadcrumbs.length > 3) { - while (breadcrumbs.length !== 4) { - breadcrumbs.shift() - } - - breadcrumbs[0].name = '...' - } - - return breadcrumbs - }, errorCode() { return (this.error.message === '404' || this.error.message === '403') ? parseInt(this.error.message) : 500 } diff --git a/frontend/src/views/Share.vue b/frontend/src/views/Share.vue index 43f7de22..3de84b0d 100644 --- a/frontend/src/views/Share.vue +++ b/frontend/src/views/Share.vue @@ -7,17 +7,9 @@ -
- +