restructure presentation layer

- Move most GUI related code to /presentation
- Move components to /components (separate from bootstrap and style)
- Move shared components helpers to /components/shared
- Rename Bootstrapping to bootstrapping to enforce same naming
  convention in /presentation
This commit is contained in:
undergroundwires
2021-03-07 19:33:05 +01:00
parent 646db90585
commit f3c7413f52
67 changed files with 100 additions and 71 deletions

View File

@@ -0,0 +1,53 @@
<template>
<div class="slider">
<div class="left" ref="leftElement">
<slot name="left"></slot>
</div>
<Handle class="handle" @resized="onResize($event)" />
<div class="right">
<slot name="right"></slot>
</div>
</div>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import Handle from './Handle.vue';
@Component({
components: {
Handle,
},
})
export default class HorizontalResizeSlider extends Vue {
private get left(): HTMLElement { return this.$refs.leftElement as HTMLElement; }
public onResize(displacementX: number): void {
const leftWidth = this.left.offsetWidth + displacementX;
this.left.style.width = `${leftWidth}px`;
}
}
</script>
<style lang="scss" scoped>
@import "@/presentation/styles/media.scss";
.slider {
display: flex;
flex-direction: row;
.right {
flex: 1;
}
}
@media screen and (max-width: $vertical-view-breakpoint) {
.slider {
flex-direction: column;
.left {
width: auto !important;
}
.handle {
display: none;
}
}
}
</style>