✨ Site > Add header
This commit is contained in:
@@ -47,6 +47,12 @@ export default
|
|||||||
|
|
||||||
// Delete the DIV
|
// Delete the DIV
|
||||||
this.$el.removeChild(dummy)
|
this.$el.removeChild(dummy)
|
||||||
|
},
|
||||||
|
|
||||||
|
onHeaderClick()
|
||||||
|
{
|
||||||
|
console.log('click')
|
||||||
|
this.$store.commit('setFile', null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -20,6 +20,54 @@ a
|
|||||||
left 0
|
left 0
|
||||||
overflow scroll
|
overflow scroll
|
||||||
|
|
||||||
|
// Header
|
||||||
|
.application-header
|
||||||
|
position absolute
|
||||||
|
top 0
|
||||||
|
left 0
|
||||||
|
width 290px
|
||||||
|
height 80px
|
||||||
|
background #393855
|
||||||
|
|
||||||
|
a
|
||||||
|
display block
|
||||||
|
position absolute
|
||||||
|
top 0
|
||||||
|
left 0
|
||||||
|
width 100%
|
||||||
|
height 100%
|
||||||
|
|
||||||
|
.element
|
||||||
|
position absolute
|
||||||
|
|
||||||
|
&.background
|
||||||
|
top 0
|
||||||
|
left 0
|
||||||
|
|
||||||
|
&.robot-container
|
||||||
|
top 17px
|
||||||
|
left 52px
|
||||||
|
animation header-robot-container 3s alternate infinite ease-in-out
|
||||||
|
|
||||||
|
@keyframes header-robot-container
|
||||||
|
0%
|
||||||
|
transform translateX(-5px)
|
||||||
|
100%
|
||||||
|
transform translateX(5px)
|
||||||
|
|
||||||
|
&.robot
|
||||||
|
animation header-robot 4.15s alternate infinite ease-in-out
|
||||||
|
|
||||||
|
@keyframes header-robot
|
||||||
|
0%
|
||||||
|
transform translateY(-3px)
|
||||||
|
100%
|
||||||
|
transform translateY(3px)
|
||||||
|
|
||||||
|
&.title
|
||||||
|
top 21px
|
||||||
|
left 112px
|
||||||
|
|
||||||
// Reset
|
// Reset
|
||||||
html, body, div, span, applet, object, iframe,
|
html, body, div, span, applet, object, iframe,
|
||||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
<div id="application">
|
<div id="application">
|
||||||
|
<!-- Connexion -->
|
||||||
<connexion></connexion>
|
<connexion></connexion>
|
||||||
|
|
||||||
|
<!-- Header -->
|
||||||
|
<a class="application-header" href="#" @click.prevent="onHeaderClick">
|
||||||
|
<img class="element background" src="../../../static/svg/header-background.svg" alt="">
|
||||||
|
<span class="element robot-container">
|
||||||
|
<img class="element robot" src="../../../static/svg/header-robot.svg" alt="">
|
||||||
|
</span>
|
||||||
|
<img class="element title" src="../../../static/svg/keppler-title.svg" alt="">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- Projects -->
|
||||||
<projects></projects>
|
<projects></projects>
|
||||||
|
|
||||||
|
<!-- Project -->
|
||||||
<project v-if="project"></project>
|
<project v-if="project"></project>
|
||||||
</div>
|
</div>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
position absolute
|
position absolute
|
||||||
top 0
|
top 0
|
||||||
right 0
|
right 0
|
||||||
left 315px
|
left 290px
|
||||||
right 0
|
right 0
|
||||||
height 100%
|
height 100%
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ header
|
|||||||
display block
|
display block
|
||||||
position absolute
|
position absolute
|
||||||
top 0
|
top 0
|
||||||
left 50px
|
left 51px
|
||||||
width 58px
|
width 58px
|
||||||
height 50px
|
height 50px
|
||||||
padding-top 13px
|
padding-top 13px
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
position absolute
|
position absolute
|
||||||
top 0
|
top 0
|
||||||
right 0
|
right 0
|
||||||
width 75%
|
left 290px
|
||||||
height 100%
|
height 100%
|
||||||
background #2D2D49
|
background #2D2D49
|
||||||
font-family 'DINNextRoundedLTPro'
|
font-family 'DINNextRoundedLTPro'
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
&.astronaut
|
&.astronaut
|
||||||
top 60px
|
top 60px
|
||||||
left 70px
|
left 70px
|
||||||
animation illustration-astronaut 6s infinite alternate
|
animation illustration-astronaut 6s ease-in-out infinite alternate
|
||||||
will-change transform
|
will-change transform
|
||||||
|
|
||||||
@keyframes illustration-astronaut
|
@keyframes illustration-astronaut
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
&.book
|
&.book
|
||||||
top 170px
|
top 170px
|
||||||
left 150px
|
left 150px
|
||||||
animation illustration-book 4.5s infinite alternate
|
animation illustration-book 4.5s ease-in-out infinite alternate
|
||||||
will-change transform
|
will-change transform
|
||||||
|
|
||||||
@keyframes illustration-book
|
@keyframes illustration-book
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
width 8px
|
width 8px
|
||||||
height 8px
|
height 8px
|
||||||
opacity 0
|
opacity 0
|
||||||
animation illustration-star 4.5s infinite alternate
|
animation illustration-star 4.5s ease-in-out infinite alternate
|
||||||
will-change opacity
|
will-change opacity
|
||||||
|
|
||||||
@keyframes illustration-star
|
@keyframes illustration-star
|
||||||
@@ -82,7 +82,6 @@
|
|||||||
100%
|
100%
|
||||||
opacity 1
|
opacity 1
|
||||||
|
|
||||||
|
|
||||||
.bar
|
.bar
|
||||||
position absolute
|
position absolute
|
||||||
background #fff
|
background #fff
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export default
|
|||||||
|
|
||||||
file()
|
file()
|
||||||
{
|
{
|
||||||
return this.$store.state.files.current
|
return this.$store.state.files.currentFile
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export default
|
|||||||
{
|
{
|
||||||
extension()
|
extension()
|
||||||
{
|
{
|
||||||
return this.$store.state.files.current.extension
|
return this.$store.state.files.currentFile.extension
|
||||||
},
|
},
|
||||||
|
|
||||||
version()
|
version()
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ export default {
|
|||||||
state:
|
state:
|
||||||
{
|
{
|
||||||
tree: new FileTree({ autoWash: true }),
|
tree: new FileTree({ autoWash: true }),
|
||||||
current: null,
|
currentFile: null,
|
||||||
currentVersion: null,
|
currentVersion: null,
|
||||||
currentLine: null,
|
currentLine: null,
|
||||||
search: ''
|
search: ''
|
||||||
@@ -37,16 +37,26 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
setFile(state, data)
|
setFile(state, data)
|
||||||
|
{
|
||||||
|
// Null file
|
||||||
|
if(!data)
|
||||||
|
{
|
||||||
|
state.currentFile = data
|
||||||
|
}
|
||||||
|
|
||||||
|
// File path
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// Retrieve file from path
|
// Retrieve file from path
|
||||||
const file = state.tree.getFile(data)
|
const file = state.tree.getFile(data)
|
||||||
|
|
||||||
// No current file or file different than current
|
// No current file or file different than current
|
||||||
if(!state.current || state.current.id !== file.id)
|
if(!state.currentFile || state.currentFile.id !== file.id)
|
||||||
{
|
{
|
||||||
state.current = file
|
state.currentFile = file
|
||||||
state.current.isNew = false
|
state.currentFile.isNew = false
|
||||||
state.current.isChanged = false
|
state.currentFile.isChanged = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -67,7 +77,7 @@ export default {
|
|||||||
if(typeof data === 'string')
|
if(typeof data === 'string')
|
||||||
{
|
{
|
||||||
// Find version by date
|
// Find version by date
|
||||||
const version = state.current.versions.find((version) => version.date === data)
|
const version = state.currentFile.versions.find((version) => version.date === data)
|
||||||
|
|
||||||
// Found
|
// Found
|
||||||
if(version)
|
if(version)
|
||||||
|
|||||||
Reference in New Issue
Block a user