Browse Source

Improve tag cloud layout #12

master
Adrian Short 7 years ago
parent
commit
899ec087a3
2 changed files with 19 additions and 2 deletions
  1. +2
    -2
      layouts/taxonomy/tag.terms.html
  2. +17
    -0
      static/css/main.css

+ 2
- 2
layouts/taxonomy/tag.terms.html View File

@@ -1,8 +1,8 @@
{{ partial "header" . }}
<h1>{{ .Title }}</h1>
<ul>
<ul class="tag-cloud">
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
<li><a href="{{ "/tags/" | relURL }}{{ $name | urlize }}/">{{ $name }}</a></li>
<li><a href="{{ "/tags/" | relURL }}{{ $name | urlize }}/">{{ $name }}&nbsp;({{ $taxonomy.Count}})</a></li>
{{ end}}
</ul>
{{ partial "footer" . }}

+ 17
- 0
static/css/main.css View File

@@ -156,6 +156,23 @@ ul.pagination li.disabled {
color: #333;
}

ul.tag-cloud {
margin: 30px 0;
padding: 0;
}

ul.tag-cloud li {
display: inline;
margin: 0;
padding: 10px 20px 10px 0;
line-height: 2rem;
}

ul.tag-cloud li a, ul.tag-cloud li a:visited {
color: white;
text-decoration: none;
}

@media screen and (max-width: 599px) {
body {
width: 90%;


Loading…
Cancel
Save