improve style and base layout
This commit is contained in:
@ -7,6 +7,7 @@
|
||||
{{ $b := printf "0x%s" (substr $hash 4 2) | int }}
|
||||
{{ $rgba := printf "rgba(%d,%d,%d,0.2)" $r $g $b }}
|
||||
<a
|
||||
class="term-link"
|
||||
id="{{ $taxonomy | urlize }}_{{ $name | urlize }}"
|
||||
style="background:rgba({{ $r }},{{ $g }},{{ $b }},0.4)"
|
||||
href="{{ "/" | relLangURL}}{{ $taxonomy | urlize }}{{ "/" | relLangURL}}{{ $name | urlize }}">
|
||||
|
@ -1,7 +1,13 @@
|
||||
{{ define "main" }}
|
||||
{{ .Content }}
|
||||
{{ range site.RegularPages }}
|
||||
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||
{{ .Summary }}
|
||||
{{ end }}
|
||||
{{ $pages := shuffle (where site.RegularPages "Section" "tools") | first 20 }}
|
||||
<section>
|
||||
<h2>Featured Tools</h2>
|
||||
{{ range $pages }}
|
||||
<article>
|
||||
<h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
|
||||
<p>{{ .Content | truncate 100 }}</p>
|
||||
</article>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
@ -1,8 +1,12 @@
|
||||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
{{ range .Pages }}
|
||||
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||
{{ .Summary }}
|
||||
{{ end }}
|
||||
<section>
|
||||
{{ range .Pages }}
|
||||
<article>
|
||||
<h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
|
||||
<p>{{ .Content | truncate 100 }}</p>
|
||||
</article>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
37
layouts/taxonomies.html
Normal file
37
layouts/taxonomies.html
Normal file
@ -0,0 +1,37 @@
|
||||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
|
||||
<section>
|
||||
<table id="taxonomy-table">
|
||||
<!-- <thead>
|
||||
<tr>
|
||||
<th>Taxonomy</th>
|
||||
<th>Terms</th>
|
||||
</tr>
|
||||
</thead> -->
|
||||
<tbody>
|
||||
{{ range $taxonomyname, $taxonomy := .Site.Taxonomies }}
|
||||
{{ with $taxonomy }}
|
||||
<tr>
|
||||
<td>
|
||||
<a
|
||||
class="taxonomy-name"
|
||||
href="{{ "/" | relLangURL }}{{ $taxonomyname }}">
|
||||
{{ $taxonomyname | strings.FirstUpper }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ range $key, $value := $taxonomy }}
|
||||
{{ partial "term-link.html" (dict "name" $key "taxonomy" $taxonomyname) }}
|
||||
{{ end }}
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
|
||||
{{ end }}
|
@ -1,7 +1,11 @@
|
||||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
<h1>All {{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
<section id="taxonomy-page">
|
||||
{{ $taxonomy := .Title | urlize }}
|
||||
{{ range .Pages }}
|
||||
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||
<!-- <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2> -->
|
||||
{{ partial "term-link.html" (dict "name" .LinkTitle "taxonomy" $taxonomy ) }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
@ -1,47 +1,41 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<div id="page-header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
|
||||
{{ $dateHuman := .Date | time.Format ":date_long" }}
|
||||
Updated <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
|
||||
<span class="time">Updated <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time></span>
|
||||
|
||||
</div>
|
||||
|
||||
{{ with .Params.links }}
|
||||
<section>
|
||||
<h2>Links</h2>
|
||||
<ul>
|
||||
{{ range . }}
|
||||
<li><a href="{{ .url }}" target="_blank" rel="noopener">{{ .title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
<section id="quick-links">
|
||||
<h2>Quick Links</h2>
|
||||
<div id="link-list">
|
||||
<ul>
|
||||
{{ range . }}
|
||||
<li><a href="{{ .url }}" target="_blank" rel="noopener">{{ .title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.website }}
|
||||
<p>
|
||||
Website: <a href="{{ . }}" target="_blank" rel="noopener">{{ . }}</a>
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.github }}
|
||||
<p>
|
||||
<a href="{{ . }}" target="_blank" rel="noopener">View on GitHub</a>
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
<section>
|
||||
<section id="taxonomies">
|
||||
<h2>At a Glance</h2>
|
||||
<table id="taxonomies">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Taxonomy</th>
|
||||
<th>Terms</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<table id="taxonomy-table">
|
||||
<tbody>
|
||||
{{ range $taxonomyname, $taxonomy := .Site.Taxonomies }}
|
||||
{{ with $taxonomy }}
|
||||
<tr>
|
||||
<th>{{ $taxonomyname | strings.FirstUpper }}</th>
|
||||
<td>
|
||||
<a
|
||||
class="taxonomy-name"
|
||||
href="{{ "/" | relLangURL }}{{ $taxonomyname }}">
|
||||
{{ $taxonomyname | strings.FirstUpper }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ range $key, $value := $taxonomy }}
|
||||
{{ partial "term-link.html" (dict "name" $key "taxonomy" $taxonomyname) }}
|
||||
|
Reference in New Issue
Block a user