Add grid-side theme
This commit is contained in:
10
themes/grid-side/layouts/partials/extra/categories.html
Normal file
10
themes/grid-side/layouts/partials/extra/categories.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{{ $baseUrl := .Site.BaseURL }}
|
||||
<ul class="categories">
|
||||
<li>
|
||||
<i class="fa fa-book"></i>
|
||||
</li>
|
||||
{{ range .Params.categories }}
|
||||
<li><a href="{{ $baseUrl }}categories/{{ . | urlize }}">{{ . }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
26
themes/grid-side/layouts/partials/extra/disqus.html
Normal file
26
themes/grid-side/layouts/partials/extra/disqus.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{{ if .Site.DisqusShortname }}
|
||||
<div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
var disqus_shortname = '{{ .Site.DisqusShortname }}';
|
||||
var disqus_identifier = '{{ with .GetParam "disqus_identifier" }}{{ . }}{{ else }}{{ .Permalink }}{{ end }}';
|
||||
var disqus_title = '{{ with .GetParam "disqus_title" }}{{ . }}{{ else }}{{ .Title }}{{ end }}';
|
||||
var disqus_url = '{{ with .GetParam "disqus_url" }}{{ . | html }}{{ else }}{{ .Permalink }}{{ end }}';
|
||||
(function() {
|
||||
// Avoid adding localhost comment sections to Disqus account
|
||||
if (window.location.hostname === "localhost") {
|
||||
return;
|
||||
}
|
||||
|
||||
var dsq = document.createElement('script');
|
||||
dsq.type = 'text/javascript';
|
||||
dsq.async = true;
|
||||
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>
|
||||
{{end}}
|
||||
|
24
themes/grid-side/layouts/partials/extra/pagination.html
Normal file
24
themes/grid-side/layouts/partials/extra/pagination.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{{ $baseUrl := .Site.BaseURL }}
|
||||
{{ if .IsNode }}
|
||||
<ul class="pagination">
|
||||
{{ with .Paginator }}
|
||||
<li class="{{ if .HasPrev }}waves-effect{{ else }}disabled{{ end }}">
|
||||
<a href="{{ if .HasPrev }}{{ $baseUrl }}{{ .Prev.URL }}{{ else }}#!{{ end }}">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
</li>
|
||||
{{ $currentPageNumber := .PageNumber }}
|
||||
{{ range .Pagers }}
|
||||
<li class="{{ if eq $currentPageNumber .PageNumber }}active{{ else }}waves-effect{{ end }}">
|
||||
<a href="{{ $baseUrl }}{{ .URL }}">{{ .PageNumber }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
<li class="{{ if .HasNext }}waves-effect{{ else }}disabled{{ end }}">
|
||||
<a href="{{ if .HasNext }}{{ $baseUrl }}{{ .Next.URL }}{{ else }}#!{{ end }}">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
10
themes/grid-side/layouts/partials/extra/tags.html
Normal file
10
themes/grid-side/layouts/partials/extra/tags.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{{ $baseUrl := .Site.BaseURL }}
|
||||
<ul class="tags">
|
||||
<li>
|
||||
<i class="fa fa-tags"></i>
|
||||
</li>
|
||||
{{ range .Params.tags }}
|
||||
<li><a href="{{ $baseUrl }}tags/{{ . | urlize }}">{{ . }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
19
themes/grid-side/layouts/partials/extra/video.html
Normal file
19
themes/grid-side/layouts/partials/extra/video.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{{ $baseUrl := .Site.BaseURL }}
|
||||
<video preload="auto" autoplay loop muted {{ with .Params.video_fallback }}poster="{{ $baseUrl }}{{ . }}"{{ end }} class="{{ .Scratch.Get "class" }}">
|
||||
{{ with .Params.video_webm }}
|
||||
<source src="{{ $baseUrl }}{{ . }}" type='video/webm; codecs="vp8.0, vorbis"'>
|
||||
{{ end }}
|
||||
{{ with .Params.video_ogv }}
|
||||
<source src="{{ $baseUrl }}{{ . }}" type='video/ogg; codecs="theora, vorbis"'>
|
||||
{{ end }}
|
||||
{{ with .Params.video_mp4 }}
|
||||
<source src="{{ $baseUrl }}{{ . }}" type='video/mp4; codecs="avc1.4D401E, mp4a.40.2"'>
|
||||
{{ end }}
|
||||
{{ with .Params.video_3gp }}
|
||||
<source src="{{ $baseUrl }}{{ . }}" type='video/3gp'>
|
||||
{{ end }}
|
||||
{{ with .Params.video_fallback }}
|
||||
<img src="{{ $baseUrl }}{{ . }}">
|
||||
{{ end }}
|
||||
</video>
|
||||
|
Reference in New Issue
Block a user