Skip to content

Commit 4524a3c

Browse files
committed
fix(footer,layout): moved footer to layout, and using sticky position for footer
1 parent a29b331 commit 4524a3c

File tree

6 files changed

+8
-13
lines changed

6 files changed

+8
-13
lines changed

components/footer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<footer
3-
class="py-4 mt-4 text-center text-gray-800 bg-inherit dark:text-gray-50 min-h-max"
3+
class="sticky py-4 mt-4 text-center text-gray-800 top-full bg-inherit dark:text-gray-50 min-h-max"
44
>
55
Made with &hearts; using
66
<a

layouts/main.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
<div class="page-root">
33
<Toast />
44
<Nuxt />
5+
<Footer />
56
</div>
67
</template>

pages/diff.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,13 @@
8282
</div>
8383
</div>
8484
</main>
85-
<Footer />
8685
</div>
8786
</template>
8887

8988
<script>
9089
import pako from 'pako'
9190
import { undoUrlSafeBase64, escapeHtml } from '../helpers/utils'
92-
import Footer from '~/components/footer.vue'
9391
export default {
94-
components: { Footer },
9592
layout: 'main',
9693
data() {
9794
return {

pages/index.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
</section>
1515
<form class="flex flex-col w-full gap-4" @submit="checkForm">
1616
<section class="flex w-full gap-4">
17-
<div class="flex flex-col flex-wrap w-1/2 gap-4">
17+
<div class="flex flex-col w-1/2 gap-4">
1818
<label for="lhsLabel" class="relative">
1919
<input
2020
id="lhsLabel"
2121
name="lhsLabel"
2222
type="text"
23-
class="flex-1 flex-grow-0 w-full bg-transparent rounded-md material-input"
23+
class="flex-1 flex-grow-0 w-full bg-transparent rounded-md"
2424
placeholder="Add label to this text block"
2525
/>
2626
</label>
@@ -31,12 +31,12 @@
3131
class="flex-1 w-full bg-transparent rounded-md resize-none form-textarea"
3232
></textarea>
3333
</div>
34-
<div class="flex flex-col flex-wrap w-1/2 gap-4">
34+
<div class="flex flex-col w-1/2 gap-4">
3535
<input
3636
id="rhsLabel"
3737
name="rhsLabel"
3838
type="text"
39-
class="flex-1 flex-grow-0 w-full bg-transparent rounded-md material-input"
39+
class="flex-1 flex-grow-0 w-full bg-transparent rounded-md"
4040
placeholder="Add label to this text block"
4141
/>
4242
<textarea
@@ -56,7 +56,6 @@
5656
</div>
5757
</form>
5858
</main>
59-
<Footer />
6059
</div>
6160
</template>
6261

pages/v1/diff.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,13 @@
9494
</div>
9595
</section>
9696
</main>
97-
<Footer />
9897
</div>
9998
</template>
10099

101100
<script>
102101
import pako from 'pako'
103102
import { undoUrlSafeBase64, escapeHtml } from '../../helpers/utils'
104-
import Footer from '~/components/footer.vue'
105103
export default {
106-
components: { Footer },
107104
layout: 'main',
108105
data() {
109106
return {

styles/global.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ body {
2626

2727
.page-root {
2828
@apply flow-root w-full;
29+
min-height: 100vh;
2930
}
3031

3132
.page-contents {
3233
@apply grid;
33-
grid-template-rows: 70px 1fr 70px;
34+
grid-template-rows: 70px 1fr;
3435
}
3536

3637
main {

0 commit comments

Comments
 (0)