refactoring the footer

This commit is contained in:
Huy Tran 2018-01-23 10:02:05 +07:00
parent 514e9a167f
commit cf95cacd15
10 changed files with 193 additions and 153 deletions

View file

@ -3,9 +3,9 @@
{{ partial "sidebar.html" . }} {{ partial "sidebar.html" . }}
<div class="content container"> <div class="content container">
{{ block "main" . }}{{ end }} {{ block "main" . }}{{ end }}
</div>
<div class="footer"> <div class="footer">
{{ block "footer" . }}{{ end }} {{ block "footer" . }}{{ end }}
</div> </div>
</div>
</body> </body>
</html> </html>

View file

@ -11,9 +11,8 @@
{{ define "footer" }} {{ define "footer" }}
<!-- Footer --> <!-- Footer -->
<div>
{{ if .Site.GoogleAnalytics -}} {{ if .Site.GoogleAnalytics -}}
{{ template "_internal/google_analytics_async.html" . }} {{ template "_internal/google_analytics_async.html" . }}
{{- end}} {{- end}}
</div> <script src="{{ .Site.BaseURL }}js/main.js"></script>
{{- end }} {{- end }}

View file

@ -4,8 +4,10 @@
{{ if ne .Params.showpagemeta false }} {{ if ne .Params.showpagemeta false }}
<div class="col-sm-12 col-md-12"> <div class="col-sm-12 col-md-12">
<span class="text-left post-date meta"> <span class="text-left post-date meta">
{{ if ne .Params.showpdate false }}
<!-- published date --> <!-- published date -->
{{ if not .Date.IsZero }} {{ .Date.Format .Site.Params.dateformat }} {{end}} {{ if not .Date.IsZero }} {{ .Date.Format .Site.Params.dateformat }} {{end}}
{{ end }}
<!-- categories --> <!-- categories -->
{{ if isset .Params "categories" }} {{ if isset .Params "categories" }}
{{ $total := len .Params.categories }} {{ $total := len .Params.categories }}
@ -51,7 +53,11 @@
{{ end }} {{ end }}
<!-- Disqus--> <!-- Disqus-->
{{ if .Site.DisqusShortname }} {{ if .Site.DisqusShortname }}
{{ if ne .Params.showcomments false }}
<h2>Comments</h2> <h2>Comments</h2>
{{ template "_internal/disqus.html" . }} {{ partial "disqus.html" . }}
{{ end }} {{ end }}
{{ end }}
<!-- Other Scripts -->
<script src="{{ .Site.BaseURL }}js/main.js"></script>
{{- end }} {{- end }}

View file

@ -0,0 +1,23 @@
<div id="disqus_thread"></div>
<script type="text/javascript">
(function () {
// Please don't inject Disqus on localhost
if (window.location.hostname === "localhost" || location.hostname === "127.0.0.1")
return;
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
var disqus_shortname = '{{ .Site.DisqusShortname }}';
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(
dsq);
})();
</script>
<noscript>Please enable JavaScript to view the
<a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>
</noscript>
<a href="http://disqus.com/" class="dsq-brlink">comments powered by
<span class="logo-disqus">Disqus</span>
</a>

View file

@ -1,35 +1,42 @@
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"{{with .Site.LanguageCode}} xml:lang="{{.}}" lang="{{.}}"{{end}} class="wf-firasans-n4-active wf-active"> <html lang="{{ .Site.LanguageCode }}" class="wf-firasans-n4-active wf-active">
<head> <head>
<link href="http://gmpg.org/xfn/11" rel="profile"> <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="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 }} {{ .Hugo.Generator }}
<!-- Enable responsiveness on mobile devices--> <!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
{{ if .IsHome -}} {{ if .IsHome -}}
<title>{{ .Site.Title }}</title> <title>{{ .Site.Title }}</title>
{{- else -}} {{- else -}}
<title>{{ .Title }} &middot; {{ .Site.Title }}</title> <title>{{ .Title }} &middot; {{ .Site.Title }}</title>
{{- end }} {{- end }}
<!-- CSS --> <!-- CSS -->
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/print.css" media="print"> <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/poole.css">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/hyde.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://fonts.googleapis.com/css?family=Fira+Sans:300,300i,400,400i,500">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/custom.css">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> <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 }} {{ 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"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/{{ .Site.Params.highlightjsstyle | default "default" }}.min.css">
{{ end }} {{ 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 --> <!-- Icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="/favicon.png"> <link rel="shortcut icon" href="/favicon.png">
<!-- RSS --> <!-- RSS -->
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
</head> </head>

View file

@ -11,6 +11,9 @@
{{ with .Site.Params.social.github }} {{ with .Site.Params.social.github }}
<a href="https://github.com/{{.}}"><i class="fa fa-github" aria-hidden="true"></i></a> <a href="https://github.com/{{.}}"><i class="fa fa-github" aria-hidden="true"></i></a>
{{ end }} {{ 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 }} {{ with .Site.Params.social.instagram }}
<a href="https://instagram.com/{{.}}"><i class="fa fa-instagram" aria-hidden="true"></i></a> <a href="https://instagram.com/{{.}}"><i class="fa fa-instagram" aria-hidden="true"></i></a>
{{ end }} {{ end }}
@ -23,16 +26,10 @@
{{ with .Site.Params.social.medium}} {{ with .Site.Params.social.medium}}
<a href="https://medium.com/{{.}}"><i class="fa fa-medium" aria-hidden="true"></i></a> <a href="https://medium.com/{{.}}"><i class="fa fa-medium" aria-hidden="true"></i></a>
{{ end }} {{ end }}
{{ with .Site.Params.social.devto}} {{ with .Site.Params.social.xing }}
<a href="https://dev.to/{{.}}"><i class="fa fa-terminal" aria-hidden="true"></i></a> <a href="https://www.xing.com/profile/{{.}}"><i class="fa fa-xing" aria-hidden="true"></i></a>
{{ end }}
{{ with .Site.Params.social.angellist}}
<a href="https://angel.co/{{.}}"><i class="fa fa-angellist" aria-hidden="true"></i></a>
{{ end }} {{ end }}
{{ with .Site.Params.social.email }} {{ with .Site.Params.social.email }}
<a href="mailto:{{.}}"><i class="fa fa-envelope-o" aria-hidden="true"></i></a> <a href="mailto:{{.}}"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
{{ end }} {{ end }}
{{ with .Site.Params.social.xing }}
<a href="https://www.xing.com/profile/{{.}}"><i class="fa fa-xing" aria-hidden="true"></i></a>
{{ end }}
</section> </section>

View file

@ -29,10 +29,10 @@ html, body {
} }
pre { pre {
padding: 2px; padding: 1px;
tab-size: 2; tab-size: 2;
} }
pre > code { pre, code {
font-family: monospace; font-family: monospace;
} }

0
static/css/main.css Normal file
View file

View file

@ -1,59 +1,67 @@
/* Background */ .chroma { color: #f8f8f2; background-color: #272822 } /* Background */ .chroma { background-color: #f0f0f0 }
/* Error */ .chroma .err { color: #960050; background-color: #1e0010 } /* Error */ .chroma .err { }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } /* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: 100%; overflow: auto; display: block; } /* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: 100%; overflow: auto; display: block; }
/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc } /* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc }
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; display: block; } /* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; display: block; }
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; } /* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; }
/* Keyword */ .chroma .k { color: #66d9ef } /* Keyword */ .chroma .k { color: #007020; font-weight: bold }
/* KeywordConstant */ .chroma .kc { color: #66d9ef } /* KeywordConstant */ .chroma .kc { color: #007020; font-weight: bold }
/* KeywordDeclaration */ .chroma .kd { color: #66d9ef } /* KeywordDeclaration */ .chroma .kd { color: #007020; font-weight: bold }
/* KeywordNamespace */ .chroma .kn { color: #f92672 } /* KeywordNamespace */ .chroma .kn { color: #007020; font-weight: bold }
/* KeywordPseudo */ .chroma .kp { color: #66d9ef } /* KeywordPseudo */ .chroma .kp { color: #007020 }
/* KeywordReserved */ .chroma .kr { color: #66d9ef } /* KeywordReserved */ .chroma .kr { color: #007020; font-weight: bold }
/* KeywordType */ .chroma .kt { color: #66d9ef } /* KeywordType */ .chroma .kt { color: #902000 }
/* NameAttribute */ .chroma .na { color: #a6e22e } /* NameAttribute */ .chroma .na { color: #4070a0 }
/* NameClass */ .chroma .nc { color: #a6e22e } /* NameBuiltin */ .chroma .nb { color: #007020 }
/* NameConstant */ .chroma .no { color: #66d9ef } /* NameClass */ .chroma .nc { color: #0e84b5; font-weight: bold }
/* NameDecorator */ .chroma .nd { color: #a6e22e } /* NameConstant */ .chroma .no { color: #60add5 }
/* NameException */ .chroma .ne { color: #a6e22e } /* NameDecorator */ .chroma .nd { color: #555555; font-weight: bold }
/* NameFunction */ .chroma .nf { color: #a6e22e } /* NameEntity */ .chroma .ni { color: #d55537; font-weight: bold }
/* NameOther */ .chroma .nx { color: #a6e22e } /* NameException */ .chroma .ne { color: #007020 }
/* NameTag */ .chroma .nt { color: #f92672 } /* NameFunction */ .chroma .nf { color: #06287e }
/* Literal */ .chroma .l { color: #ae81ff } /* NameLabel */ .chroma .nl { color: #002070; font-weight: bold }
/* LiteralDate */ .chroma .ld { color: #e6db74 } /* NameNamespace */ .chroma .nn { color: #0e84b5; font-weight: bold }
/* LiteralString */ .chroma .s { color: #e6db74 } /* NameTag */ .chroma .nt { color: #062873; font-weight: bold }
/* LiteralStringAffix */ .chroma .sa { color: #e6db74 } /* NameVariable */ .chroma .nv { color: #bb60d5 }
/* LiteralStringBacktick */ .chroma .sb { color: #e6db74 } /* LiteralString */ .chroma .s { color: #4070a0 }
/* LiteralStringChar */ .chroma .sc { color: #e6db74 } /* LiteralStringAffix */ .chroma .sa { color: #4070a0 }
/* LiteralStringDelimiter */ .chroma .dl { color: #e6db74 } /* LiteralStringBacktick */ .chroma .sb { color: #4070a0 }
/* LiteralStringDoc */ .chroma .sd { color: #e6db74 } /* LiteralStringChar */ .chroma .sc { color: #4070a0 }
/* LiteralStringDouble */ .chroma .s2 { color: #e6db74 } /* LiteralStringDelimiter */ .chroma .dl { color: #4070a0 }
/* LiteralStringEscape */ .chroma .se { color: #ae81ff } /* LiteralStringDoc */ .chroma .sd { color: #4070a0; font-style: italic }
/* LiteralStringHeredoc */ .chroma .sh { color: #e6db74 } /* LiteralStringDouble */ .chroma .s2 { color: #4070a0 }
/* LiteralStringInterpol */ .chroma .si { color: #e6db74 } /* LiteralStringEscape */ .chroma .se { color: #4070a0; font-weight: bold }
/* LiteralStringOther */ .chroma .sx { color: #e6db74 } /* LiteralStringHeredoc */ .chroma .sh { color: #4070a0 }
/* LiteralStringRegex */ .chroma .sr { color: #e6db74 } /* LiteralStringInterpol */ .chroma .si { color: #70a0d0; font-style: italic }
/* LiteralStringSingle */ .chroma .s1 { color: #e6db74 } /* LiteralStringOther */ .chroma .sx { color: #c65d09 }
/* LiteralStringSymbol */ .chroma .ss { color: #e6db74 } /* LiteralStringRegex */ .chroma .sr { color: #235388 }
/* LiteralNumber */ .chroma .m { color: #ae81ff } /* LiteralStringSingle */ .chroma .s1 { color: #4070a0 }
/* LiteralNumberBin */ .chroma .mb { color: #ae81ff } /* LiteralStringSymbol */ .chroma .ss { color: #517918 }
/* LiteralNumberFloat */ .chroma .mf { color: #ae81ff } /* LiteralNumber */ .chroma .m { color: #40a070 }
/* LiteralNumberHex */ .chroma .mh { color: #ae81ff } /* LiteralNumberBin */ .chroma .mb { color: #40a070 }
/* LiteralNumberInteger */ .chroma .mi { color: #ae81ff } /* LiteralNumberFloat */ .chroma .mf { color: #40a070 }
/* LiteralNumberIntegerLong */ .chroma .il { color: #ae81ff } /* LiteralNumberHex */ .chroma .mh { color: #40a070 }
/* LiteralNumberOct */ .chroma .mo { color: #ae81ff } /* LiteralNumberInteger */ .chroma .mi { color: #40a070 }
/* Operator */ .chroma .o { color: #f92672 } /* LiteralNumberIntegerLong */ .chroma .il { color: #40a070 }
/* OperatorWord */ .chroma .ow { color: #f92672 } /* LiteralNumberOct */ .chroma .mo { color: #40a070 }
/* Comment */ .chroma .c { color: #75715e } /* Operator */ .chroma .o { color: #666666 }
/* CommentHashbang */ .chroma .ch { color: #75715e } /* OperatorWord */ .chroma .ow { color: #007020; font-weight: bold }
/* CommentMultiline */ .chroma .cm { color: #75715e } /* Comment */ .chroma .c { color: #60a0b0; font-style: italic }
/* CommentSingle */ .chroma .c1 { color: #75715e } /* CommentHashbang */ .chroma .ch { color: #60a0b0; font-style: italic }
/* CommentSpecial */ .chroma .cs { color: #75715e } /* CommentMultiline */ .chroma .cm { color: #60a0b0; font-style: italic }
/* CommentPreproc */ .chroma .cp { color: #75715e } /* CommentSingle */ .chroma .c1 { color: #60a0b0; font-style: italic }
/* CommentPreprocFile */ .chroma .cpf { color: #75715e } /* CommentSpecial */ .chroma .cs { color: #60a0b0; background-color: #fff0f0 }
/* GenericDeleted */ .chroma .gd { color: #f92672 } /* CommentPreproc */ .chroma .cp { color: #007020 }
/* CommentPreprocFile */ .chroma .cpf { color: #007020 }
/* GenericDeleted */ .chroma .gd { color: #a00000 }
/* GenericEmph */ .chroma .ge { font-style: italic } /* GenericEmph */ .chroma .ge { font-style: italic }
/* GenericInserted */ .chroma .gi { color: #a6e22e } /* GenericError */ .chroma .gr { color: #ff0000 }
/* GenericHeading */ .chroma .gh { color: #000080; font-weight: bold }
/* GenericInserted */ .chroma .gi { color: #00a000 }
/* GenericOutput */ .chroma .go { color: #888888 }
/* GenericPrompt */ .chroma .gp { color: #c65d09; font-weight: bold }
/* GenericStrong */ .chroma .gs { font-weight: bold } /* GenericStrong */ .chroma .gs { font-weight: bold }
/* GenericSubheading */ .chroma .gu { color: #75715e } /* GenericSubheading */ .chroma .gu { color: #800080; font-weight: bold }
/* GenericTraceback */ .chroma .gt { color: #0044dd }
/* TextWhitespace */ .chroma .w { color: #bbbbbb }

0
static/js/main.js Normal file
View file