Skip to content

Commit

Permalink
Merge pull request #26 from per1234/footer
Browse files Browse the repository at this point in the history
Improve site footer
  • Loading branch information
per1234 committed Nov 12, 2023
2 parents c249b8a + 46b4c1d commit e32d2b6
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 13 deletions.
2 changes: 2 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,8 @@ tasks:
-type d -name '.licenses' -prune -o \
-type d -name '__pycache__' -prune -o \
-type d -name 'node_modules' -prune -o \
-type f -ipath './site/static/github-mark-white.svg' -prune -o \
-type f -ipath './site/static/github-mark.svg' -prune -o \
\( -type f -regex '.*[.]svg' \) \
-exec \
npx \
Expand Down
8 changes: 8 additions & 0 deletions site/assets/css/extended/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
This file contains the CSS code for modifications made to the default style provided by the hugo-PaperMod theme.
See: https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#bundling-custom-css-with-themes-assets
*/

:root {
--footer-height: 33px;
}
21 changes: 21 additions & 0 deletions site/layouts/partials/dark-light-img.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!--
Display either of two images depending on the visitor's browser theme.
Parameters:
- `dark-theme-image`: The path of the image to display with dark theme.
- `light-theme-image`: The path of the image to display with light theme.
- `style`: Style for the image.
-->

<picture>
<!-- See: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme -->
<source
media="(prefers-color-scheme: dark)"
srcset="{{ .Scratch.Get "dark-theme-image" }}"
/>
<img
alt=""
src="{{ .Scratch.Get "light-theme-image" }}"
style="{{ (.Scratch.Get "style") | safeCSS }}"
/>
</picture>
64 changes: 51 additions & 13 deletions site/layouts/partials/extend_footer.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,52 @@
<footer style="text-align: center">
<small>
<hr />
Site last updated:
{{ index .Site.Data "generator-data" "timestamp" }}
<b>|</b>
Content license:
<a
href="http://creativecommons.org/publicdomain/zero/1.0"
target="_blank"
>CC0 1.0</a
>
</small>
<footer
style="
margin: auto;
width: 95%
"
>
<div
style="
align-items: center;
border-width: thin;
border-top-style: solid;
display: inline-flex;
font-size: smaller;
justify-content: center;
padding-top: 3px;
width: 100%
"
>
<style>
span {
padding-inline: 5px;
}
/* Add separator between footer items. */
span:not(:last-of-type) {
border-right: solid;
border-width: thin;
}
</style>
<span>
Site last updated:
{{ index .Site.Data "generator-data" "timestamp" }}
</span>
<span>
Content license:
<a
href="http://creativecommons.org/publicdomain/zero/1.0"
style="
border-bottom-style: solid;
border-width: 1px
"
target="_blank"
>CC0 1.0</a
>
</span>
<span>
{{ .Scratch.Set "style" "box-sizing: content-box; height: 20px; width: 20px" }}
<a href="https://github.com/per1234/inoplatforms">
{{ partial "github-logo.html" . }}
</a>
</span>
</div>
</footer>
11 changes: 11 additions & 0 deletions site/layouts/partials/github-logo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Display the GitHub
Display the GitHub logo.
Parameters:
- `style`: Style for the image.
-->

{{ .Scratch.Set "dark-theme-image" "/github-mark-white.svg" }}
{{ .Scratch.Set "light-theme-image" "/github-mark.svg" }}

{{- partial "dark-light-img.html" . }}
11 changes: 11 additions & 0 deletions site/static/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# **inoplatforms** Site Static Assets

See: https://gohugo.io/content-management/static-files/

## `github-mark.svg`, `github-mark-white.svg`

Source: https://github.com/logos

## `logo.svg`

The file in this folder is the source.
1 change: 1 addition & 0 deletions site/static/github-mark-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/static/github-mark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e32d2b6

Please sign in to comment.