2019-05-07 17:10:48 +00:00
|
|
|
<template>
|
2019-05-08 11:01:20 +00:00
|
|
|
<div id="app">
|
2022-08-31 13:19:07 +00:00
|
|
|
<Home/>
|
2022-10-05 13:16:06 +00:00
|
|
|
<SkillPicker ref='picker' @pick='onPick($event)'/>
|
|
|
|
<Timeline ref='timeline' @pick='onPicked($event)'/>
|
2019-05-08 11:01:20 +00:00
|
|
|
</div>
|
2019-05-07 17:10:48 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { Component, Vue } from 'vue-property-decorator';
|
2022-10-05 12:26:50 +00:00
|
|
|
import { tID } from '@/model/skills';
|
2022-08-31 13:19:07 +00:00
|
|
|
import Home from './components/Home.vue';
|
2022-10-04 11:06:09 +00:00
|
|
|
import Timeline from './components/Timeline.vue';
|
2022-10-04 16:29:27 +00:00
|
|
|
import SkillPicker from './components/SkillPicker.vue';
|
2019-05-07 17:10:48 +00:00
|
|
|
|
2022-10-05 12:26:50 +00:00
|
|
|
|
2019-05-07 17:10:48 +00:00
|
|
|
@Component({
|
2019-05-08 11:01:20 +00:00
|
|
|
components: {
|
2022-08-31 13:19:07 +00:00
|
|
|
Home,
|
2022-10-04 11:06:09 +00:00
|
|
|
Timeline,
|
2022-10-04 16:29:27 +00:00
|
|
|
SkillPicker,
|
2022-10-05 14:07:36 +00:00
|
|
|
}
|
2019-05-07 17:10:48 +00:00
|
|
|
})
|
2019-05-09 16:53:22 +00:00
|
|
|
export default class App extends Vue {
|
2022-10-05 12:26:50 +00:00
|
|
|
private selected: tID|null = null;
|
|
|
|
|
2022-10-05 13:16:06 +00:00
|
|
|
private mounted() {
|
|
|
|
const picker = this.$refs.picker as SkillPicker;
|
|
|
|
if( picker == null ){
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
picker.select(tID.Vue, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
// skill picker selection -> filters the timeline
|
2022-10-05 12:26:50 +00:00
|
|
|
protected onPick(id: tID|null) {
|
|
|
|
const timeline = this.$refs.timeline as Timeline;
|
|
|
|
if( timeline == null ){
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
timeline.filter(id);
|
|
|
|
}
|
2022-10-05 13:16:06 +00:00
|
|
|
|
|
|
|
// skill picked from the timeline -> select on the skill picker
|
|
|
|
protected onPicked(id: tID) {
|
|
|
|
const picker = this.$refs.picker as SkillPicker;
|
|
|
|
if( picker == null ){
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
picker.select(id, false);
|
|
|
|
}
|
|
|
|
|
2019-05-09 16:53:22 +00:00
|
|
|
}
|
2019-05-07 17:10:48 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2019-05-08 11:01:20 +00:00
|
|
|
#app {
|
2019-05-09 16:53:22 +00:00
|
|
|
display: flex;
|
2019-05-08 11:01:20 +00:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
2019-05-09 16:56:46 +00:00
|
|
|
min-height: 100%;
|
|
|
|
height: auto;
|
2019-05-08 11:01:20 +00:00
|
|
|
|
2019-05-09 16:53:22 +00:00
|
|
|
|
2022-10-04 11:06:09 +00:00
|
|
|
font-size: 1rem;
|
|
|
|
font-family: 'Source Sans Pro';
|
2019-05-09 16:53:22 +00:00
|
|
|
flex-flow: column nowrap;
|
2019-05-09 17:18:58 +00:00
|
|
|
|
|
|
|
overflow: hidden;
|
2022-08-22 20:16:39 +00:00
|
|
|
|
2022-08-31 13:19:07 +00:00
|
|
|
background: #fff;
|
2019-05-08 11:01:20 +00:00
|
|
|
}
|
2022-10-05 09:25:22 +00:00
|
|
|
|
2022-10-05 14:50:49 +00:00
|
|
|
a, a:visited {
|
2022-10-05 09:25:22 +00:00
|
|
|
display: inline-block;
|
|
|
|
position: relative;
|
2022-10-05 14:50:49 +00:00
|
|
|
color: #cbcbcb;
|
2022-10-05 09:25:22 +00:00
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
2022-10-05 14:50:49 +00:00
|
|
|
transition: color .2s ease-in-out;
|
2022-10-05 09:25:22 +00:00
|
|
|
|
|
|
|
&:after {
|
|
|
|
content: '';
|
|
|
|
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
2022-10-05 14:50:49 +00:00
|
|
|
margin-left: 0%;
|
|
|
|
width: 100%;
|
2022-10-05 09:25:22 +00:00
|
|
|
height: .15rem;
|
|
|
|
|
|
|
|
background: #3333be;
|
|
|
|
|
|
|
|
transition: width .2s ease-in-out, margin-left .2s ease-in-out;
|
2022-10-05 14:06:52 +00:00
|
|
|
|
|
|
|
transform-style: preserve-3d;
|
2022-10-05 09:25:22 +00:00
|
|
|
}
|
|
|
|
|
2022-10-05 14:50:49 +00:00
|
|
|
&:hover{
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
&:after {
|
|
|
|
margin-left: 5%;
|
|
|
|
width: 90%;
|
|
|
|
}
|
2022-10-05 09:25:22 +00:00
|
|
|
}
|
|
|
|
}
|
2019-05-07 17:10:48 +00:00
|
|
|
</style>
|