Merge pull request #10 from tun/master

Improvements for layoutReverse and sidebarSticky
This commit is contained in:
Huy Tran 2018-06-06 11:24:24 +10:00 committed by GitHub
commit ea1fcd379a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 23 deletions

View file

@ -20,6 +20,8 @@ theme = "hyde-hyde"
# highlightjsstyle = "github"
# please choose either GraphComment or Disqus
# GraphCommentId = "your-graph-comment-id"
# layoutReverse = true
# sidebarSticky = true
## Social Accounts
[params.social]

View file

@ -3,7 +3,7 @@
<head>
{{ block "header" . -}}{{- end }}
</head>
<body {{- if .Site.Params.themeColor }} class="{{ .Site.Params.themeColor }} {{if .Site.Params.layoutReverse}}layout-reverse{{end}}" {{ end }}>
<body class="{{- if .Site.Params.themeColor }}{{ .Site.Params.themeColor }}{{ end }} {{if .Site.Params.layoutReverse}}layout-reverse{{end}}">
{{ partial "sidebar.html" . }}
<div class="content container">
{{ block "content" . }}{{ end }}

View file

@ -1,5 +1,5 @@
<div class="sidebar">
<div class="container text-center sidebar-sticky">
<div class="container text-center {{ if .Site.Params.sidebarSticky }}sidebar-sticky{{ end }}">
<div class="sidebar-about text-center">
<a href="{{ .Site.BaseURL }}"><h1 class="brand">{{ .Site.Title }}</h1></a>
{{ with .Site.Params.authorimage }} <img src="{{.}}" alt="Author Image" class="img-circle headshot center"> {{ end }}
@ -11,7 +11,7 @@
<p>
{{ partial "sidebar_social.html" . }}
</p>
<p class="copyright">{{ with .Site.Params.copyright }}{{.}}{{ else }}&copy; {{ now.Format "2006"}} {{.Site.Params.author}}.
<p class="copyright">{{ with .Site.Params.copyright }}{{.|safeHTML}}{{ else }}&copy; {{ now.Format "2006"}} {{.Site.Params.author}}.
<a href="https://creativecommons.org/licenses/by/4.0">Some Rights Reserved</a>.<br/>Built with <a href="https://gohugo.io/">Hugo</a> &amp; <a href="https://github.com/htr3n/hyde-hyde">hyde-hyde</a>.{{end}}
</p>
</div>

View file

@ -121,7 +121,7 @@ a.sidebar-nav-item:focus {
.sidebar-sticky {
position: absolute;
right: 1rem;
top: 1rem;
bottom: 1rem;
left: 1rem;
}
}