Merge pull request #29 from kentnek/kent-default-list-single
Moving list and single templates to _default
This commit is contained in:
commit
c8083886a9
|
@ -0,0 +1,27 @@
|
|||
{{ define "stylesheets" }}
|
||||
<link rel="stylesheet" href="/css/posts.css" />
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ define "main" }}
|
||||
|
||||
<div class="post-list__container">
|
||||
<ul class="post-list">
|
||||
{{ range .Pages }}
|
||||
<li class="post">
|
||||
<div class="post__header">
|
||||
<time class="post__date" datetime="{{ .Date }}"
|
||||
>{{ .Date.Format "Jan 2 2006" }}</time
|
||||
>
|
||||
<h2 class="post__title">
|
||||
<a href="{{.RelPermalink}}">{{ .Title }}</a>
|
||||
</h2>
|
||||
{{ partial "tags.html" .}}
|
||||
</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ partial "browse-by-tag.html" .}}
|
||||
</div>
|
||||
|
||||
{{ end }}
|
|
@ -4,11 +4,26 @@
|
|||
|
||||
|
||||
{{ define "main" }}
|
||||
|
||||
<div class="single__container">
|
||||
{{ .Content }}
|
||||
<div class="post">
|
||||
<header class="post__header">
|
||||
<h1 class="post__title">{{.Title}}</h1>
|
||||
<time datetime="{{ .Date }}" class="post__date"
|
||||
>{{ .Date.Format "Jan 2 2006" }}</time
|
||||
>
|
||||
</header>
|
||||
<article class="post__content">
|
||||
{{ partial "anchored-headings.html" .Content }}
|
||||
{{ if or .Params.math .Site.Params.math }}
|
||||
{{ partial "math.html" . }}
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ partial "tags.html" .}} {{ partial "post-pagination.html" .}}
|
||||
</div>
|
||||
|
||||
{{ partial "social-icons.html" .}}
|
||||
|
||||
{{ end }} {{ define "footer" }}
|
||||
<footer>
|
||||
{{ partial "social-icons.html" .}}
|
||||
<p>{{ replace .Site.Copyright "{year}" now.Year }}</p>
|
||||
</footer>
|
||||
{{ end }} {{ define "scripts" }}
|
||||
<script src="https://unpkg.com/prismjs@^1.2"></script>
|
||||
{{ end }}
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
{{ define "stylesheets" }}
|
||||
<link rel="stylesheet" href="/css/posts.css" />
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ define "main" }}
|
||||
|
||||
<div class="post-list__container">
|
||||
<ul class="post-list">
|
||||
{{ range .Pages }}
|
||||
<li class="post">
|
||||
<div class="post__header">
|
||||
<time class="post__date" datetime="{{ .Date }}"
|
||||
>{{ .Date.Format "Jan 2 2006" }}</time
|
||||
>
|
||||
<h2 class="post__title">
|
||||
<a href="{{.RelPermalink}}">{{ .Title }}</a>
|
||||
</h2>
|
||||
{{ partial "tags.html" .}}
|
||||
</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ partial "browse-by-tag.html" .}}
|
||||
</div>
|
||||
|
||||
{{ end }}
|
|
@ -1,29 +0,0 @@
|
|||
{{ define "stylesheets" }}
|
||||
<link rel="stylesheet" href="/css/post.css" />
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ define "main" }}
|
||||
<div class="post">
|
||||
<header class="post__header">
|
||||
<h1 class="post__title">{{.Title}}</h1>
|
||||
<time datetime="{{ .Date }}" class="post__date"
|
||||
>{{ .Date.Format "Jan 2 2006" }}</time
|
||||
>
|
||||
</header>
|
||||
<article class="post__content">
|
||||
{{ partial "anchored-headings.html" .Content }}
|
||||
{{ if or .Params.math .Site.Params.math }}
|
||||
{{ partial "math.html" . }}
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ partial "tags.html" .}} {{ partial "post-pagination.html" .}}
|
||||
</div>
|
||||
{{ end }} {{ define "footer" }}
|
||||
<footer>
|
||||
{{ partial "social-icons.html" .}}
|
||||
<p>{{ replace .Site.Copyright "{year}" now.Year }}</p>
|
||||
</footer>
|
||||
{{ end }} {{ define "scripts" }}
|
||||
<script src="https://unpkg.com/prismjs@^1.2"></script>
|
||||
{{ end }}
|
Loading…
Reference in New Issue