Initial site working
This commit is contained in:
53
themes/ananke/layouts/_default/baseof.html
Normal file
53
themes/ananke/layouts/_default/baseof.html
Normal file
@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ site.LanguageCode | default site.Language.Lang }}" {{- with partialCached "func/GetLanguageDirection" "GetLanguageDirection" }} dir="{{ . }}" {{- end }}>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
{{/* NOTE: the Site's title, and if there is a page title, that is set too */}}
|
||||
<title>{{ block "title" . }}{{ with .Params.Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1">
|
||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
|
||||
{{ hugo.Generator }}
|
||||
{{/* NOTE: For Production make sure you add `HUGO_ENV="production"` before your build command */}}
|
||||
{{ $production := eq (getenv "HUGO_ENV") "production" | or (eq site.Params.env "production") }}
|
||||
{{ $public := not .Params.private }}
|
||||
{{ if and $production $public }}
|
||||
<meta name="robots" content="index, follow">
|
||||
{{ else }}
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
{{ end }}
|
||||
|
||||
{{ partial "site-style.html" . }}
|
||||
{{ partial "site-scripts.html" . }}
|
||||
|
||||
{{ block "favicon" . }}
|
||||
{{ partialCached "site-favicon.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .OutputFormats.Get "RSS" }}
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
|
||||
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates */}}
|
||||
{{- template "_internal/opengraph.html" . -}}
|
||||
{{- template "_internal/schema.html" . -}}
|
||||
{{- template "_internal/twitter_cards.html" . -}}
|
||||
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{ end }}
|
||||
{{ block "head" . }}{{ partial "head-additions.html" . }}{{ end }}
|
||||
</head>
|
||||
|
||||
<body class="ma0 {{ $.Param "body_classes" | default "avenir bg-near-white"}}{{ with getenv "HUGO_ENV" }} {{ . }}{{ end }}">
|
||||
|
||||
{{ block "header" . }}{{ partial "site-header.html" .}}{{ end }}
|
||||
<main class="pb7" role="main">
|
||||
{{ block "main" . }}{{ end }}
|
||||
</main>
|
||||
{{ block "footer" . }}{{ partialCached "site-footer.html" . }}{{ end }}
|
||||
</body>
|
||||
</html>
|
3
themes/ananke/layouts/_default/by.html
Normal file
3
themes/ananke/layouts/_default/by.html
Normal file
@ -0,0 +1,3 @@
|
||||
{{- if eq .Lang "de" "en" "es" "fr" "it" "no" "pt" -}}
|
||||
{{- i18n "by" -}}
|
||||
{{ end -}}
|
15
themes/ananke/layouts/_default/list.html
Normal file
15
themes/ananke/layouts/_default/list.html
Normal file
@ -0,0 +1,15 @@
|
||||
{{ define "main" }}
|
||||
<article class="pa3 pa4-ns nested-copy-line-height">
|
||||
<section class="cf ph3 ph5-l pv3 pv4-l f4 tc-l center measure-wide lh-copy {{ $.Param "text_color" | default "mid-gray" }}">
|
||||
{{- .Content -}}
|
||||
</section>
|
||||
<section class="flex-ns flex-wrap justify-around mt5">
|
||||
{{ range .Paginator.Pages }}
|
||||
<div class="relative w-100 w-30-l mb4 bg-white">
|
||||
{{ .Render "summary" }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{- template "_internal/pagination.html" . -}}
|
||||
</article>
|
||||
{{ end }}
|
68
themes/ananke/layouts/_default/single.html
Normal file
68
themes/ananke/layouts/_default/single.html
Normal file
@ -0,0 +1,68 @@
|
||||
{{ define "header" }}
|
||||
{{/* We can override any block in the baseof file be defining it in the template */}}
|
||||
{{ partial "page-header.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
{{ $section := .Site.GetPage "section" .Section }}
|
||||
<article class="flex-l flex-wrap justify-between mw8 center ph3">
|
||||
<header class="mt4 w-100">
|
||||
<aside class="instapaper_ignoref b helvetica tracked">
|
||||
{{/*
|
||||
CurrentSection allows us to use the section title instead of inferring from the folder.
|
||||
https://gohugo.io/variables/page/#section-variables-and-methods
|
||||
*/}}
|
||||
{{with .CurrentSection.Title }}{{. | upper }}{{end}}
|
||||
</aside>
|
||||
{{ partial "social-share.html" . }}
|
||||
<h1 class="f1 athelas mt3 mb1">
|
||||
{{- .Title -}}
|
||||
</h1>
|
||||
{{ with .Params.author | default .Site.Params.author }}
|
||||
<p class="tracked">
|
||||
{{ $.Render "by" }} <strong>
|
||||
{{- if reflect.IsSlice . -}}
|
||||
{{ delimit . ", " | markdownify }}
|
||||
{{- else -}}
|
||||
{{ . | markdownify }}
|
||||
{{- end -}}
|
||||
</strong>
|
||||
</p>
|
||||
{{ end }}
|
||||
{{/* Hugo uses Go's date formatting is set by example. Here are two formats */}}
|
||||
{{ if not .Date.IsZero }}
|
||||
<time class="f6 mv4 dib tracked" {{ printf `datetime="%s"` (.Date.Format "2006-01-02T15:04:05Z07:00") | safeHTMLAttr }}>
|
||||
{{- .Date | time.Format (default "January 2, 2006" .Site.Params.date_format) -}}
|
||||
</time>
|
||||
{{end}}
|
||||
|
||||
{{/*
|
||||
Show "reading time" and "word count" but only if one of the following are true:
|
||||
1) A global config `params` value is set `show_reading_time = true`
|
||||
2) A section front matter value is set `show_reading_time = true`
|
||||
3) A page front matter value is set `show_reading_time = true`
|
||||
*/}}
|
||||
{{ if (or (eq (.Param "show_reading_time") true) (eq $section.Params.show_reading_time true) )}}
|
||||
<span class="f6 mv4 dib tracked"> - {{ i18n "readingTime" .ReadingTime }} </span>
|
||||
<span class="f6 mv4 dib tracked"> - {{ i18n "wordCount" .WordCount }} </span>
|
||||
{{ end }}
|
||||
</header>
|
||||
<div class="nested-copy-line-height lh-copy {{ $.Param "post_content_classes" | default "serif"}} f4 nested-links {{ $.Param "text_color" | default "mid-gray" }} {{ cond (eq $.Site.Language.LanguageDirection "rtl") "pl4-l" "pr4-l" }} w-two-thirds-l">
|
||||
{{- .Content -}}
|
||||
{{- partial "tags.html" . -}}
|
||||
<div class="mt6 instapaper_ignoref">
|
||||
{{ if .Site.DisqusShortname }}
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.commentoEnable }}
|
||||
{{- partial "commento.html" . -}}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<aside class="w-30-l mt6-l">
|
||||
{{- partial "menu-contextual.html" . -}}
|
||||
</aside>
|
||||
|
||||
</article>
|
||||
{{ end }}
|
28
themes/ananke/layouts/_default/summary-with-image.html
Normal file
28
themes/ananke/layouts/_default/summary-with-image.html
Normal file
@ -0,0 +1,28 @@
|
||||
{{ $featured_image := partial "func/GetFeaturedImage.html" . }}
|
||||
<article class="bb b--black-10">
|
||||
<div class="db pv4 ph3 ph0-l no-underline dark-gray">
|
||||
<div class="flex flex-column flex-row-ns">
|
||||
{{ if $featured_image }}
|
||||
{{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}}
|
||||
<div class="{{ cond (eq $.Site.Language.LanguageDirection "rtl") "pl3-ns" "pr3-ns" }} mb4 mb0-ns w-100 w-40-ns">
|
||||
<a href="{{.RelPermalink}}" class="db grow">
|
||||
<img src="{{ $featured_image }}" class="img" alt="image from {{ .Title }}">
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="blah w-100{{ if $featured_image }} w-60-ns {{ cond (eq $.Site.Language.LanguageDirection "rtl") "pr3-ns" "pl3-ns" }}{{ end }}">
|
||||
<h1 class="f3 fw1 athelas mt0 lh-title">
|
||||
<a href="{{.RelPermalink}}" class="color-inherit dim link">
|
||||
{{ .Title }}
|
||||
</a>
|
||||
</h1>
|
||||
<div class="f6 f5-l lh-copy nested-copy-line-height nested-links">
|
||||
{{ .Summary }}
|
||||
</div>
|
||||
<a href="{{.RelPermalink}}" class="ba b--moon-gray bg-light-gray br2 color-inherit dib f7 hover-bg-moon-gray link mt2 ph2 pv1">{{ $.Param "read_more_copy" | default (i18n "readMore") }}</a>
|
||||
{{/* TODO: add author
|
||||
<p class="f6 lh-copy mv0">By {{ .Author }}</p> */}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
13
themes/ananke/layouts/_default/summary.html
Normal file
13
themes/ananke/layouts/_default/summary.html
Normal file
@ -0,0 +1,13 @@
|
||||
<div class="relative w-100 mb4 bg-white nested-copy-line-height">
|
||||
<div class="bg-white mb3 pa4 gray overflow-hidden">
|
||||
{{with .CurrentSection.Title }}<span class="f6 db">{{ . }}</span>{{end}}
|
||||
<h1 class="f3 near-black">
|
||||
<a href="{{ .RelPermalink }}" class="link black dim">
|
||||
{{ .Title }}
|
||||
</a>
|
||||
</h1>
|
||||
<div class="nested-links f5 lh-copy nested-copy-line-height">
|
||||
{{ .Summary }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
16
themes/ananke/layouts/_default/taxonomy.html
Normal file
16
themes/ananke/layouts/_default/taxonomy.html
Normal file
@ -0,0 +1,16 @@
|
||||
{{ define "main" }}
|
||||
<article class="cf pa3 pa4-m pa4-l">
|
||||
<div class="measure-wide-l center f4 lh-copy nested-copy-line-height nested-links {{ $.Param "text_color" | default "mid-gray" }}">
|
||||
<p>{{ i18n "taxonomyPageList" . }}</p>
|
||||
</div>
|
||||
</article>
|
||||
<div class="mw8 center">
|
||||
<section class="flex-ns flex-wrap justify-around mt5">
|
||||
{{ range .Pages }}
|
||||
<div class="relative w-100 mb4 bg-white">
|
||||
{{ .Render "summary" }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</section>
|
||||
</div>
|
||||
{{ end }}
|
22
themes/ananke/layouts/_default/terms.html
Normal file
22
themes/ananke/layouts/_default/terms.html
Normal file
@ -0,0 +1,22 @@
|
||||
{{ define "main" }}
|
||||
{{ $data := .Data }}
|
||||
<article class="cf pa3 pa4-m pa4-l">
|
||||
<div class="measure-wide-l center f4 lh-copy nested-copy-line-height nested-links {{ $.Param "text_color" | default "mid-gray" }}">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
<div class="mw8 center">
|
||||
<section class="ph4">
|
||||
{{ range $term := .Data.Pages }}
|
||||
<h2 class="f1">
|
||||
<a href="{{ $term.RelPermalink }}" class="link blue hover-black">
|
||||
{{ $.Data.Singular | humanize }}: {{ $term.LinkTitle }}
|
||||
</a>
|
||||
</h2>
|
||||
{{ range $term.Pages }}
|
||||
{{ .Render "summary" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
</div>
|
||||
{{ end }}
|
Reference in New Issue
Block a user