parameterise copyright and license

This commit is contained in:
Huy Tran 2018-11-30 08:15:40 +11:00
parent f4aca1f9f5
commit 1ea35f4430
4 changed files with 35 additions and 9 deletions

View file

@ -72,9 +72,17 @@
font-style: italic; font-style: italic;
} }
%small-center-text {
font-size: $font-scale-dot7;
line-height: 1.1rem;
text-align: center;
}
.copyright { .copyright {
padding-top: 1rem; padding-top: 1rem;
text-align: center; @extend %small-center-text;
font-size: $copyright-font-size; }
line-height: 1.1rem; .builtwith {
padding-top: .2rem;
@extend %small-center-text;
} }

View file

@ -35,6 +35,8 @@ $border-color: #e5e5e5;
$large-breakpoint: 38em; $large-breakpoint: 38em;
$large-font-size: 20px; $large-font-size: 20px;
$font-scale-dot7: .7rem;
$font-scale-dot8: .8rem;
// //
// hyde-hyde // hyde-hyde
@ -44,7 +46,7 @@ $large-device-font-size: $large-font-size;
// https://www.client9.com/css-system-font-stack-monospace-v2 // https://www.client9.com/css-system-font-stack-monospace-v2
$code-font-family: "SF-Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Roboto Mono", "Ubuntu Mono", "Courier New", Courier, monospace; $code-font-family: "SF-Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Roboto Mono", "Ubuntu Mono", "Courier New", Courier, monospace;
$code-font-size: .9rem; $code-font-size: .9rem;
$code-fence-font-size: .9rem; $code-fence-font-size: .8rem;
$code-color: #bf616a; $code-color: #bf616a;
$code-background-color: #f9f2f4; $code-background-color: #f9f2f4;
$code-line-height: 1.4; $code-line-height: 1.4;
@ -62,7 +64,7 @@ $gradient-color-1: #ff2c2c;
$gradient-color-2: #7a5e91; $gradient-color-2: #7a5e91;
// post meta // post meta
$meta-font-size: .8rem; $meta-font-size: $font-scale-dot8;
$meta-font-weight: 300; $meta-font-weight: 300;
$meta-color: $gray-6; $meta-color: $gray-6;
@ -90,7 +92,7 @@ $h5-font-size:1rem;
$sidebar-color: #300030; $sidebar-color: #300030;
$sidebar-width: 16rem; $sidebar-width: 16rem;
$site__title-font-size: 2.5rem; $site__title-font-size: 2.5rem;
$copyright-font-size: 0.7rem; $copyright-font-size: $font-scale-dot7;
// content // content
$content-max-width: 38rem; // @ ~70 CPL $content-max-width: 38rem; // @ ~70 CPL

View file

@ -21,8 +21,17 @@ theme = "hyde-hyde"
# description = "..." # description = "..."
authorimage = "/img/hugo.png" authorimage = "/img/hugo.png"
dateformat = "Jan 2, 2006" dateformat = "Jan 2, 2006"
# sidebar, copyright & license
copyright = "htr3n"
license = "CC BY-SA 4.0"
licenseURL = "https://creativecommons.org/licenses/by-sa/4.0"
showBuiltWith = true
# https://highlightjs.org
highlightjs = true highlightjs = true
highlightjsstyle = "github" highlightjsstyle = "github"
# please choose either GraphComment or Disqus or Utterances # please choose either GraphComment or Disqus or Utterances
#GraphCommentId = "..." #GraphCommentId = "..."
#UtterancesRepo = "..." # https://utteranc.es/ #UtterancesRepo = "..." # https://utteranc.es/

View file

@ -1,6 +1,13 @@
{{ with .Site.Params.copyright }}
<div class="copyright"> <div class="copyright">
{{ with .Site.Params.copyright }}{{.|safeHTML}}{{ else }}&copy; {{ now.Format "2006"}} {{.Site.Params.author}}. &copy; {{ now.Format "2006"}} {{ . | safeHTML }}
<a href="https://creativecommons.org/licenses/by-sa/4.0">Some Rights Reserved</a>. {{ with $.Site.Params.license }}
Built with <a href="https://gohugo.io">Hugo</a> ❤️ <a href="https://github.com/htr3n/hyde-hyde">hyde-hyde</a>. <a href="{{$.Site.Params.licenseURL | safeHTML}}">{{ . | safeHTML }}</a>
{{end}} {{end}}
</div> </div>
{{ end }}
{{ with .Site.Params.showBuiltWith }}
<div class="builtwith">
Built with <a href="https://gohugo.io">Hugo</a> ❤️ <a href="https://github.com/htr3n/hyde-hyde">hyde-hyde</a>.
</div>
{{ end }}