about summary refs log tree commit diff
path: root/users/wpcarro/website/blog/themes/tailwind/layouts
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-12-13T22·51+0300
committerVincent Ambo <mail@tazj.in>2021-12-13T23·15+0300
commit019f8fd2113df4c5247c3969c60fd4f0e08f91f7 (patch)
tree76a857f61aa88f62a30e854651e8439db77fd0ea /users/wpcarro/website/blog/themes/tailwind/layouts
parent464bbcb15c09813172c79820bcf526bb10cf4208 (diff)
parent6123e976928ca3d8d93f0b2006b10b5f659eb74d (diff)
subtree(users/wpcarro): docking briefcase at '24f5a642' r/3226
git-subtree-dir: users/wpcarro
git-subtree-mainline: 464bbcb15c09813172c79820bcf526bb10cf4208
git-subtree-split: 24f5a642af3aa1627bbff977f0a101907a02c69f
Change-Id: I6105b3762b79126b3488359c95978cadb3efa789
Diffstat (limited to 'users/wpcarro/website/blog/themes/tailwind/layouts')
-rw-r--r--users/wpcarro/website/blog/themes/tailwind/layouts/404.html12
-rw-r--r--users/wpcarro/website/blog/themes/tailwind/layouts/_default/baseof.html87
-rw-r--r--users/wpcarro/website/blog/themes/tailwind/layouts/_default/list.html7
-rw-r--r--users/wpcarro/website/blog/themes/tailwind/layouts/_default/single.html28
-rw-r--r--users/wpcarro/website/blog/themes/tailwind/layouts/index.html18
-rw-r--r--users/wpcarro/website/blog/themes/tailwind/layouts/partials/back-home.html1
-rw-r--r--users/wpcarro/website/blog/themes/tailwind/layouts/partials/posts.html12
-rw-r--r--users/wpcarro/website/blog/themes/tailwind/layouts/taxonomy/terms.html13
8 files changed, 178 insertions, 0 deletions
diff --git a/users/wpcarro/website/blog/themes/tailwind/layouts/404.html b/users/wpcarro/website/blog/themes/tailwind/layouts/404.html
new file mode 100644
index 000000000000..afa69fec743e
--- /dev/null
+++ b/users/wpcarro/website/blog/themes/tailwind/layouts/404.html
@@ -0,0 +1,12 @@
+{{ define "heading"}}
+<div>
+    <a class="text-lg mb-8 inline-block" href="{{ .Site.BaseURL | relLangURL }}">&larr; {{ i18n "back_home" }}</a>
+    <h1 class="text-4xl font-bold">{{ i18n "not_found_page_title" }}</h1>
+</div>
+{{ end }}
+
+{{ define "content" }}
+<section class="mb-24">
+    <img src="{{ "images/404-background.png" | relURL }}" alt="Page Not Found">
+</section>
+{{ end }}
diff --git a/users/wpcarro/website/blog/themes/tailwind/layouts/_default/baseof.html b/users/wpcarro/website/blog/themes/tailwind/layouts/_default/baseof.html
new file mode 100644
index 000000000000..2cc783dae038
--- /dev/null
+++ b/users/wpcarro/website/blog/themes/tailwind/layouts/_default/baseof.html
@@ -0,0 +1,87 @@
+<!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 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>
+                &copy; {{ now.Format "2006"}}. Thank you for reading.
+            </p>
+        </footer>
+    </div>
+
+    {{ template "_internal/google_analytics.html" . }}
+    <script data-ad-client="ca-pub-6018268443649487" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
+</body>
+</html>
diff --git a/users/wpcarro/website/blog/themes/tailwind/layouts/_default/list.html b/users/wpcarro/website/blog/themes/tailwind/layouts/_default/list.html
new file mode 100644
index 000000000000..d781ce752a4a
--- /dev/null
+++ b/users/wpcarro/website/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/users/wpcarro/website/blog/themes/tailwind/layouts/_default/single.html b/users/wpcarro/website/blog/themes/tailwind/layouts/_default/single.html
new file mode 100644
index 000000000000..e4485f324e9c
--- /dev/null
+++ b/users/wpcarro/website/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 }}
diff --git a/users/wpcarro/website/blog/themes/tailwind/layouts/index.html b/users/wpcarro/website/blog/themes/tailwind/layouts/index.html
new file mode 100644
index 000000000000..4869c466b613
--- /dev/null
+++ b/users/wpcarro/website/blog/themes/tailwind/layouts/index.html
@@ -0,0 +1,18 @@
+{{ define "heading" }}
+{{ if .Site.Params.Avatar }}
+<img class="hidden md:block w-20 rounded-full mr-6" src="{{ .Site.Params.Avatar | absURL }}" alt="{{ .Site.Params.Author }}">
+{{ end }}
+
+<div>
+    <h1 class="text-4xl font-bold">{{ .Site.Title }}</h1>
+    <p>{{ .Site.Params.tagline }}</p>
+</div>
+{{ end }}
+
+{{ define "content" }}
+<section class="mb-24">
+    {{ range site.RegularPages.GroupByDate "2006" -}}
+        {{ partial "posts.html" . }}
+    {{ end }}
+</section>
+{{ end }}
diff --git a/users/wpcarro/website/blog/themes/tailwind/layouts/partials/back-home.html b/users/wpcarro/website/blog/themes/tailwind/layouts/partials/back-home.html
new file mode 100644
index 000000000000..4064d5256137
--- /dev/null
+++ b/users/wpcarro/website/blog/themes/tailwind/layouts/partials/back-home.html
@@ -0,0 +1 @@
+<a class="text-lg mb-8 inline-block" href="{{ .Site.BaseURL | relLangURL }}">&larr; {{ i18n "back_home" }}</a>
diff --git a/users/wpcarro/website/blog/themes/tailwind/layouts/partials/posts.html b/users/wpcarro/website/blog/themes/tailwind/layouts/partials/posts.html
new file mode 100644
index 000000000000..0ebd4ca7e9b4
--- /dev/null
+++ b/users/wpcarro/website/blog/themes/tailwind/layouts/partials/posts.html
@@ -0,0 +1,12 @@
+<div>
+    <h2 class="text-3xl font-bold mb-2">{{ .Key }}</h2>
+
+    <ol>
+        {{ range .Pages -}}
+        <li class="mb-6 md:flex md:flex-row">
+            <time class=" block md:flex-l-24" datetime="{{ .Date.Format "2006-01-02 15:04:05 MST" }}">{{ .Date.Format "Jan 02"}}</time>
+            <a class="text-lg md:ml-12" href="{{ .RelPermalink }}">{{ .Title }}</a>
+        </li>
+        {{- end }}
+    </ol>
+</div>
diff --git a/users/wpcarro/website/blog/themes/tailwind/layouts/taxonomy/terms.html b/users/wpcarro/website/blog/themes/tailwind/layouts/taxonomy/terms.html
new file mode 100644
index 000000000000..76da49ed0a09
--- /dev/null
+++ b/users/wpcarro/website/blog/themes/tailwind/layouts/taxonomy/terms.html
@@ -0,0 +1,13 @@
+{{ define "content" }}
+<section class="mb-24">
+    <ol class="-mx-2">
+        {{ range .Pages -}}
+        <li class="inline-block mx-2 my-2">
+            <a class="border-none text-gray-800 bg-gray-400 hover:bg-gray-600 hover:text-white rounded-sm px-3 py-1" href="{{ .RelPermalink }}">
+                {{ .Title }}
+            </a>
+        </li>
+        {{- end }}
+    </ol>
+</section>
+{{ end }}