diff options
author | Chen Zhe <chenzhesg@gmail.com> | 2022-01-04 18:06:57 +0300 |
---|---|---|
committer | Chen Zhe <chenzhesg@gmail.com> | 2022-01-04 18:06:57 +0300 |
commit | 511f696ff290b7d1db450f8d48b9ca55a518f5f0 (patch) | |
tree | 35cadb46a5c1aea24e042d716900363aafe3cd47 | |
parent | 4c918f6c553da44bdb959f54d3c66b7348cd686d (diff) |
Shrink margin for bigger photos and add optional parent link
-rw-r--r-- | exampleSite/config.toml | 3 | ||||
-rw-r--r-- | layouts/partials/footer.html | 4 | ||||
-rw-r--r-- | layouts/partials/header.html | 5 | ||||
-rw-r--r-- | static/css/component.css | 3 | ||||
-rw-r--r-- | static/css/default.css | 5 |
5 files changed, 14 insertions, 6 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 5eab175..c65c81d 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -20,6 +20,9 @@ theme = "photo-grid" bodybgcolor = "#3d3d3d" bodytextcolor = "#f2f2f2" + parent_link = "/home" + parent_link_text = "↩️ Home" + # Footer text copyright_since_year = 2012 copyright_text = "All images" diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index c5750f1..1875cb3 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,7 +1,7 @@ <footer> <p>{{ .Site.Params.copyright_text }} © {{ .Site.Params.copyright_since_year }} - {{ now.Format "2006" }} {{ .Site.Params.author }}</p> - <p>{{ with .Site.Params.footertext }}{{ . | markdownify }}{{ end }}</p> + {{ with .Site.Params.footertext }}<p>{{ . | markdownify }}</p>{{ end }} <p class="credits">Built with <a href="https://gohugo.io/" target="_blank">Hugo</a> - | Theme <a href="https://themes.gohugo.io/photo-grid/" target="_blank">Photo-Grid</a> by Chen Zhe + | Theme: <a href="https://themes.gohugo.io/photo-grid/" target="_blank">Photo-Grid</a> by Chen Zhe </p> </footer>
\ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 227d9da..ac6930e 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,4 +1,5 @@ <header class="clearfix"> - <h1>{{ with .Site.Params.title }}{{ . | markdownify }}{{ end }}</h1> - <span>{{ with .Site.Params.subtitle }}{{ . | markdownify }}{{ end }}</span> + {{ with .Site.Params.title }}<h1>{{ . | markdownify }}</h1>{{ end }} + {{ if isset .Site.Params "parent_link" }}<h5><a href="{{.Site.Params.parent_link}}">{{ .Site.Params.parent_link_text | markdownify }}</a></h5>{{ end }} + {{ with .Site.Params.subtitle }}<span>{{ . | markdownify }}</span>{{ end }} </header>
\ No newline at end of file diff --git a/static/css/component.css b/static/css/component.css index 093ec9d..493188a 100644 --- a/static/css/component.css +++ b/static/css/component.css @@ -49,7 +49,7 @@ } .og-expander-inner { - padding: 50px 30px; + padding: 30px; height: 100%; } @@ -235,7 +235,6 @@ ul.exif > li { @media screen and (max-width: 830px) { .stamp { font-size: 0.8em; border: 0.3rem double #555; } - .og-expander-inner { padding: 30px; } .og-expander h3 { font-size: 28px; padding: 10px 0px; } .og-expander p, ul.exif { font-size: 13px; } .og-expander a { font-size: 12px; } diff --git a/static/css/default.css b/static/css/default.css index 8e732c4..ea88574 100644 --- a/static/css/default.css +++ b/static/css/default.css @@ -58,6 +58,11 @@ a { font-weight: 700; } +.container > header h5 { + padding-bottom: 0.3em; + text-align: right; +} + .container > header span { display: block; font-weight: 300; |