Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add footer #17

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ anchors = "safe"
[extra]
locale = "en_US"
logo = "fireball.gif"
footer = true
toc = true
csp = true

Expand Down
10 changes: 10 additions & 0 deletions sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -346,3 +346,13 @@ kbd {
background-color: darken($white, 15%);
font-family: $base-font;
}

footer {
margin-bottom: 19px;
text-align: center;
font-size: 12px;
width: 100%;
> a {
color: $shamrock-green;
}
}
24 changes: 24 additions & 0 deletions sass/_site.scss
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,10 @@ a.zola-anchor {
#posts {
.block-right {
display: block;
height: 100%;
.content {
height: auto;
min-height: 95%;
display: block;
max-width: 800px;
}
Expand Down Expand Up @@ -803,6 +805,23 @@ a.zola-anchor {
}
}

.footer-content {
position: relative;
display: flex;
justify-content: center;
bottom: 0;
}

#footer-index {
width: 100%;
position: absolute;
bottom: 0;
display: flex;
justify-content: center;
left: 0;
margin: 0 auto;
}

@media (prefers-color-scheme: dark) {
.about-info {
h1,
Expand Down Expand Up @@ -850,6 +869,11 @@ a.zola-anchor {
background-color: lighten($black, 15%);
border-color: lighten($black, 42%);
}
#footer-block {
a {
color: $green;
}
}
.block-right {
a:not(.zola-anchor):not(.toc):not(.title-tag):not(.btn) {
color: $overlay-color-dark;
Expand Down
10 changes: 10 additions & 0 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ <h1 class="section-title">{%- block page_title %}{% if page.title %}{{ page.titl
{% block content %}{% endblock content %}
</div>
{% endblock right %}
{% block footer %}
{%- if config.extra.footer == true %}
<section class="footer-content"{% if current_path | default(value="none") == "/" %} id="footer-index"{% endif %}>
{%- set current_year = now() | date(format="%Y") %}
<footer id="footer-block">
© {{ current_year }} <b>{{ config.author }}</b><br>Powered by <a href="https://www.getzola.org">Zola</a> & <a href="https://halve-z.netlify.app">Halve-Z</a>
</footer>
</section>
{% endif %}
{% endblock footer %}
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ <h1 class="section-title">{{ page.title }}</h1>
<a href="#" class="pagination_pager disabled" >&gt;&gt;&gt;</a>
{% endif %}
</nav>
<br>
{% endif %}
<br>
{% block comments %}
{% if current_path is starting_with("/posts/") %}{% if config.extra.giscus.enabled == true %}
{%- include "partials/giscus.html" %}
Expand Down
1 change: 1 addition & 0 deletions theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ demo = "https://halve-z.netlify.app/"
[extra]
locale = "en_US"
logo = "fireball.gif"
footer = true
toc = true
csp = false

Expand Down
Loading