diff options
author | William Carroll <wpcarro@gmail.com> | 2020-03-09T13·31+0000 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-03-09T13·31+0000 |
commit | 6e4c721be5fd3483da7fa3de4b85659552494a49 (patch) | |
tree | e44d93b1fffaf1aaee47e46fde35924f6650c88a /blog/themes/tailwind/layouts/_default | |
parent | d206a2812fc07e9ae8af016d3dc9d24a8bcf0508 (diff) | |
parent | 2cf446f4ef7bdcc4303ebcb0a3062e87cde4928b (diff) |
Add 'blog/themes/tailwind/' from commit '2cf446f4ef7bdcc4303ebcb0a3062e87cde4928b'
git-subtree-dir: blog/themes/tailwind git-subtree-mainline: d206a2812fc07e9ae8af016d3dc9d24a8bcf0508 git-subtree-split: 2cf446f4ef7bdcc4303ebcb0a3062e87cde4928b
Diffstat (limited to 'blog/themes/tailwind/layouts/_default')
-rw-r--r-- | blog/themes/tailwind/layouts/_default/baseof.html | 86 | ||||
-rw-r--r-- | blog/themes/tailwind/layouts/_default/list.html | 7 | ||||
-rw-r--r-- | blog/themes/tailwind/layouts/_default/single.html | 28 |
3 files changed, 121 insertions, 0 deletions
diff --git a/blog/themes/tailwind/layouts/_default/baseof.html b/blog/themes/tailwind/layouts/_default/baseof.html new file mode 100644 index 000000000000..2e32b753720a --- /dev/null +++ b/blog/themes/tailwind/layouts/_default/baseof.html @@ -0,0 +1,86 @@ +<!doctype html> +<html lang="{{ .Site.Params.LanguageCode }}"> + +<head> + <meta charset="utf-8"> + {{ hugo.Generator }} + + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + + <!-- Twitter Card --> + <meta name="twitter:card" content="summary"> + <meta name="twitter:title" content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} - {{ .Site.Title }}{{ end }}"> + <meta name="twitter:description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Summary | plainify }}{{ end }}"> + <meta name="twitter:site" content="{{ .Site.BaseURL }}"> + <meta name="twitter:creator" content="{{ .Params.Author }}"> + <meta name="twitter:image" content="{{ .Site.Params.Avatar | absURL }}"> + + <!-- Open-Graph Data --> + <meta property="og:locale" content="{{ .Site.Params.LanguageCode }}"> + <meta property="og:type" content="{{ if .IsHome }}website{{ else }}article{{ end }}"> + <meta property="og:title" content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} - {{ .Site.Title }}{{ end }}"> + <meta property="og:description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Summary | plainify }}{{ end }}"> + <meta property="og:url" content="{{ .Permalink }}"> + <meta property="og:site_name" content="{{ .Site.Title }}"> + <meta property="og:image" content="{{ .Site.Params.Avatar | absURL }}"> + + <title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} - {{ .Site.Title }}{{ end }}</title> + + <meta name="author" content="{{ .Site.Params.Author }}"> + <meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Summary | plainify }}{{ end }}"> + + <!-- RSS --> + {{ with .OutputFormats.Get "RSS" }} + <link rel="alternate" href="{{ .RelPermalink | absURL }}" type="application/rss+xml" title="{{ $.Site.Title }}"> + {{ end }} + + <!-- Translations --> + {{ if .IsTranslated }} + {{ range .Translations }} + <link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}" title="{{ .Site.Title }}"> + {{ end }} + {{ end }} + + <!-- Stylesheets --> + <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Code+Pro|Arvo:400,700"> + <link rel="stylesheet" href="{{ "css/theme.css" | absURL }}"> + <link rel="stylesheet" href="{{ "css/chroma.dracula.css" | absURL }}"> +</head> +<body class="font-serif bg-gray-200 border-t-4 border-blue-500 antialiased"> + <div class="w-full p-6 md:w-2/3 md:px-0 md:mx-auto xl:w-2/5"> + <header class="mb-6"> + <!-- All the pages must have a heading block, defaults to a link for the home page and a title. --> + <div class="mb-6 md:flex md:items-center"> + {{ block "heading" . }} + <div> + {{ partial "back-home.html" . }} + <h1 class="text-4xl font-bold">{{ .Title }}</h1> + </div> + {{ end }} + </div> + + <!-- If the blog has translation, they shoul be displayed here. --> + {{ if .IsTranslated }} + <nav> + {{ range $i, $lang := .Translations }} + {{ if $i }}/{{ end }} + <a href="{{ .Permalink }}">{{ $lang.Language.LanguageName }}</a> + {{ end}} + </nav> + {{ end }} + </header> + + <!-- The content block. --> + {{ block "content" . }}{{ end }} + + <footer> + <p> + © {{ now.Format "2006"}}. Proudly made with 💕 with <a href="https://gohugo.io/" target="_blank">Hugo</a> and <a href="https://tailwindcss.com/" target="_blank">TailwindCSS</a>. + </p> + </footer> + </div> + + {{ template "_internal/google_analytics.html" . }} +</body> +</html> diff --git a/blog/themes/tailwind/layouts/_default/list.html b/blog/themes/tailwind/layouts/_default/list.html new file mode 100644 index 000000000000..d781ce752a4a --- /dev/null +++ b/blog/themes/tailwind/layouts/_default/list.html @@ -0,0 +1,7 @@ +{{ define "content" }} +<section class="mb-24"> + {{ range site.RegularPages.GroupByDate "2006" -}} + {{ partial "posts.html" . }} + {{ end }} +</section> +{{ end }} diff --git a/blog/themes/tailwind/layouts/_default/single.html b/blog/themes/tailwind/layouts/_default/single.html new file mode 100644 index 000000000000..e4485f324e9c --- /dev/null +++ b/blog/themes/tailwind/layouts/_default/single.html @@ -0,0 +1,28 @@ +{{ define "heading" }} +<div> + {{ partial "back-home.html" . }} + + <!-- Title and Publication Date --> + <h1 class="text-4xl font-bold">{{ .Title }}</h1> + <time datetime="{{ .Date.Format "2006-01-02 15:04:05 MST" }}">{{ .Date.Format "02 Jan 2006" }}</time> + + <!-- Tags --> + {{ with .Params.tags }} + <ol class="mt-4"> + {{ range . }} + <li class="inline-block"> + <a class="border-none text-gray-800 text-xs bg-gray-400 hover:bg-gray-600 hover:text-white rounded-sm px-3 py-1" href="{{ "tags" | absURL }}/{{ . | urlize }}">{{ . }}</a> + </li> + {{ end }} + </ol> + {{ end }} +</div> +{{ end }} + +{{ define "content" }} +<article class="mb-12"> + {{ .Content }} + + {{ template "_internal/disqus.html" . }} +</article> +{{ end }} |