xdrm.io/src/App.vue

111 lines
1.9 KiB
Vue
Raw Normal View History

2019-05-07 17:10:48 +00:00
<template>
<div id="app">
<Home/>
<SkillPicker ref='picker' @pick='onPick($event)'/>
<Timeline ref='timeline' @pick='onPicked($event)'/>
2022-10-18 09:52:14 +00:00
<Footer/>
</div>
2019-05-07 17:10:48 +00:00
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import { tID } from '@/model/skills';
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';
2022-10-18 09:52:14 +00:00
import Footer from './components/Footer.vue';
2019-05-07 17:10:48 +00:00
2019-05-07 17:10:48 +00:00
@Component({
components: {
Home,
2022-10-04 11:06:09 +00:00
Timeline,
2022-10-04 16:29:27 +00:00
SkillPicker,
2022-10-18 09:52:14 +00:00
Footer,
2022-10-11 09:33:12 +00:00
},
2019-05-07 17:10:48 +00:00
})
export default class App extends Vue {
// skill picker selection -> filters the timeline
protected onPick(id: tID|null) {
const timeline = this.$refs.timeline as Timeline;
2022-10-11 09:33:12 +00:00
if ( timeline == null ) {
return;
}
timeline.filter(id);
}
// skill picked from the timeline -> select on the skill picker
protected onPicked(id: tID) {
const picker = this.$refs.picker as SkillPicker;
2022-10-11 09:33:12 +00:00
if ( picker == null ) {
return;
}
picker.select(id, false);
}
2022-10-11 09:33:12 +00:00
private mounted() {
const picker = this.$refs.picker as SkillPicker;
if ( picker == null ) {
return;
}
2022-10-19 16:00:13 +00:00
picker.select(0, true);
2022-10-11 09:33:12 +00:00
}
}
2019-05-07 17:10:48 +00:00
</script>
<style lang="scss">
#app {
display: flex;
position: absolute;
top: 0;
left: 0;
width: 100%;
2019-05-09 16:56:46 +00:00
min-height: 100%;
height: auto;
2022-10-04 11:06:09 +00:00
font-size: 1rem;
2024-09-24 21:48:02 +00:00
font-family: 'Source Sans Pro', sans-serif;
flex-flow: column nowrap;
overflow: hidden;
background: #fff;
}
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
2024-09-24 21:48:02 +00:00
&::after {
2022-10-05 09:25:22 +00:00
content: '';
display: block;
position: absolute;
2022-10-05 14:50:49 +00:00
margin-left: 0%;
width: 100%;
2022-11-22 12:32:39 +00:00
height: .1em;
2022-10-05 09:25:22 +00:00
2022-11-22 12:32:39 +00:00
background: #5f50bf;
2022-10-05 09:25:22 +00:00
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;
2024-09-24 21:48:02 +00:00
&::after {
width: 104%;
2022-10-05 14:50:49 +00:00
}
2022-10-05 09:25:22 +00:00
}
}
2019-05-07 17:10:48 +00:00
</style>