Skip to content

Commit 5bd2857

Browse files
author
JoelCDL
committed
Make footer sticky to viewport bottom in templates
Make footer component stay at bottom of viewport in templates if there is not enough content to push the footer down the page.
1 parent 63287e6 commit 5bd2857

6 files changed

Lines changed: 34 additions & 0 deletions

File tree

src/css/templates/bios.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
/* Bios Template */
22

3+
.t-bios {
4+
display: grid;
5+
grid-template-rows: auto 1fr auto;
6+
min-height: 100vh;
7+
}
8+
39
.t-bios__content {
410
display: grid;
11+
align-content: start;
512
gap: var(--uc3-space-lg);
613
padding-block: var(--uc3-space-base) var(--uc3-space-lg);
714
padding-inline: var(--template-inline-content-padding);

src/css/templates/blog-index.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
/* Blog Index Template */
22

3+
.t-blog-index {
4+
display: grid;
5+
grid-template-rows: auto 1fr auto;
6+
min-height: 100vh;
7+
}
8+
39
.t-blog-index__image-1 {
410
min-height: 30rem;
511
}
@@ -17,6 +23,7 @@
1723

1824
.t-blog-index__content-1 {
1925
display: grid;
26+
align-content: start;
2027
gap: var(--uc3-space-lg);
2128
padding-block: var(--uc3-space-base) var(--uc3-space-lg);
2229
padding-inline: var(--uc3-space-lg);

src/css/templates/blog-post.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
/* Blog Post Template */
22

3+
.t-blog-post {
4+
display: grid;
5+
grid-template-rows: auto 1fr auto;
6+
min-height: 100vh;
7+
}
8+
39
.t-blog-post__content {
410
padding-block: var(--uc3-space-base) var(--uc3-space-lg);
511
padding-inline: var(--template-inline-content-padding);

src/css/templates/plain.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
/* Plain Template */
22

33
.t-plain {
4+
display: grid;
5+
grid-template-rows: auto 1fr auto;
6+
min-height: 100vh;
7+
48
header {
59
margin-block-end: var(--uc3-space-lg);
610
}

src/css/templates/search-results.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
/* Search Results Template */
22

33
.t-search-results {
4+
display: grid;
5+
grid-template-rows: auto 1fr auto;
6+
min-height: 100vh;
7+
48
.c-breadcrumb {
59
margin-inline: var(--uc3-space-lg);
610
}

src/css/templates/secondary.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
/* Secondary Template */
22

3+
.t-secondary {
4+
display: grid;
5+
grid-template-rows: auto 1fr auto;
6+
min-height: 100vh;
7+
}
8+
39
.t-secondary__image-1 {
410
min-height: 30rem;
511
}

0 commit comments

Comments
 (0)