Skip to content

Commit 7b00907

Browse files
committed
Make footer always appear at bottom even if main content is not large enough
1 parent 90cc8a3 commit 7b00907

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

assets/styles/frontend.css

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,6 @@ legend {
4646
white-space: normal;
4747
}
4848

49-
.footer {
50-
width: 100%;
51-
height: 60px;
52-
line-height: 60px;
53-
background-color: #f5f5f5;
54-
}
55-
5649
form .col-form-label.required:after, form label.required:after {
5750
bottom: 4px;
5851
color: var(--bs-secondary-color);
@@ -66,4 +59,22 @@ form .col-form-label.required:after, form label.required:after {
6659
/*** Make form-control placeholders italic ***/
6760
.form-control::placeholder {
6861
font-style: italic;
62+
}
63+
64+
/** Layout to make footer stick to bottom */
65+
body {
66+
display: flex;
67+
min-height: 100vh;
68+
flex-direction: column;
69+
}
70+
71+
main {
72+
flex: 1 0 auto;
73+
}
74+
75+
.footer {
76+
width: 100%;
77+
height: 60px;
78+
line-height: 60px;
79+
background-color: #f5f5f5;
6980
}

templates/_footer.html.twig

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
<a href="https://www.stura.uni-jena.de/impressum.php">{% trans %}footer.impress{% endtrans %}</a>
66
<a href="https://www.stura.uni-jena.de/datenschutz.php" class="ms-1">{% trans %}footer.privacy{% endtrans %}</a>
77
<br>
8-
<small class="text-muted">
9-
<small>
10-
<a href="https://github.com/jbtronics/StuRa-Finanzsoftware" class="text-muted" target="_blank">This software is open source and licensed under AGPL3 (developed by Jan Böhmer).</a>
11-
</small>
8+
<small class="text-muted" style="font-size: x-small">
9+
<a href="https://github.com/jbtronics/StuRa-Finanzsoftware" class="text-muted" target="_blank">This software is open source and licensed under AGPL3 (developed by Jan Böhmer).</a>
1210
</small>
1311
</div>
1412
</footer>

0 commit comments

Comments
 (0)