feat: add social icons and template bug fixes
This commit is contained in:
17
layouts/partials/disqus.html
Normal file
17
layouts/partials/disqus.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
// Don't ever inject Disqus on localhost--it creates unwanted
|
||||
// discussions from 'localhost:1313' on your Disqus account...
|
||||
if (window.location.hostname == "localhost")
|
||||
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>
|
@@ -1,6 +1,17 @@
|
||||
<div class="header">
|
||||
<h1>{{ .Site.Title }}</h1>
|
||||
<h2>{{ .Site.Params.TitleTag | markdownify }}</h2>
|
||||
<h1 class="site-title">{{ .Site.Title }}</h1>
|
||||
<div class="site-description">
|
||||
{{- if isset .Site.Params "subtitle" -}}
|
||||
<h2>{{ .Site.Params.Subtitle | markdownify }}</h2>
|
||||
{{- end -}}
|
||||
<nav class="nav social">
|
||||
<ul class="flat">
|
||||
{{- range $index, $key := .Site.Params.Social -}}
|
||||
<a href="{{ $key.link }}" title="{{ $key.name }}"><i data-feather="{{ $key.icon }}"></i></a>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<nav class="nav">
|
||||
<ul class="flat">
|
||||
|
@@ -1,22 +1,26 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
{{- $title := ( .Title ) -}}
|
||||
{{- $siteTitle := ( .Site.Title ) -}}
|
||||
|
||||
{{- if .IsHome -}}
|
||||
<title>{{ $siteTitle }}</title>
|
||||
<title>{{ $siteTitle }} {{- if isset .Site.Params "subtitle" -}} - {{ .Site.Params.Subtitle }}{{- end -}} </title>
|
||||
{{- else -}}
|
||||
<title>{{ $title }} - {{ $siteTitle }}</title>
|
||||
<title>{{ $title }} - {{ $siteTitle }}</title>
|
||||
{{- end -}}
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
|
||||
{{- template "_internal/opengraph.html" . -}}
|
||||
{{- template "_internal/twitter_cards.html" . -}}
|
||||
<link href="https://fonts.googleapis.com/css?family=Ubuntu:300,400,300italic,400italic|Raleway:500,100,300" rel="stylesheet">
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/css/normalize.css" />
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/css/main.css" />
|
||||
<script src="main.js"></script>
|
||||
|
||||
{{- if and (isset .Site.Params "social") (isset .Site.Params "feathericonscdn") (eq .Site.Params.featherIconsCDN true) -}}
|
||||
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
||||
{{- else if (isset .Site.Params "social") -}}
|
||||
<script src="/js/feather.min.js"></script>
|
||||
{{- end -}}
|
||||
<script src="/js/main.js"></script>
|
||||
</head>
|
||||
|
Reference in New Issue
Block a user