diff options
Diffstat (limited to 'layouts/index.html')
-rw-r--r-- | layouts/index.html | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..61fe13a --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,88 @@ +{{ define "main" }} + +<!-- is-fullheight-with-navbar is-bold is-light --> +<section class="hero has-text-centered"> + <br><br><br> + <div class="hero-body"> + <div class="container"> + <h1 class="title is-1"> + {{ .Title }} + </h1> + <h1 class="subtitle is-2"> + {{ .Params.Subtitle }} + </h1> + <h1 class="subtitle is-5"> + {{ with .Content }} + {{ . }} + {{ end }} + </h1> + </div> + </div> +</section> + +<div class="columns is-centered has-text-centered"> + <div class="column is-10"> + <div class="content"> + <a href="{{ "/tags/" | relURL }}"> + <h1>Read articles by tags</h1> + </a> + <p class="tags-summary"> + {{ $randTags := (slice)}} + {{ range $name, $taxonomy := .Site.Taxonomies.tags }} + {{ $randTags = $randTags | append $name }} + {{ end }} + {{ $randTags = sort (first .Site.Params.TagsInHome (shuffle $randTags)) }} + + {{ range $name := $randTags }} + <a href="{{ "/tags/" | relURL }}{{ $name | urlize }}"> + <span class="tag is-dark is-large is-rounded"> + {{ $name | humanize }} + </span> + </a> + {{ end }} + </p> + </div> + </div> +</div> + +<div class="columns is-centered has-text-centered"> + <div class="column is-10"> + <div class="content"> + <a href="{{ "/sections/" | relURL }}"> + <h1>Sections</h1> + </a> + <p class="tags-summary"> + {{ $randSections := shuffle (where .Site.Sections ".Title" "not in" "Posts Addons") }} + {{ range sort (first .Site.Params.SectionsInHome $randSections) "Title" }} + <a href="{{ .RelPermalink }}"> + <span class="tag is-dark is-large"> + {{ .Title | humanize | title }} + </span> + </a> + {{ end }} + </p> + </div> + </div> +</div> + + +<div class="columns is-centered"> + <div class="column is-7"> + <div class="content"> + <a href="{{ "/posts/" | relURL }}"> + <h1 class="is-3">Recent posts</h1> + </a> + </div> + {{ range first 5 (where .Site.RegularPages.ByPublishDate.Reverse ".Section" "!=" "Addons") }} + {{- partial "blog-brief.html" . -}} + {{ end }} + + <div class="content"> + <a href="{{ "/posts/" | relURL }}"> + <h4 class="has-text-centered seeall">See all</h4> + </a> + </div> + </div> +</div> + +{{ end }}
\ No newline at end of file |