Skip to content

Commit a0a4d50

Browse files
committed
Fixed footer
Footer will now stick to the bottom of the page if the content doesn't fill the view height.
1 parent 20ba64d commit a0a4d50

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

_data/colors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
fails: "#ffcccc"
44
works: "#ccffcc"
55
hint-background-color: "#ffffcc"
6-
default-background-color: white"
6+
default-background-color: "white"
77
regular-expression-text-backgound-color: "#eeeeee"
88
regular-expression-text-border-color: "#bbbbbb"
99
progress-color: "#bbbbbb"

_layouts/step.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ <h2>{{ page.title | escape }}</h2>
9595
{% elsif language == "en" %}
9696
<span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">Regex Tutorial</span> by <span xmlns:cc="http://creativecommons.org/ns#" property="cc:attributionName">Nicco Kunzmann</span> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
9797
{% elsif language == "sv" %}
98-
<span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">Regex Tutorial</span> av <span xmlns:cc="http://creativecommons.org/ns#" property="cc:attributionName">Nicco Kunzmann</span> är licensed under en <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Erkännande 4.0 Internationell Licens</a>.
98+
<span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">Regex Tutorial</span> av <span xmlns:cc="http://creativecommons.org/ns#" property="cc:attributionName">Nicco Kunzmann</span> är licenserad under en <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Erkännande 4.0 Internationell Licens</a>.
9999
{% endif %}
100100
{% assign lowercase_content = content | downcase %}
101101
{% if lowercase_content contains "<img" %}

css/tutorial.css

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
border-style: solid;
2222
}
2323

24-
.key {
24+
.key {
2525
background-color: {{ site.data.colors.regular-expression-text-backgound-color }};
2626
display: inline-block;
2727
padding: 3px 5px;
@@ -58,13 +58,17 @@ header h2 {
5858
}
5959

6060
body {
61+
display: flex;
62+
min-height: 100vh;
63+
flex-direction: column;
6164
margin: 0px;
6265
background-color: {{ site.data.colors.default-background-color }};
6366
}
6467

6568
.main {
6669
padding-right: 1em;
6770
padding-left: 1em;
71+
flex: 1;
6872
}
6973
@media (min-width: 40em) {
7074
.main {
@@ -83,10 +87,10 @@ footer img {
8387
vertical-align: middle;
8488
}
8589

86-
footer .links {
90+
footer .links {
8791
padding-bottom: 0.5em;
8892
}
89-
footer .links a {
93+
footer .links a {
9094
margin-left: 1em;
9195
margin-right: 1em;
9296
white-space: nowrap;
@@ -113,4 +117,4 @@ footer a {
113117

114118
img {
115119
max-width: 100%;
116-
}
120+
}

0 commit comments

Comments
 (0)