refactoring page layouts
This commit is contained in:
parent
cf95cacd15
commit
88d2987fc2
20 changed files with 346 additions and 235 deletions
|
@ -2,4 +2,7 @@
|
||||||
|
|
||||||
## Version 1.0
|
## Version 1.0
|
||||||
|
|
||||||
- Fork from [Hyde](https://github.com/spf13/hyde) and adapt to [Nate Finch's blog](https://npf.io)'s colors and fonts.
|
- Fork from [Hyde](https://github.com/spf13/hyde)
|
||||||
|
- Adapt to [Nate Finch's blog](https://npf.io)'s colors and fonts.
|
||||||
|
- Refactor `basedof.html` and corresponding pages `index.html`, `single.html`, `list.html`
|
||||||
|
- define blocks `content` and `footer` that will be fulfilled by each different type of layout.
|
|
@ -1,4 +1,11 @@
|
||||||
{{ define "main" -}}
|
{{ define "header" -}}
|
||||||
|
{{ partial "header.html" . }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{ define "content" -}}
|
||||||
<h1>404: Page not found</h1>
|
<h1>404: Page not found</h1>
|
||||||
<p class="lead">Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. <a href="{{ .Site.BaseURL }}">Head back home</a> to try finding it again.</p>
|
<p class="lead">Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. <a href="{{ .Site.BaseURL }}">Head back home</a> to try finding it again.</p>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{ define "footer" -}}
|
||||||
|
{{- end }}
|
|
@ -1,11 +1,19 @@
|
||||||
{{ partial "head.html" . }}
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ .Site.LanguageCode }}" class="wf-firasans-n4-active wf-active">
|
||||||
|
<head>
|
||||||
|
{{ block "header" . }}{{ end }}
|
||||||
|
</head>
|
||||||
<body class="{{ .Site.Params.themeColor }} {{if .Site.Params.layoutReverse}}layout-reverse{{end}}">
|
<body class="{{ .Site.Params.themeColor }} {{if .Site.Params.layoutReverse}}layout-reverse{{end}}">
|
||||||
{{ partial "sidebar.html" . }}
|
{{ partial "sidebar.html" . }}
|
||||||
<div class="content container">
|
<div class="content container">
|
||||||
{{ block "main" . }}{{ end }}
|
{{ block "content" . }}{{ end }}
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
{{ block "footer" . }}{{ end }}
|
{{ block "footer" . }}{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
<!-- Google Analytics -->
|
||||||
|
{{ if .Site.GoogleAnalytics -}}
|
||||||
|
{{ template "_internal/google_analytics_async.html" . }}
|
||||||
|
{{- end }}
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -1,18 +1,10 @@
|
||||||
{{ define "main" }}
|
{{ define "header" -}}
|
||||||
<h1 class="title">{{ .Title }}</h1>
|
{{ partial "header.html" . }}
|
||||||
<ul class="posts">
|
{{- end -}}
|
||||||
{{ range .Data.Pages -}}
|
|
||||||
<li>
|
|
||||||
<span><a href="{{ .Permalink }}">{{ .Title }}</a> <time class="pull-right post-list">{{ .Date.Format "Jan 2, 2006" }}</time></span>
|
|
||||||
</li>
|
|
||||||
{{- end }}
|
|
||||||
</ul>
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{ define "footer" }}
|
{{ define "content" -}}
|
||||||
<!-- Footer -->
|
{{ partial "list_content.html" . }}
|
||||||
{{ if .Site.GoogleAnalytics -}}
|
{{- end -}}
|
||||||
{{ template "_internal/google_analytics_async.html" . }}
|
|
||||||
{{- end}}
|
{{ define "footer" -}}
|
||||||
<script src="{{ .Site.BaseURL }}js/main.js"></script>
|
|
||||||
{{- end }}
|
{{- end }}
|
|
@ -1,63 +1,11 @@
|
||||||
{{ define "main" -}}
|
{{ define "header" -}}
|
||||||
<div class="post">
|
{{ partial "header.html" . }}
|
||||||
<h1>{{ .Title }}</h1>
|
{{- end -}}
|
||||||
{{ if ne .Params.showpagemeta false }}
|
|
||||||
<div class="col-sm-12 col-md-12">
|
{{ define "content" -}}
|
||||||
<span class="text-left post-date meta">
|
{{ partial "post_content.html" . }}
|
||||||
{{ if ne .Params.showpdate false }}
|
{{- end -}}
|
||||||
<!-- published date -->
|
|
||||||
{{ if not .Date.IsZero }} {{ .Date.Format .Site.Params.dateformat }} {{end}}
|
|
||||||
{{ end }}
|
|
||||||
<!-- categories -->
|
|
||||||
{{ if isset .Params "categories" }}
|
|
||||||
{{ $total := len .Params.categories }}
|
|
||||||
{{ if gt $total 0 }}
|
|
||||||
in
|
|
||||||
{{ $total := sub $total 1 }}
|
|
||||||
{{ range $i, $cat := sort $.Params.categories }}
|
|
||||||
<a class="meta" href="{{ "/categories/" | relURL }}{{ $cat | urlize }}">{{ $cat | upper }}</a>{{ if lt $i $total }}, {{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
<!-- tags -->
|
|
||||||
{{ if isset .Params "tags" }}
|
|
||||||
{{ $total := len .Params.tags }}
|
|
||||||
{{ if gt $total 0 }}
|
|
||||||
●
|
|
||||||
{{ $subtotal := sub $total 1 }}
|
|
||||||
{{ range $i, $tag := sort $.Params.tags }}
|
|
||||||
<a class="meta" href="{{ "/tags/" | relURL }}{{ $tag | urlize }}">#{{ $tag | upper }}</a>{{ if lt $i $subtotal }} {{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
{{ .Content }}
|
|
||||||
</div>
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{ define "footer" -}}
|
{{ define "footer" -}}
|
||||||
{{ if .Site.Params.highlightjs }}
|
{{ partial "post_footer.html" . }}
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
{{- end -}}
|
||||||
{{ range .Site.Params.highlightjslanguages }}
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/{{.}}.min.js"></script>
|
|
||||||
{{ end }}
|
|
||||||
<script type="text/javascript">
|
|
||||||
hljs.initHighlightingOnLoad();
|
|
||||||
</script>
|
|
||||||
{{ end }}
|
|
||||||
<!-- Google Analytics -->
|
|
||||||
{{ if .Site.GoogleAnalytics }}
|
|
||||||
{{ template "_internal/google_analytics_async.html" . }}
|
|
||||||
{{ end }}
|
|
||||||
<!-- Disqus-->
|
|
||||||
{{ if .Site.DisqusShortname }}
|
|
||||||
{{ if ne .Params.showcomments false }}
|
|
||||||
<h2>Comments</h2>
|
|
||||||
{{ partial "disqus.html" . }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
<!-- Other Scripts -->
|
|
||||||
<script src="{{ .Site.BaseURL }}js/main.js"></script>
|
|
||||||
{{- end }}
|
|
||||||
|
|
|
@ -1,18 +1,23 @@
|
||||||
{{ define "main" -}}
|
{{ define "header" -}}
|
||||||
<div class="posts">
|
{{ partial "header.html" . }}
|
||||||
{{ range .Data.Pages -}}
|
{{- end }}
|
||||||
<div class="post">
|
|
||||||
<h1 class="post-title">
|
{{ define "content" -}}
|
||||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
<div class="posts">
|
||||||
</h1>
|
{{ range .Data.Pages -}}
|
||||||
|
<div class="post">
|
||||||
|
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
|
||||||
<span class="post-date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span>
|
<span class="post-date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span>
|
||||||
{{ .Content }}
|
{{ .Summary }}
|
||||||
{{ if .Truncated }}
|
{{ if .Truncated }}
|
||||||
<div class="read-more-link">
|
<div class="read-more-link">
|
||||||
<a href="{{ .RelPermalink }}">Read More…</a>
|
<a href="{{ .RelPermalink }}">Read More…</a>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
{{- end }}
|
||||||
|
</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
|
||||||
|
{{ define "footer" -}}
|
||||||
{{- end }}
|
{{- end }}
|
36
layouts/partials/code_header.html
Normal file
36
layouts/partials/code_header.html
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
<link href="http://gmpg.org/xfn/11" rel="profile">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
{{ with .Site.Params.meta.description }}<meta name="description" content="{{ . }}">{{ end }}
|
||||||
|
{{ with .Site.Params.meta.keywords }}<meta name="keywords" content="{{.}}">{{ end }}
|
||||||
|
{{ .Hugo.Generator }}
|
||||||
|
<!-- Enable responsiveness on mobile devices-->
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
||||||
|
{{ if .IsHome -}}
|
||||||
|
<title>{{ .Site.Title }}</title>
|
||||||
|
{{- else -}}
|
||||||
|
<title>{{ .Title }} · {{ .Site.Title }}</title>
|
||||||
|
{{- end }}
|
||||||
|
<!-- CSS -->
|
||||||
|
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/print.css" media="print">
|
||||||
|
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/poole.css">
|
||||||
|
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/hyde.css">
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Fira+Sans:300,300i,400,400i,500">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<!-- Grid Syntax -->
|
||||||
|
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/grid.css">
|
||||||
|
|
||||||
|
<!-- Customised CSS -->
|
||||||
|
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/custom.css">
|
||||||
|
|
||||||
|
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<!-- Icons -->
|
||||||
|
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
|
||||||
|
<link rel="shortcut icon" href="/favicon.png">
|
||||||
|
<!-- RSS -->
|
||||||
|
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
|
|
@ -1,42 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="{{ .Site.LanguageCode }}" class="wf-firasans-n4-active wf-active">
|
|
||||||
<head>
|
|
||||||
<link href="http://gmpg.org/xfn/11" rel="profile">
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
{{ with .Site.Params.meta.description }}<meta name="description" content="{{ . }}">{{ end }}
|
|
||||||
{{ with .Site.Params.meta.keywords }}<meta name="keywords" content="{{.}}">{{ end }}
|
|
||||||
{{ .Hugo.Generator }}
|
|
||||||
<!-- Enable responsiveness on mobile devices-->
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
|
||||||
{{ if .IsHome -}}
|
|
||||||
<title>{{ .Site.Title }}</title>
|
|
||||||
{{- else -}}
|
|
||||||
<title>{{ .Title }} · {{ .Site.Title }}</title>
|
|
||||||
{{- end }}
|
|
||||||
<!-- CSS -->
|
|
||||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/print.css" media="print">
|
|
||||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/poole.css">
|
|
||||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/hyde.css">
|
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Fira+Sans:300,300i,400,400i,500">
|
|
||||||
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
|
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
|
||||||
<!-- highlight.js-->
|
|
||||||
{{ if .Site.Params.highlightjs }}
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/{{ .Site.Params.highlightjsstyle | default "default" }}.min.css">
|
|
||||||
{{ end }}
|
|
||||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/syntax.css">
|
|
||||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/custom.css">
|
|
||||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/main.css">
|
|
||||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
|
||||||
<!--[if lt IE 9]>
|
|
||||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
|
||||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
|
||||||
<![endif]-->
|
|
||||||
<!-- Icons -->
|
|
||||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
|
|
||||||
<link rel="shortcut icon" href="/favicon.png">
|
|
||||||
<!-- RSS -->
|
|
||||||
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
|
|
||||||
</head>
|
|
43
layouts/partials/header.html
Normal file
43
layouts/partials/header.html
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
<link href="http://gmpg.org/xfn/11" rel="profile">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
{{ with .Site.Params.meta.description }}<meta name="description" content="{{ . }}">{{ end }}
|
||||||
|
{{ with .Site.Params.meta.keywords }}<meta name="keywords" content="{{.}}">{{ end }}
|
||||||
|
{{ .Hugo.Generator }}
|
||||||
|
<!-- Enable responsiveness on mobile devices-->
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
||||||
|
{{ if .IsHome -}}
|
||||||
|
<title>{{ .Site.Title }}</title>
|
||||||
|
{{- else -}}
|
||||||
|
<title>{{ .Title }} · {{ .Site.Title }}</title>
|
||||||
|
{{- end }}
|
||||||
|
<!-- CSS -->
|
||||||
|
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/print.css" media="print">
|
||||||
|
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/poole.css">
|
||||||
|
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/hyde.css">
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Fira+Sans:300,300i,400,400i,500">
|
||||||
|
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
|
<!-- highlight.js-->
|
||||||
|
{{ if .Site.Params.highlightjs }}
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/{{ .Site.Params.highlightjsstyle | default "default" }}.min.css">
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Pygments Syntax -->
|
||||||
|
{{ if .Site.Params.PygmentsUseClasses }}
|
||||||
|
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/syntax.css">
|
||||||
|
{{ end }}
|
||||||
|
<!-- Customised CSS -->
|
||||||
|
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/custom.css">
|
||||||
|
|
||||||
|
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<!-- Icons -->
|
||||||
|
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
|
||||||
|
<link rel="shortcut icon" href="/favicon.png">
|
||||||
|
<!-- RSS -->
|
||||||
|
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
|
11
layouts/partials/list_content.html
Normal file
11
layouts/partials/list_content.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<h1 class="title">{{ .Title }}</h1>
|
||||||
|
<ul class="posts">
|
||||||
|
{{ range where .Data.Pages "Section" "post" -}}
|
||||||
|
<li>
|
||||||
|
<span>
|
||||||
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||||
|
<time class="pull-right post-list">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
{{- end }}
|
||||||
|
</ul>
|
35
layouts/partials/post_content.html
Normal file
35
layouts/partials/post_content.html
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
<div class="post">
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
{{ if ne .Params.showpagemeta false }}
|
||||||
|
<div class="col-sm-12 col-md-12">
|
||||||
|
<span class="text-left post-date meta">
|
||||||
|
<!-- published date -->
|
||||||
|
{{ if not .Date.IsZero }} {{ .Date.Format .Site.Params.dateformat }} {{end}}
|
||||||
|
<!-- categories -->
|
||||||
|
{{ if isset .Params "categories" }}
|
||||||
|
{{ $total := len .Params.categories }}
|
||||||
|
{{ if gt $total 0 }}
|
||||||
|
in
|
||||||
|
{{ $total := sub $total 1 }}
|
||||||
|
{{ range $i, $cat := sort $.Params.categories }}
|
||||||
|
<a class="meta" href="{{ "/categories/" | relURL }}{{ $cat | urlize }}">{{ $cat | upper }}</a>
|
||||||
|
{{ if lt $i $total }},{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
<!-- tags -->
|
||||||
|
{{ if isset .Params "tags" }}
|
||||||
|
{{ $total := len .Params.tags }}
|
||||||
|
{{ if gt $total 0 }}
|
||||||
|
<br/>
|
||||||
|
{{ $subtotal := sub $total 1 }}
|
||||||
|
{{ range $i, $tag := sort $.Params.tags }}
|
||||||
|
<a class="meta" href="{{ "/tags/" | relURL }}{{ $tag | urlize }}">#{{ $tag | lower }}</a>{{ if lt $i $subtotal }} {{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
{{ .Content }}
|
||||||
|
</div>
|
|
@ -1,10 +1,14 @@
|
||||||
<div id="disqus_thread"></div>
|
<div id="disqus_thread"></div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(function () {
|
(function () {
|
||||||
// Please don't inject Disqus on localhost
|
// Check and don't inject Disqus on localhost/127.0.0.1
|
||||||
if (window.location.hostname === "localhost" || location.hostname === "127.0.0.1")
|
// however, it does not work for customised local domains,
|
||||||
|
// e.g. example.test, example.dev
|
||||||
|
if (location.hostname === "localhost" ||
|
||||||
|
location.hostname === "127.0.0.1" ||
|
||||||
|
location.hostname === "") {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
var dsq = document.createElement('script');
|
var dsq = document.createElement('script');
|
||||||
dsq.type = 'text/javascript';
|
dsq.type = 'text/javascript';
|
||||||
dsq.async = true;
|
dsq.async = true;
|
||||||
|
@ -13,11 +17,9 @@
|
||||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(
|
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(
|
||||||
dsq);
|
dsq);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<noscript>Please enable JavaScript to view the
|
|
||||||
<a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>
|
<noscript>
|
||||||
|
Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>
|
||||||
</noscript>
|
</noscript>
|
||||||
<a href="http://disqus.com/" class="dsq-brlink">comments powered by
|
<a href="http://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
|
||||||
<span class="logo-disqus">Disqus</span>
|
|
||||||
</a>
|
|
16
layouts/partials/post_footer.html
Normal file
16
layouts/partials/post_footer.html
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{{ if .Site.Params.highlightjs -}}
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
||||||
|
{{ range .Site.Params.highlightjslanguages }}
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/{{.}}.min.js"></script>
|
||||||
|
{{ end }}
|
||||||
|
<script type="text/javascript">
|
||||||
|
hljs.initHighlightingOnLoad();
|
||||||
|
</script>
|
||||||
|
{{- end }}
|
||||||
|
<!-- Disqus-->
|
||||||
|
{{ if .Site.DisqusShortname -}}
|
||||||
|
{{ if ne .Params.showcomments false }}
|
||||||
|
<h2>Comments</h2>
|
||||||
|
{{ partial "post_disqus.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
{{- end }}
|
|
@ -1,21 +1,21 @@
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<div class="container text-center sidebar-sticky">
|
<div class="container text-center sidebar-sticky">
|
||||||
<div class="sidebar-about" align="center">
|
<div class="sidebar-about text-center">
|
||||||
<a href="{{ .Site.BaseURL }}"><h1 class="brand">{{ .Site.Title }}</h1></a>
|
<a href="{{ .Site.BaseURL }}"><h1 class="brand">{{ .Site.Title }}</h1></a>
|
||||||
{{ with .Site.Params.authorimage }} <img src="{{.}}" alt="Author Image" class="img-circle headshot"> {{ end }}
|
{{ with .Site.Params.authorimage }} <img src="{{.}}" alt="Author Image" class="img-circle headshot center"> {{ end }}
|
||||||
<p class="lead">
|
<p class="lead">
|
||||||
{{ with .Site.Params.description }} {{.}} {{ else }} Your site's description {{end}}
|
{{ with .Site.Params.description }} {{.}} {{ else }} Your site's description {{end}}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
{{ partial "sidebar_menu.html" . }}
|
||||||
<ul class="sidebar-nav">
|
<p>
|
||||||
{{ range .Site.Menus.main -}}
|
{{ partial "sidebar_social.html" . }}
|
||||||
<li><a href="{{.URL}}"> {{ .Name | title }} </a></li>
|
</p>
|
||||||
{{- end }}
|
<p>{{ with .Site.Params.copyright }}{{.}}{{ else }}© {{ now.Format "2006"}} {{.Site.Params.author}}. <br/>
|
||||||
</ul>
|
<a href="http://creativecommons.org/licenses/by/3.0">Some Rights Reserved</a>. {{end}}
|
||||||
</div>
|
<br/>
|
||||||
{{ partial "social.html" . }}
|
<span class="poweredby">Powered by <a href="https://gohugo.io/">Hugo</a> & <a href="https://github.com/htr3n/hyde-hyde">hyde-hyde</a>.</span>
|
||||||
<p>{{ with .Site.Params.copyright }}{{.}}{{ else }}© {{ now.Format "2006"}} {{.Site.Params.author}}. <a href="http://creativecommons.org/licenses/by/3.0">Some Rights Reserved</a>. {{end}}</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
</div>
|
</div>
|
||||||
|
|
24
layouts/partials/sidebar_menu.html
Normal file
24
layouts/partials/sidebar_menu.html
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<!-- sidebar start -->
|
||||||
|
<div>
|
||||||
|
<ul class="sidebar-nav">
|
||||||
|
{{ $currentPage := . }}
|
||||||
|
{{ range .Site.Menus.main -}}
|
||||||
|
{{ if .HasChildren -}}
|
||||||
|
<li class="{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
|
||||||
|
<a href="#">{{ .Pre }}<span>{{ .Name }}</span></a>
|
||||||
|
<ul class="sidebar-nav">
|
||||||
|
{{ range .Children -}}
|
||||||
|
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
|
||||||
|
<a href="{{ .URL }}">{{ .Name | title }}</a>
|
||||||
|
</li>
|
||||||
|
{{- end -}}
|
||||||
|
</ul>
|
||||||
|
{{- else -}} <!-- No Children-->
|
||||||
|
<li>
|
||||||
|
<a href="{{.URL}}">{{ .Pre }} <span>{{ .Name | title }}</span></a>
|
||||||
|
</li>
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
32
layouts/partials/sidebar_social.html
Normal file
32
layouts/partials/sidebar_social.html
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
<section class="row text-center">
|
||||||
|
{{ with .Site.Params.social.twitter }}
|
||||||
|
<a href="https://twitter.com/{{.}}"><i class="fa fa-twitter fa-lg" aria-hidden="true"></i></a>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.social.facebook }}
|
||||||
|
<a href="https://facebook.com/{{.}}"><i class="fa fa-facebook-official fa-lg" aria-hidden="true"></i></a>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.social.github }}
|
||||||
|
<a href="https://github.com/{{.}}"><i class="fa fa-github fa-lg" aria-hidden="true"></i></a>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.social.bitbucket }}
|
||||||
|
<a href="https://bitbucket.org/{{.}}"><i class="fa fa-bitbucket fa-lg" aria-hidden="true"></i></a>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.social.instagram }}
|
||||||
|
<a href="https://instagram.com/{{.}}"><i class="fa fa-instagram fa-lg" aria-hidden="true"></i></a>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.social.linkedin }}
|
||||||
|
<a href="https://linkedin.com/in/{{.}}"><i class="fa fa-linkedin fa-lg" aria-hidden="true"></i></a>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.social.stackoverflow }}
|
||||||
|
<a href="https://stackoverflow.com/users/{{.}}"><i class="fa fa-stack-overflow fa-lg" aria-hidden="true"></i></a>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.social.medium}}
|
||||||
|
<a href="https://medium.com/{{.}}"><i class="fa fa-medium fa-lg" aria-hidden="true"></i></a>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.social.xing }}
|
||||||
|
<a href="https://www.xing.com/profile/{{.}}"><i class="fa fa-xing fa-lg" aria-hidden="true"></i></a>
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Site.Params.social.email }}
|
||||||
|
<a href="mailto:{{.}}"><i class="fa fa-envelope-o fa-lg" aria-hidden="true"></i></a>
|
||||||
|
{{ end }}
|
||||||
|
</section>
|
|
@ -1,35 +0,0 @@
|
||||||
<section class="row text-center">
|
|
||||||
{{ with .Site.Params.social.twitter }}
|
|
||||||
<a href="https://twitter.com/{{.}}"><i class="fa fa-twitter" aria-hidden="true"></i></a>
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.social.google }}
|
|
||||||
<a href="https://plus.google.com/{{.}}/about"><i class="fa fa-google-plus-official" aria-hidden="true"></i></a>
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.social.facebook }}
|
|
||||||
<a href="https://facebook.com/{{.}}"><i class="fa fa-facebook-official" aria-hidden="true"></i></a>
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.social.github }}
|
|
||||||
<a href="https://github.com/{{.}}"><i class="fa fa-github" aria-hidden="true"></i></a>
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.social.bitbucket }}
|
|
||||||
<a href="https://bitbucket.org/{{.}}"><i class="fa fa-bitbucket" aria-hidden="true"></i></a>
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.social.instagram }}
|
|
||||||
<a href="https://instagram.com/{{.}}"><i class="fa fa-instagram" aria-hidden="true"></i></a>
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.social.linkedin }}
|
|
||||||
<a href="https://linkedin.com/in/{{.}}"><i class="fa fa-linkedin" aria-hidden="true"></i></a>
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.social.stackoverflow }}
|
|
||||||
<a href="https://stackoverflow.com/users/{{.}}"><i class="fa fa-stack-overflow" aria-hidden="true"></i></a>
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.social.medium}}
|
|
||||||
<a href="https://medium.com/{{.}}"><i class="fa fa-medium" aria-hidden="true"></i></a>
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.social.xing }}
|
|
||||||
<a href="https://www.xing.com/profile/{{.}}"><i class="fa fa-xing" aria-hidden="true"></i></a>
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Site.Params.social.email }}
|
|
||||||
<a href="mailto:{{.}}"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
|
|
||||||
{{ end }}
|
|
||||||
</section>
|
|
|
@ -1,38 +1,64 @@
|
||||||
html, body {
|
html,
|
||||||
font-family: "Fira Sans", sans-serif;
|
body
|
||||||
|
{
|
||||||
|
font-family: 'Fira Sans', sans-serif;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.img-circle {
|
.img-circle
|
||||||
|
{
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.headshot {
|
.headshot
|
||||||
|
{
|
||||||
width: 115px;
|
width: 115px;
|
||||||
height: 115px;
|
height: 115px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand {
|
.brand
|
||||||
|
{
|
||||||
font-size: 2.6em;
|
font-size: 2.6em;
|
||||||
|
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-center {
|
.text-center
|
||||||
text-align:center;
|
{
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.meta {
|
.meta
|
||||||
|
{
|
||||||
font-size: .8rem !important;
|
font-size: .8rem !important;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre
|
||||||
|
{
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
|
|
||||||
tab-size: 2;
|
tab-size: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre, code {
|
pre,
|
||||||
|
code
|
||||||
|
{
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.poweredby
|
||||||
|
{
|
||||||
|
font-size: 13px !important;
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.center
|
||||||
|
{
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
margin-right: auto;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue