breadcrumbs

pull/144/head
Henrique Dias 2017-07-10 14:02:21 +01:00
parent 1645a8830e
commit 0f4f172a1b
No known key found for this signature in database
GPG Key ID: 936F5EB68D786730
3 changed files with 25 additions and 6 deletions

View File

@ -88,6 +88,15 @@ export default {
} }
breadcrumbs.shift() breadcrumbs.shift()
if (breadcrumbs.length > 3) {
while (breadcrumbs.length !== 4) {
breadcrumbs.shift()
}
breadcrumbs[0].name = '...'
}
return breadcrumbs return breadcrumbs
} }
}, },
@ -107,6 +116,15 @@ export default {
}, },
mounted () { mounted () {
window.addEventListener('keydown', this.keyEvent) window.addEventListener('keydown', this.keyEvent)
window.addEventListener('scroll', event => {
let top = 112 - window.scrollY
if (top < 64) {
top = 64
}
document.querySelector('#listing.list .item.header').style.top = top + 'px'
})
}, },
beforeDestroy () { beforeDestroy () {
window.removeEventListener('keydown', this.keyEvent) window.removeEventListener('keydown', this.keyEvent)

View File

@ -117,6 +117,11 @@ main {
width: calc(100% - 19em); width: calc(100% - 19em);
} }
#breadcrumbs {
height: 3em;
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
#breadcrumbs span, #breadcrumbs span,
#breadcrumbs { #breadcrumbs {
display: flex; display: flex;
@ -124,10 +129,6 @@ main {
color: #6f6f6f; color: #6f6f6f;
} }
#breadcrumbs .chevron {
}
#breadcrumbs a { #breadcrumbs a {
color: inherit color: inherit
} }

View File

@ -24,7 +24,7 @@
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
color: #6f6f6f; color: #6f6f6f;
transition: .1s ease all; transition: .1s ease background, .1s ease opacity;
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;
} }
@ -161,7 +161,7 @@
background: #f8f8f8; background: #f8f8f8;
position: fixed; position: fixed;
width: calc(100% - 19em); width: calc(100% - 19em);
top: 4em; top: 7em;
right: 1em; right: 1em;
z-index: 999; z-index: 999;
padding: .85em; padding: .85em;