diff options
author | Hugo Aguirre <bul.ikana@gmail.com> | 2018-09-30 00:43:26 +0300 |
---|---|---|
committer | Hugo Aguirre <bul.ikana@gmail.com> | 2018-09-30 00:43:26 +0300 |
commit | abab8eb4d7d7a34b1a196bc552b2436ab355552b (patch) | |
tree | 942424d43cc59136667ed903e90c46d37a7e0aa8 | |
parent | 031aec00f794ed0b2c552c77e03a37c17ce59a5c (diff) |
Single page without pagination
-rw-r--r-- | layouts/_default/single.html | 42 | ||||
-rw-r--r-- | layouts/partials/disqus.html | 12 | ||||
-rw-r--r-- | layouts/partials/fb-script.html | 10 | ||||
-rw-r--r-- | layouts/partials/sidebar.html | 30 |
4 files changed, 94 insertions, 0 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index e69de29..e53c4ae 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -0,0 +1,42 @@ +{{ define "main" }} +<div class="row"> +<div class="col-md-8"> + <article class="post" itemscope itemtype="http://schema.org/BlogPosting"> + + <header class="post-header"> + <h1 class="post-title" itemprop="name headline">{{ .Title }}</h1> + <p class="post-meta"><time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}' itemprop="datePublished">{{ .Date.Format "January 2, 2006" }}</time>{{ with .Params.Author }} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ . }}</span></span>{{ end }}</p> + + </header> + + <div class="post-content" itemprop="articleBody"> + {{ .Content }} + </div> + + </article> + <div class="row"> + {{ if .Site.Params.disqus }} + {{ partial "disqus.html" . }} + {{ end }} + </div> + + <div class="row"> + <ul class="pager"> + {% if page.next.url %} + <li><a class="next" href="{page.next.url | prepend: site.baseurl}}">« {page.next.title}}</a></li> + {% endif %} + {% if page.previous.url %} + <li><a class="previous" href="{page.previous.url | prepend: site.baseurl}}">{page.previous.title}} »</a></li> + {% endif %} + </ul> + </div> +</div> + + +{{ partial "sidebar.html" . }} + +</div> + + +{{ partial "fb-script.html" . }} +{{ end }}
\ No newline at end of file diff --git a/layouts/partials/disqus.html b/layouts/partials/disqus.html new file mode 100644 index 0000000..6c79e9a --- /dev/null +++ b/layouts/partials/disqus.html @@ -0,0 +1,12 @@ +{{ with .Site.Params.disqus }} +<div id="disqus_thread"></div> +<script defer> +(function() { + var d = document, s = d.createElement('script'); + s.src = '//{{.}}.disqus.com/embed.js'; + s.setAttribute('data-timestamp', +new Date()); + (d.head || d.body).appendChild(s); +})(); +</script> +<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> +{{ end }}
\ No newline at end of file diff --git a/layouts/partials/fb-script.html b/layouts/partials/fb-script.html new file mode 100644 index 0000000..866f69a --- /dev/null +++ b/layouts/partials/fb-script.html @@ -0,0 +1,10 @@ +{{ if .Site.Params.fbLikeBox }} +<div id="fb-root"></div> +<script>(function(d, s, id) { + var js, fjs = d.getElementsByTagName(s)[0]; + if (d.getElementById(id)) return; + js = d.createElement(s); js.id = id; + js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.6&appId={{ .Site.Params.fbAppId }}"; + fjs.parentNode.insertBefore(js, fjs); +}(document, 'script', 'facebook-jssdk'));</script> +{{ end }}
\ No newline at end of file diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html new file mode 100644 index 0000000..5fc9f36 --- /dev/null +++ b/layouts/partials/sidebar.html @@ -0,0 +1,30 @@ +<div class="col-md-4 mt20"> + <div class="post-img"> + {{ if .Params.img }} + <img width="600" src="{{ .Site.BaseURL}}images/{{ .Params.img }}" alt="{{ .Params.title }}"> + {{ else }} + <img width="600" src="{{ .Site.BaseURL }}images/{{ .Site.Params.defaultImage }}" alt="webjeda"> + {{ end }} + </div> + + + <div class="mt10 recent"> + <h2>Recent articles</h2> + <ul> + {{ range first 3 .Site.RegularPages }} + + <li> + <p><a href="{{ .URL }}">{{ .Title }}</a><small> {{ .Date.Format "January 2, 2006" }}</small></p> + </li> + + {{ end }} + </ul> + </div> + {{ if .Site.Params.fbLikeBox }} + <div class="mt10"> + <div class="fb-page" data-href="https://www.facebook.com/webjeda/" data-width="400" data-small-header="true" data-adapt-container-width="true" data-hide-cover="true" data-show-facepile="true"><blockquote cite="https://www.facebook.com/webjeda/" class="fb-xfbml-parse-ignore"><a href="{site.fb-page-url}}">{{ .Site.Params.fbPageTitle}}</a></blockquote></div> + </div> + {{ end }} + <br> + +</div>
\ No newline at end of file |