Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added little tags support #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -1 +1,28 @@
<!-- This theme is not supported list page -->
{{ partial "header" . }}
{{ partial "nav" . }}
<section class="section">
<div class="container">
{{ range sort .Paginator.Pages }}
<article>
<h2 class="subtitle is-6">{{ .Date.Format "January 2, 2006" }}</h2>
<h1 class="title"><a href="{{ .Permalink }}">{{ .Title }}</a>{{ if .Draft }} ::Draft{{ end }}</h1>
{{ if .Params.tags }}
{{ partial "tags" .Params.tags }}
{{ end }}
<div class="content">
{{ .Summary | plainify | safeHTML }}
{{ if .Truncated }}
...<a class="button is-link" href="{{ .Permalink }}" style="height:28px">
Read more
<span class="icon is-small">
<i class="fa fa-angle-double-right"></i>
</span>
</a>
{{ end }}
</div>
</article>
{{ end }}
</div>
</section>
{{ partial "pager" . }}
{{ partial "footer" . }}
3 changes: 3 additions & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<div class="container">
<h2 class="subtitle is-6">{{ .Date.Format "January 2, 2006" }}</h2>
<h1 class="title">{{ .Title }}</h1>
{{ if .Params.tags }}
{{ partial "tags" .Params.tags }}
{{ end }}
<div class="content">
{{ .Content }}
</div>
Expand Down
26 changes: 1 addition & 25 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,25 +1 @@
{{ partial "header" . }}
{{ partial "nav" . }}
<section class="section">
<div class="container">
{{ range sort .Paginator.Pages }}
<article>
<h2 class="subtitle is-6">{{ .Date.Format "January 2, 2006" }}</h2>
<h1 class="title"><a href="{{ .Permalink }}">{{ .Title }}</a>{{ if .Draft }} ::Draft{{ end }}</h1>
<div class="content">
{{ .Summary | plainify | safeHTML }}
{{ if .Truncated }}
...<a class="button is-link" href="{{ .Permalink }}" style="height:28px">
Read more
<span class="icon is-small">
<i class="fa fa-angle-double-right"></i>
</span>
</a>
{{ end }}
</div>
</article>
{{ end }}
</div>
</section>
{{ partial "pager" . }}
{{ partial "footer" . }}
{{ template "theme/_default/list.html" . }}
5 changes: 5 additions & 0 deletions layouts/partials/tags.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="tags">
{{ range . }}
<a class="button is-link" href="{{ "/tags/" | relURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
</div>