diff options
author | Jordi Bares <jordibares@hotmail.com> | 2019-03-31 22:48:17 +0100 |
---|---|---|
committer | Alex Shpak <alex-shpak@users.noreply.github.com> | 2019-04-09 22:31:24 +0200 |
commit | 45271b5298d4a5dd91df97a1d3f3c726bd9398bc (patch) | |
tree | c703c7c5567fa4343e203a2bebf2ba60e87f5ea9 | |
parent | 941ca77a327f595e50e0cd22d35e984afb29530d (diff) |
Add footer functionality
-rw-r--r-- | .DS_Store | bin | 0 -> 8196 bytes | |||
-rw-r--r-- | assets/book.scss | 14 | ||||
-rw-r--r-- | exampleSite/config.yml | 8 | ||||
-rw-r--r-- | layouts/.DS_Store | bin | 0 -> 6148 bytes | |||
-rw-r--r-- | layouts/docs/baseof.html | 1 | ||||
-rw-r--r-- | layouts/partials/.DS_Store | bin | 0 -> 6148 bytes | |||
-rw-r--r-- | layouts/partials/docs/footer.html | 15 | ||||
-rw-r--r-- | layouts/partials/docs/html-head.html | 19 | ||||
-rw-r--r-- | static/custom.css | 5 |
9 files changed, 60 insertions, 2 deletions
diff --git a/.DS_Store b/.DS_Store Binary files differnew file mode 100644 index 0000000..0a66c9f --- /dev/null +++ b/.DS_Store diff --git a/assets/book.scss b/assets/book.scss index 13cdbd8..c2689b9 100644 --- a/assets/book.scss +++ b/assets/book.scss @@ -145,6 +145,18 @@ ul.pagination { } } +.book-footer { + display: flex; + margin-top: $padding-16; + font-size: $font-size-14; + align-items: baseline; + + img { + width: $font-size-14; + vertical-align: bottom; + } +} + .book-posts { min-width: $body-min-width; max-width: $sm-breakpoint; @@ -205,4 +217,4 @@ aside nav, .book-toc nav { padding: $padding-16 * 2 $padding-16; } -} +}
\ No newline at end of file diff --git a/exampleSite/config.yml b/exampleSite/config.yml index d450485..3e36c8c 100644 --- a/exampleSite/config.yml +++ b/exampleSite/config.yml @@ -46,4 +46,10 @@ params: # Configure the date format used on the pages # - In git information # - In blog posts - BookDateFormat: "Jan 2, 2006"
\ No newline at end of file + BookDateFormat: "Jan 2, 2006" + + # (Optional, default false) Show or hide site footer + BookShowFooter: false + + # Copyright notice for footer + Copyright: ["© 2019 Alex Shpak"] diff --git a/layouts/.DS_Store b/layouts/.DS_Store Binary files differnew file mode 100644 index 0000000..c1f243e --- /dev/null +++ b/layouts/.DS_Store diff --git a/layouts/docs/baseof.html b/layouts/docs/baseof.html index 9ea09fa..57c4bec 100644 --- a/layouts/docs/baseof.html +++ b/layouts/docs/baseof.html @@ -19,6 +19,7 @@ {{ partial "docs/mobile-header" . }} {{ template "main" . }} {{ partial "docs/git-footer" . }} + {{ partial "docs/footer" . }} </div> {{ template "toc" . }} diff --git a/layouts/partials/.DS_Store b/layouts/partials/.DS_Store Binary files differnew file mode 100644 index 0000000..b1bc858 --- /dev/null +++ b/layouts/partials/.DS_Store diff --git a/layouts/partials/docs/footer.html b/layouts/partials/docs/footer.html new file mode 100644 index 0000000..bc4a406 --- /dev/null +++ b/layouts/partials/docs/footer.html @@ -0,0 +1,15 @@ +<!-- Copyright notice --> +{{ if .Site.Params.BookShowFooter }} +<div class="align-center book-git-footer justify-center"> + {{ range .Site.Params.Copyright }} + <p> + {{ . | markdownify }} + </p> + + {{ else }} + <p> + Made with Book Theme by <a target="_blank" href="https://github.com/alex-shpak/hugo-book">Alex Shpak</a>. + </p> + {{ end }} +</div> +{{ end }}
\ No newline at end of file diff --git a/layouts/partials/docs/html-head.html b/layouts/partials/docs/html-head.html index 5d6f1c1..7b412f7 100644 --- a/layouts/partials/docs/html-head.html +++ b/layouts/partials/docs/html-head.html @@ -2,11 +2,30 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>{{- template "title" . }} | {{ .Site.Title -}}</title> +<!-- Font Awesome 5.8/1 no need for local files using all.css so all icons are available --> +<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous"> + +<!-- Fonts for the theme --> <link href="https://fonts.googleapis.com/css?family=Oxygen|Oxygen+Mono:300,400,700" rel="stylesheet"> + +<!-- Theme stylesheet, if possible do not edit this stylesheet --> <link rel="stylesheet" href="{{ "normalize.min.css" | relURL }}"> {{ $styles := resources.Get "book.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }} <link rel="stylesheet" href="{{ $styles.RelPermalink }}"> +<!-- Custom stylesheet - for your changes --> +<link rel="stylesheet" href="{{ "custom.css" | relURL }}?v={{ now.Unix }}" type='text/css' media='all'> + +<!-- Favicon --> +<link rel="shortcut icon" href="{{ "img/favicon.ico" | absURL }}" type="image/x-icon"> +<link rel="icon" href="{{ "img/favicon.ico" | absURL }}" type="image/x-icon"> + +<!-- RSS --> +{{ if .RSSLink }} +<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title | default "" }}" /> +<link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title | default "" }}" /> +{{ end }} + {{ "<!--" | safeHTML }} Made with Book Theme https://github.com/alex-shpak/hugo-book diff --git a/static/custom.css b/static/custom.css new file mode 100644 index 0000000..1ada68e --- /dev/null +++ b/static/custom.css @@ -0,0 +1,5 @@ +@charset "UTF-8"; + +p { + margin: 0.67em 0; +} |