~gg/blog-theme

a097d3090b7d035aa73948ed62ff6fcc5e4bae10 — Gui Goncalves 3 months ago 6e684e8
Remove sidebar
3 files changed, 35 insertions(+), 39 deletions(-)

M layouts/_default/list.html
M layouts/_default/single.html
R layouts/partials/{sidebar.html => latest_posts.html}
M layouts/_default/list.html => layouts/_default/list.html +1 -1
@@ 11,6 11,6 @@
  {{ .Render "summary" }}
  {{ end }}
  {{ partial "pagination.html" . }}
  {{ partial "latest_posts.html" . }}
</main>
{{ partial "sidebar.html" . }}
{{ end }}

M layouts/_default/single.html => layouts/_default/single.html +26 -24
@@ 1,26 1,28 @@
{{ define "main" }}
	<main>
		<article>
			<h1>{{ .Title }}</h1>
			<time>{{ .Date.Format "02.01.2006 15:04" }}</time>
			<div>
				{{ .Content }}
			</div>
			{{ with .Params.tags }}
			<div>
				<ul id="tags">
					{{ range . }}
					<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li>
					{{ end }}
				</ul>
			</div>
			{{ end }}
			{{ with .Site.DisqusShortname }}
			<div>
				{{ template "_internal/disqus.html" . }}
			</div>
			{{ end }}
		</article>
	</main>
{{ partial "sidebar.html" . }}
<main>
  <article>
    <h1>{{ .Title }}</h1>
    {{ if not .IsPage }}
    <time>{{ .Date.Format "02.01.2006" }}</time>
    {{ end }}
    <div>
      {{ .Content }}
    </div>
    {{ with .Params.tags }}
    <div>
      <ul id="tags">
        {{ range . }}
        <li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li>
        {{ end }}
      </ul>
    </div>
    {{ end }}
    {{ with .Site.DisqusShortname }}
    <div>
      {{ template "_internal/disqus.html" . }}
    </div>
    {{ end }}
  </article>
  {{ partial "latest_posts.html" . }}
</main>
{{ end }}

R layouts/partials/sidebar.html => layouts/partials/latest_posts.html +8 -14
@@ 1,14 1,8 @@
<aside>
  <div>
    <div>
      <h3>LATEST POSTS</h3>
    </div>
    <div>
      <ul>
        {{ range first 5 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
        <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
        {{ end }}
      </ul>
    </div>
  </div>
</aside>
<div>
  <h3>LATEST POSTS</h3>
  <ul>
    {{ range first 5 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
    <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
    {{ end }}
  </ul>
</div>