Merge pull request #160 from yogster/beautiful-jekyll-tags

Added tag styling like Beautiful Jekyll
This commit is contained in:
Michael Romero 2018-04-16 23:33:07 -07:00 committed by GitHub
commit e78f3c8de9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 8 deletions

View file

@ -49,11 +49,11 @@
</div>
{{ if .Params.tags }}
<span class="post-meta">
<div class="blog-tags">
{{ range .Params.tags }}
#<a href="{{ $.Site.LanguagePrefix | absURL }}/tags/{{ . | urlize }}/">{{ . }}</a>&nbsp;
<a href="{{ $.Site.LanguagePrefix | absURL }}/tags/{{ . | urlize }}/">{{ . }}</a>&nbsp;
{{ end }}
</span>
</div>
{{ end }}
</article>

View file

@ -4,6 +4,15 @@
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<article role="main" class="blog-post">
{{ .Content }}
{{ if .Params.tags }}
<div class="blog-tags">
{{ range .Params.tags }}
<a href="{{ $.Site.LanguagePrefix | absURL }}/tags/{{ . | urlize }}/">{{ . }}</a>&nbsp;
{{ end }}
</div>
{{ end }}
{{ if .Site.Params.socialShare }}
<hr/>
<section id="social-share">

View file

@ -35,11 +35,11 @@
</div>
{{ if .Params.tags }}
<span class="post-meta">
{{ range .Params.tags }}
#<a href="{{ $.Site.LanguagePrefix | absURL }}/tags/{{ . | urlize }}/">{{ . }}</a>&nbsp;
{{ end }}
</span>
<div class="blog-tags">
{{ range .Params.tags }}
<a href="{{ $.Site.LanguagePrefix | absURL }}/tags/{{ . | urlize }}/">{{ . }}</a>&nbsp;
{{ end }}
</div>
{{ end }}
</article>
{{ end }}

View file

@ -427,12 +427,20 @@ footer .theme-by {
margin-bottom: 30px;
}
.blog-tags:before {
content: "Tags: ";
}
.blog-tags a {
color: #008AFF;
text-decoration: none;
padding: 0px 5px;
}
.blog-tags a:before {
content: "#";
}
.blog-tags a:hover {
border-radius: 2px;
color: #008AFF;