88 lines
1.4 KiB
Vue
88 lines
1.4 KiB
Vue
<template>
|
|
<div id="app">
|
|
<Home/>
|
|
<SkillPicker @pick='onPick($event)'/>
|
|
<Timeline ref='timeline'/>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { Component, Vue } from 'vue-property-decorator';
|
|
import { tID } from '@/model/skills';
|
|
import Home from './components/Home.vue';
|
|
import Timeline from './components/Timeline.vue';
|
|
import SkillPicker from './components/SkillPicker.vue';
|
|
|
|
|
|
@Component({
|
|
components: {
|
|
Home,
|
|
Timeline,
|
|
SkillPicker,
|
|
},
|
|
})
|
|
export default class App extends Vue {
|
|
private selected: tID|null = null;
|
|
|
|
protected onPick(id: tID|null) {
|
|
const timeline = this.$refs.timeline as Timeline;
|
|
if( timeline == null ){
|
|
return;
|
|
}
|
|
timeline.filter(id);
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
#app {
|
|
display: flex;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
min-height: 100%;
|
|
height: auto;
|
|
|
|
|
|
font-size: 1rem;
|
|
font-family: 'Source Sans Pro';
|
|
flex-flow: column nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
background: #fff;
|
|
}
|
|
|
|
a {
|
|
display: inline-block;
|
|
position: relative;
|
|
color: #fff;
|
|
|
|
cursor: pointer;
|
|
|
|
&:visited {
|
|
color: #fefefa;
|
|
}
|
|
|
|
&:after {
|
|
content: '';
|
|
|
|
display: block;
|
|
position: absolute;
|
|
margin-left: 5%;
|
|
width: 90%;
|
|
height: .15rem;
|
|
|
|
background: #3333be;
|
|
|
|
transition: width .2s ease-in-out, margin-left .2s ease-in-out;
|
|
}
|
|
|
|
&:hover:after {
|
|
margin-left: 0;
|
|
width: 100%;
|
|
}
|
|
}
|
|
</style>
|