mirror of
https://github.com/GuerillaStudio/souvenir.git
synced 2025-01-20 22:10:20 +00:00
refactor(layout): Allow different layout
This commit is contained in:
parent
313da56d92
commit
777f66380b
9 changed files with 74 additions and 51 deletions
|
@ -1,5 +1,5 @@
|
||||||
<template lang="html">
|
<template lang="html">
|
||||||
<div class="layout">
|
<div class="souvenir">
|
||||||
<router-view></router-view>
|
<router-view></router-view>
|
||||||
<refresh-banner></refresh-banner>
|
<refresh-banner></refresh-banner>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,6 +2,14 @@
|
||||||
/* == layout */
|
/* == layout */
|
||||||
/* ----------------------------------------------------------- */
|
/* ----------------------------------------------------------- */
|
||||||
|
|
||||||
|
.souvenir {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
flex-grow: 1;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.layout {
|
.layout {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
/* ----------------------------------------------------------- */
|
/* ----------------------------------------------------------- */
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
.layout {
|
.souvenir {
|
||||||
flex-grow: inherit;
|
flex-grow: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,9 @@ import store from '/store'
|
||||||
|
|
||||||
import registerServiceWorker from '/register-service-worker.js'
|
import registerServiceWorker from '/register-service-worker.js'
|
||||||
|
|
||||||
|
import LayoutDefault from '/views/layout/default'
|
||||||
|
Vue.component('layout-default', LayoutDefault)
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
|
|
5
src/views/layout/default.vue
Normal file
5
src/views/layout/default.vue
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<template>
|
||||||
|
<div class="layout">
|
||||||
|
<slot></slot>
|
||||||
|
</div>
|
||||||
|
</template>
|
|
@ -1,4 +1,5 @@
|
||||||
<template lang="html">
|
<template lang="html">
|
||||||
|
<layout-default>
|
||||||
<div class="capture">
|
<div class="capture">
|
||||||
<div v-if="capturing" class="capture-progress">
|
<div v-if="capturing" class="capture-progress">
|
||||||
<capture-progress :value="capturingProgress"></capture-progress>
|
<capture-progress :value="capturingProgress"></capture-progress>
|
||||||
|
@ -19,8 +20,8 @@
|
||||||
<button class="btn btn--danger w100" @click="cancelCountdown">Cancel countdown</button>
|
<button class="btn btn--danger w100" @click="cancelCountdown">Cancel countdown</button>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</layout-default>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<template lang="html">
|
<template lang="html">
|
||||||
|
<layout-default>
|
||||||
<div class="download">
|
<div class="download">
|
||||||
<div class="options">
|
<div class="options">
|
||||||
<span></span>
|
<span></span>
|
||||||
|
@ -11,6 +12,7 @@
|
||||||
|
|
||||||
<a class="download-btn btn btn--primary w100" :href="objectUrl" :download="`souvenir${timestamp}.gif`">Download GIF</a>
|
<a class="download-btn btn btn--primary w100" :href="objectUrl" :download="`souvenir${timestamp}.gif`">Download GIF</a>
|
||||||
</div>
|
</div>
|
||||||
|
</layout-default>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<template lang="html">
|
<template lang="html">
|
||||||
|
<layout-default>
|
||||||
<div class="download">
|
<div class="download">
|
||||||
<capture-options :disabled-time="true" :disabled-timer="true" :back-btn="back"></capture-options>
|
<capture-options :disabled-time="true" :disabled-timer="true" :back-btn="back"></capture-options>
|
||||||
|
|
||||||
|
@ -10,6 +11,7 @@
|
||||||
|
|
||||||
<encoding-overlay v-if="encoding" :value="encodingProgress"></encoding-overlay>
|
<encoding-overlay v-if="encoding" :value="encodingProgress"></encoding-overlay>
|
||||||
</div>
|
</div>
|
||||||
|
</layout-default>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<template lang="html">
|
<template lang="html">
|
||||||
|
<layout-default>
|
||||||
<div class="welcome">
|
<div class="welcome">
|
||||||
<div class="welcome-about">
|
<div class="welcome-about">
|
||||||
<h1 class="welcome-title">Capture few seconds as a gif for souvenir</h1>
|
<h1 class="welcome-title">Capture few seconds as a gif for souvenir</h1>
|
||||||
|
@ -11,6 +12,7 @@
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn--primary" @click="startCapture">Let's make a souvenir!</button>
|
<button class="btn btn--primary" @click="startCapture">Let's make a souvenir!</button>
|
||||||
</div>
|
</div>
|
||||||
|
</layout-default>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
Loading…
Reference in a new issue