Skip to content

Commit

Permalink
Add repository link to footer
Browse files Browse the repository at this point in the history
This will make it easier for visitors who are interested in the source code of the project to find the GitHub
repository.
  • Loading branch information
per1234 committed Nov 12, 2023
1 parent d043151 commit e973044
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 28 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
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>
62 changes: 34 additions & 28 deletions site/layouts/partials/extend_footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,47 @@
>
<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%
"
>
<small>
<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>
</small>
<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 e973044

Please sign in to comment.