fix page layouts

This commit is contained in:
Huy Tran 2018-01-25 16:57:13 +07:00
parent 88d2987fc2
commit 94f95fc114
5 changed files with 15 additions and 14 deletions

View File

@ -5,4 +5,4 @@
- Fork from [Hyde](https://github.com/spf13/hyde)
- Adapt to [Nate Finch's blog](https://npf.io)'s colors and fonts.
- Refactor `basedof.html` and corresponding pages `index.html`, `single.html`, `list.html`
- define blocks `content` and `footer` that will be fulfilled by each different type of layout.
- define blocks `content` and `footer` that will be fulfilled by each different type of layout.

View File

@ -5,16 +5,18 @@
{{ define "content" -}}
<div class="posts">
{{ range .Data.Pages -}}
<div class="post">
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
<span class="post-date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span>
{{ .Summary }}
{{ if .Truncated }}
<div class="read-more-link">
<a href="{{ .RelPermalink }}">Read More…</a>
</div>
{{ end }}
</div>
{{ if ne .Section "about" }}
<div class="post">
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
<span class="post-date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span>
{{ .Summary }}
{{ if .Truncated }}
<div class="read-more-link">
<a href="{{ .RelPermalink }}">Read More…</a>
</div>
{{ end }}
</div>
{{ end }}
{{- end }}
</div>
{{- end }}

View File

@ -17,8 +17,7 @@
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/poole.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 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">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<!-- highlight.js-->
{{ 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">

View File

@ -1,6 +1,6 @@
<h1 class="title">{{ .Title }}</h1>
<ul class="posts">
{{ range where .Data.Pages "Section" "post" -}}
{{ range .Data.Pages -}}
<li>
<span>
<a href="{{ .Permalink }}">{{ .Title }}</a>