Skip to content

Commit efe8c80

Browse files
authored
Merge pull request #616 from citation-file-format/611-responsive
2 parents 2634a38 + 6ea18a9 commit efe8c80

13 files changed

+63
-17
lines changed

src/components/Header.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,22 @@
2020
target="_blank"
2121
type="a"
2222
/>
23+
<q-btn
24+
class="lt-lg"
25+
icon="menu"
26+
v-on:click="$emit('togglePreview')"
27+
>
28+
Preview
29+
</q-btn>
2330
</q-btn-group>
2431
</template>
2532

2633
<script lang="ts">
2734
import { defineComponent } from 'vue'
2835
2936
export default defineComponent({
30-
name: 'Header'
37+
name: 'Header',
38+
emits: ['togglePreview']
3139
})
3240
</script>
3341

src/components/LayoutStepper.vue

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,44 @@
22
<q-layout view="hHh lpR fFf">
33
<div id="app">
44
<q-header id="header-inner">
5-
<Header />
5+
<Header v-on:togglePreview="onTogglePreview" />
66
</q-header>
7+
8+
<q-drawer
9+
id="preview-drawer"
10+
elevated
11+
overlay
12+
side="right"
13+
v-model="isPreviewDrawerEnabled"
14+
width="600"
15+
>
16+
<div id="preview-button-close">
17+
<q-btn
18+
icon="close"
19+
v-on:click="onTogglePreview"
20+
>
21+
Close preview
22+
</q-btn>
23+
</div>
24+
25+
<div id="preview-content">
26+
<Preview />
27+
</div>
28+
29+
<div id="preview-button-bar">
30+
<DownloadButton v-if="isNotFinish" />
31+
</div>
32+
</q-drawer>
33+
734
<q-page-container>
835
<q-page
936
id="middle"
1037
class="row"
1138
>
1239
<router-view />
1340
<div
14-
id="preview"
15-
class="col-12 col-md-4 col-sm-3"
41+
id="preview-static"
42+
class="col-12 col-lg-5 gt-md"
1643
>
1744
<div id="preview-content">
1845
<Preview />
@@ -32,7 +59,7 @@
3259
</template>
3360

3461
<script lang="ts">
35-
import { computed, defineComponent } from 'vue'
62+
import { computed, defineComponent, ref } from 'vue'
3663
import DownloadButton from 'components/DownloadButton.vue'
3764
import Footer from 'components/Footer.vue'
3865
import Header from 'components/Header.vue'
@@ -48,11 +75,14 @@ export default defineComponent({
4875
Footer
4976
},
5077
setup () {
78+
const isPreviewDrawerEnabled = ref(false)
5179
return {
5280
isNotFinish: computed(() => {
5381
const currentPath = useRoute().path
5482
return currentPath !== '/finish-minimum' && currentPath !== '/finish-advanced'
55-
})
83+
}),
84+
isPreviewDrawerEnabled,
85+
onTogglePreview: () => { isPreviewDrawerEnabled.value = !isPreviewDrawerEnabled.value }
5686
}
5787
}
5888
})

src/components/ScreenAbstract.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<div
55
id="form"
6-
class="col-12 col-lg-5 col-md-4 col-sm-3"
6+
class="col-12 col-lg-5 col-sm-10"
77
>
88
<div id="form-title">
99
<h1 class="page-title">

src/components/ScreenAuthors.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Stepper />
33
<div
44
id="form"
5-
class="col-12 col-lg-5 col-md-4 col-sm-3"
5+
class="col-12 col-lg-5 col-sm-10"
66
>
77
<div id="form-title">
88
<h1 class="page-title">

src/components/ScreenFinishAdvanced.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Stepper />
33
<div
44
id="form"
5-
class="col-12 col-md-6 col-sm-7"
5+
class="col-12 col-lg-5 col-sm-10"
66
>
77
<div id="form-title">
88
<h1

src/components/ScreenFinishMinimum.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Stepper />
33
<div
44
id="form"
5-
class="col-12 col-md-6 col-sm-7"
5+
class="col-12 col-lg-5 col-sm-10"
66
>
77
<div id="form-title">
88
<h1

src/components/ScreenIdentifiers.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Stepper />
33
<div
44
id="form"
5-
class="col-12 col-md-6 col-sm-7"
5+
class="col-12 col-lg-5 col-sm-10"
66
>
77
<div id="form-title">
88
<h1 class="page-title">

src/components/ScreenKeywords.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Stepper />
33
<div
44
id="form"
5-
class="col-12 col-md-6 col-sm-7"
5+
class="col-12 col-lg-5 col-sm-10"
66
>
77
<div id="form-title">
88
<h1 class="page-title">

src/components/ScreenLicense.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Stepper />
33
<div
44
id="form"
5-
class="col-12 col-md-6 col-sm-7"
5+
class="col-12 col-lg-5 col-sm-10"
66
>
77
<div id="form-title">
88
<h1 class="page-title">

src/components/ScreenRelatedResources.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Stepper />
33
<div
44
id="form"
5-
class="col-12 col-md-6 col-sm-7"
5+
class="col-12 col-lg-5 col-sm-10"
66
>
77
<div id="form-title">
88
<h1 class="page-title">

0 commit comments

Comments
 (0)