-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modifying the casper-two theme to include taxonomies
- Loading branch information
Showing
5 changed files
with
2,472 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,42 @@ | ||
{{ partial "head" . }} | ||
{{ partial "head" . }} {{if eq .Site.Params.singleViewStyle "casper"}} | ||
|
||
{{if eq .Site.Params.singleViewStyle "casper"}} | ||
<body class="tag-template"><div class="site-wrapper"> | ||
{{ partial "header-sori-term" . }} | ||
{{else}} | ||
<body class="home-template"><div class="site-wrapper"> | ||
{{ partial "header" . }} | ||
{{end}} | ||
<body class="tag-template"> | ||
<div class="site-wrapper"> | ||
{{ partial "header-sori-term" . }} {{else}} | ||
|
||
<main id="site-main" class="site-main outer" role="main"> | ||
<div class="inner"> | ||
{{if ne .Site.Params.singleViewStyle "casper"}} | ||
<div class="post-feed"> | ||
{{ partial "post-list" . }} | ||
</div> | ||
<body class="tag-template"> | ||
<div class="site-wrapper"> | ||
{{ partial "header-sori-term" . }} {{end}} | ||
|
||
<nav class="pagination" role="navigation"> | ||
{{if .Paginator.HasPrev}} | ||
<a class="newer-posts" href="{{ .Paginator.Prev.URL }}">← <span class="hide">Next Posts</span></a> | ||
{{end}} | ||
<span class="page-number"><span class="hide">Page {{ .Paginator.PageNumber }} of {{.Paginator.TotalPages}}</span> </span> | ||
{{if .Paginator.HasNext}} | ||
<a class="older-posts" href="{{ .Paginator.Next.URL }}"><span class="hide">Previous Posts</span> →</a> | ||
{{end}} | ||
</nav> | ||
{{else}} | ||
<div class="post-feed"> | ||
{{ partial "post-list-term" . }} | ||
</div> | ||
{{end}} | ||
</div> | ||
</main> | ||
<main id="site-main" class="site-main outer" role="main"> | ||
<div class="inner"> | ||
{{if ne .Site.Params.singleViewStyle "casper"}} | ||
<div class="post-feed"> | ||
{{ partial "post-list-term" . }} | ||
</div> | ||
|
||
{{ partial "footer" . }} | ||
</div>{{ partial "js" . }}</body></html> | ||
<nav class="pagination" role="navigation"> | ||
{{if .Paginator.HasPrev}} | ||
<a class="newer-posts" href="{{ .Paginator.Prev.URL }}">← | ||
<span class="hide">Next Posts</span> | ||
</a> | ||
{{end}} | ||
<span class="page-number"> | ||
<span class="hide">Page {{ .Paginator.PageNumber }} of {{.Paginator.TotalPages}}</span> </span> | ||
{{if .Paginator.HasNext}} | ||
<a class="older-posts" href="{{ .Paginator.Next.URL }}"> | ||
<span class="hide">Previous Posts</span> →</a> | ||
{{end}} | ||
</nav> | ||
{{else}} | ||
<div class="post-feed"> | ||
{{ partial "post-list-term" . }} | ||
</div> | ||
{{end}} | ||
</div> | ||
</main> | ||
|
||
{{ partial "footer" . }} | ||
</div>{{ partial "js" . }}</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,40 @@ | ||
{{ $paginator := .Paginate (where .Data.Pages.ByDate.Reverse "Type" "post") }} | ||
{{ range $paginator.Pages }} | ||
{{ $paginator := .Paginate (where .Data.Pages.ByDate.Reverse "Type" "post") }} {{ range $paginator.Pages }} | ||
|
||
<article class="post-card post"> | ||
{{if .Params.image}} | ||
<a class="post-card-image-link" href="{{ .Permalink }}"> | ||
<div class="post-card-image" style="background-image: url({{.Params.image | absURL}})"></div> | ||
</a> | ||
{{else}} | ||
<a class="post-card-image-link" href="{{ .Permalink }}"> | ||
<div class="post-card-image" style="background-image: url({{$.Site.BaseURL}}defimg/{{ index (seq 7 | shuffle) 0 }}.jpg)"></div> | ||
</a> | ||
{{end}} | ||
<article class="post-card post"> | ||
{{if .Params.image}} | ||
<a class="post-card-image-link" href="{{ .Permalink }}"> | ||
<div class="post-card-image" style="background-image: url({{.Params.image | absURL}})"></div> | ||
</a> | ||
{{else}} | ||
<a class="post-card-image-link" href="{{ .Permalink }}"> | ||
<div class="post-card-image" style="background-image: url({{$.Site.BaseURL}}defimg/{{ index (seq 7 | shuffle) 0 }}.jpg)"></div> | ||
</a> | ||
{{end}} | ||
|
||
<div class="post-card-content"> | ||
<a class="post-card-content-link" href="{{ .Permalink }}"> | ||
<header class="post-card-header"> | ||
{{if .Params.tags }}<span class="post-card-tags">{{ range $index, $tag := .Params.tags }} | ||
#{{$tag}} {{end}} </span> | ||
{{ end }} | ||
<h2 class="post-card-title">{{.Title}}</h2> | ||
</header> | ||
<section class="post-card-excerpt"> | ||
{{ if .Description }} | ||
<p>{{ .Description | markdownify }}</p> | ||
{{else}} | ||
<p>{{ .Summary | plainify | safeHTML }}{{ if .Truncated }} ... {{end}} </p> | ||
{{end}} | ||
</section> | ||
</a> | ||
<div class="post-card-content"> | ||
<a class="post-card-content-link" href="{{ .Permalink }}"> | ||
<header class="post-card-header"> | ||
{{if .Params.tags }} | ||
<span class="post-card-tags">{{ range $index, $tag := .Params.tags }} #{{$tag}} {{end}} </span> | ||
{{ end }} | ||
<h2 class="post-card-title">{{.Title}}</h2> | ||
</header> | ||
<section class="post-card-excerpt"> | ||
{{ if .Description }} | ||
<p>{{ .Description | markdownify }}</p> | ||
{{else}} | ||
<p>{{ .Summary | plainify | safeHTML }}{{ if .Truncated }} ... {{end}} </p> | ||
{{end}} | ||
</section> | ||
</a> | ||
|
||
<footer class="post-card-meta"> | ||
<img class="author-profile-image" src="{{ (.Params.authorAvatar | default .Site.Params.authorAvatar) | absURL}}" alt="Author" /> | ||
<span class="post-card-author"><a href="/">{{.Params.author | default .Site.Params.author}}</a></span> | ||
</footer> | ||
</div> | ||
<footer class="post-card-meta"> | ||
<img class="author-profile-image" src="{{ (.Params.authorAvatar | default .Site.Params.authorAvatar) | absURL}}" alt="Author" | ||
/> | ||
<span class="post-card-author"> | ||
<a href="/">{{.Params.author | default .Site.Params.author}}</a> | ||
</span> | ||
</footer> | ||
</div> | ||
</article> | ||
{{ end }} | ||
{{ end }} |
Large diffs are not rendered by default.
Oops, something went wrong.