about summary refs log tree commit diff
path: root/users/fcuny/blog/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'users/fcuny/blog/layouts')
-rw-r--r--users/fcuny/blog/layouts/_default/baseof.html11
-rw-r--r--users/fcuny/blog/layouts/_default/list.html10
-rw-r--r--users/fcuny/blog/layouts/_default/single.html54
-rw-r--r--users/fcuny/blog/layouts/index.atom.xml24
-rw-r--r--users/fcuny/blog/layouts/index.html20
-rw-r--r--users/fcuny/blog/layouts/partials/footer.html32
-rw-r--r--users/fcuny/blog/layouts/partials/head.html18
-rw-r--r--users/fcuny/blog/layouts/partials/header.html10
-rw-r--r--users/fcuny/blog/layouts/partials/postlist.html12
-rw-r--r--users/fcuny/blog/layouts/taxonomy/tag.html6
10 files changed, 197 insertions, 0 deletions
diff --git a/users/fcuny/blog/layouts/_default/baseof.html b/users/fcuny/blog/layouts/_default/baseof.html
new file mode 100644
index 0000000..410e2bc
--- /dev/null
+++ b/users/fcuny/blog/layouts/_default/baseof.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<html lang="en">
+  {{ partial "head.html" . }}
+  <body>
+    {{- partial "header.html" . -}}
+    <main>
+     {{ block "main" . }}{{ end }}
+    </main>
+    {{- partial "footer.html" . -}}
+  </body>
+</html>
diff --git a/users/fcuny/blog/layouts/_default/list.html b/users/fcuny/blog/layouts/_default/list.html
new file mode 100644
index 0000000..d2c59a7
--- /dev/null
+++ b/users/fcuny/blog/layouts/_default/list.html
@@ -0,0 +1,10 @@
+{{ define "main" }}
+
+<article>
+
+  {{ $pgs := where .Data.Pages "Params.hidden" "ne" "true" }}
+  {{ partial "postlist" $pgs }}
+
+</article>
+
+{{ end }}
diff --git a/users/fcuny/blog/layouts/_default/single.html b/users/fcuny/blog/layouts/_default/single.html
new file mode 100644
index 0000000..7a85a05
--- /dev/null
+++ b/users/fcuny/blog/layouts/_default/single.html
@@ -0,0 +1,54 @@
+{{ define "main" }}
+
+<div>
+
+<h1>{{ .Title }}</h1>
+
+<div id="meta">
+  {{- $pub := .Date.Format "Jan 2, 2006" -}}
+  {{- $mod := "" -}}
+  {{- if (not .GitInfo) }}
+  {{- $mod = .Lastmod.Format "Jan 2, 2006" -}}
+  {{ else }}
+  {{- $mod = .Page.GitInfo.CommitDate.Format "Jan 2, 2006" -}}
+  {{ end -}}
+  {{ if eq $pub $mod }}
+  <div id="meta_date">published {{ $pub }}</div>
+  {{ else }}
+  <div id="meta_date">published {{ $pub }} - last modified {{ $mod }}</div>
+  {{ end }}
+  {{ if .Params.tags }}
+  <div>
+  {{ if eq (len .Params.tags) 1 }}
+  tag:
+  {{ else }}
+  tags:
+  {{ end }}
+  {{ range $idx, $tag := .Params.tags }}
+  <span id="meta_tags"><a href="/tags/{{ $tag | urlize }}/">{{ $tag }}</a></span>
+  {{ end }}
+  </div>
+  {{ end }}
+</div>
+
+{{ if .Params.toc }}
+<div id="toc_small">
+  <summary>Table of contents</summary>
+  {{ .TableOfContents }}
+</div>
+{{ end }}
+
+<article>
+{{ .Content }}
+</article>
+
+</div>
+
+{{ if .Params.toc }}
+<div id="toc">
+  <strong>Table of contents</strong>
+  {{ .TableOfContents }}
+</div>
+{{ end }}
+
+{{ end }}
diff --git a/users/fcuny/blog/layouts/index.atom.xml b/users/fcuny/blog/layouts/index.atom.xml
new file mode 100644
index 0000000..1d73f9b
--- /dev/null
+++ b/users/fcuny/blog/layouts/index.atom.xml
@@ -0,0 +1,24 @@
+<feed xmlns="http://www.w3.org/2005/Atom">
+  <title>{{ .Site.Title }}</title>
+  <link href="{{ .Permalink }}feed.xml" rel="self"/>
+  <link href="{{ .Permalink }}"/>
+  <id>{{ .Permalink }}</id>{{ with .Site.Author.name }}
+  <author>
+    <name>{{.}}</name>{{ with $.Site.Author.email }}
+    <email>{{.}}</email>{{end}}
+  </author>{{end}}
+  <generator>Hugo -- gohugo.io</generator>
+  {{ range where (first 10 (where .Site.Pages "Section" "blog")) "Params.hidden" "ne" "true" }}
+  <entry>
+    {{ `<title type="html"><![CDATA[` | safeHTML }}{{ .Title }}]]></title>
+    <link href="{{ .Permalink }}"/>
+    <id>{{ .Permalink }}</id>{{ with .Site.Params.Author }}
+    <author>
+      <name>{{.}}</name>
+    </author>{{end}}
+    {{- $fmt := "2006-01-02T15:04:05-07:00" }}
+    <published>{{ .Date.Format $fmt | safeHTML }}</published>
+    {{ `<content type="html"><![CDATA[` | safeHTML }}{{ .Content }}]]></content>
+  </entry>
+  {{ end }}
+</feed>
diff --git a/users/fcuny/blog/layouts/index.html b/users/fcuny/blog/layouts/index.html
new file mode 100644
index 0000000..38520ef
--- /dev/null
+++ b/users/fcuny/blog/layouts/index.html
@@ -0,0 +1,20 @@
+{{ define "main" }}
+
+<article>
+
+  <p>I'm a Principal SRE, currently working at <a href="https://www.roblox.com/" target="_blank">Roblox</a>. Previously I worked at <a href="https://twitter.com/TwitterEng" target="_blank">Twitter</a> for over 7 years, and my main focus was on Twitter's compute platform.</p>
+
+  <p>My general interests are in building sustainable teams, improving the management and operation of large infrastructure, and work with different teams to implement best practices around reliability and security.</p>
+
+  <h2>Posts</h2>
+  <ul>
+  {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
+  {{ range $pages }}
+  {{- $fmt := "2006-01-02" }}
+  <li class="post-permalink"><span class="post-date" >{{ .Date.Format $fmt | safeHTML }}</span>, <a href="{{ .Permalink }}">{{ .Title }}</a></li>
+  {{ end }}
+  </ul>
+
+</article>
+
+{{ end }}
diff --git a/users/fcuny/blog/layouts/partials/footer.html b/users/fcuny/blog/layouts/partials/footer.html
new file mode 100644
index 0000000..e2bf7ab
--- /dev/null
+++ b/users/fcuny/blog/layouts/partials/footer.html
@@ -0,0 +1,32 @@
+<footer>
+  <a href="mailto:franck@fcuny.net" title="franck@fcuny.net">
+    <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-envelope-fill" viewBox="0 0 20 20">
+      <path d="M.05 3.555A2 2 0 0 1 2 2h12a2 2 0 0 1 1.95 1.555L8 8.414.05 3.555ZM0 4.697v7.104l5.803-3.558L0 4.697ZM6.761 8.83l-6.57 4.027A2 2 0 0 0 2 14h12a2 2 0 0 0 1.808-1.144l-6.57-4.027L8 9.586l-1.239-.757Zm3.436-.586L16 11.801V4.697l-5.803 3.546Z"/>
+    </svg>
+  </a>
+
+  <a target="_blank" href="https://git.fcuny.net/fcuny" title="git.fcuny.net">
+    <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-git" viewBox="0 0 20 20">
+      <path d="M15.698 7.287 8.712.302a1.03 1.03 0 0 0-1.457 0l-1.45 1.45 1.84 1.84a1.223 1.223 0 0 1 1.55 1.56l1.773 1.774a1.224 1.224 0 0 1 1.267 2.025 1.226 1.226 0 0 1-2.002-1.334L8.58 5.963v4.353a1.226 1.226 0 1 1-1.008-.036V5.887a1.226 1.226 0 0 1-.666-1.608L5.093 2.465l-4.79 4.79a1.03 1.03 0 0 0 0 1.457l6.986 6.986a1.03 1.03 0 0 0 1.457 0l6.953-6.953a1.031 1.031 0 0 0 0-1.457"/>
+    </svg>
+  </a>
+
+  <a target="_blank" href="https://twitter.com/franckcuny" title="@franckcuny">
+    <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-twitter" viewBox="0 0 20 20">
+      <path d="M5.026 15c6.038 0 9.341-5.003 9.341-9.334 0-.14 0-.282-.006-.422A6.685 6.685 0 0 0 16 3.542a6.658 6.658 0 0 1-1.889.518 3.301 3.301 0 0 0 1.447-1.817 6.533 6.533 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.325 9.325 0 0 1-6.767-3.429 3.289 3.289 0 0 0 1.018 4.382A3.323 3.323 0 0 1 .64 6.575v.045a3.288 3.288 0 0 0 2.632 3.218 3.203 3.203 0 0 1-.865.115 3.23 3.23 0 0 1-.614-.057 3.283 3.283 0 0 0 3.067 2.277A6.588 6.588 0 0 1 .78 13.58a6.32 6.32 0 0 1-.78-.045A9.344 9.344 0 0 0 5.026 15z"/>
+    </svg>
+  </a>
+
+  <a href="/ssh.pub.sig" title="SSH public keys">
+    <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-filetype-key" viewBox="0 0 20 20">
+      <path fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM3.21 11.85h-.87L.83 13.64H.79v-1.79H0v3.999h.791v-1.283l.41-.466 1.12 1.749h.951l-1.488-2.276 1.427-1.723Zm2.903 3.352h-1.79v-1.073h1.685v-.606H4.323v-1.025h1.79v-.648H3.538v3.999h2.575v-.647Zm2.243-.888v1.535h-.794v-1.52L6.223 11.85H7.1l.853 1.696h.032l.855-1.696h.856l-1.339 2.464Z"/>
+    </svg>
+  </a>
+
+  <a href="/feed.xml" title="atom feed">
+    <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-rss-fill" viewBox="0 0 20 20">
+      <path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm1.5 2.5c5.523 0 10 4.477 10 10a1 1 0 1 1-2 0 8 8 0 0 0-8-8 1 1 0 0 1 0-2zm0 4a6 6 0 0 1 6 6 1 1 0 1 1-2 0 4 4 0 0 0-4-4 1 1 0 0 1 0-2zm.5 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/>
+    </svg>
+  </a>
+
+</footer>
diff --git a/users/fcuny/blog/layouts/partials/head.html b/users/fcuny/blog/layouts/partials/head.html
new file mode 100644
index 0000000..7de4fd4
--- /dev/null
+++ b/users/fcuny/blog/layouts/partials/head.html
@@ -0,0 +1,18 @@
+<head>
+  <meta charset="utf-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+
+  <link rel="canonical" href="{{ .Permalink }}">
+
+  {{ $css := "/css/custom.css"  }}
+  <link rel="stylesheet" href="{{ $css }}">
+  <link rel="alternate" href="{{ "/feed.xml" | relURL }}" type="application/atom+xml" title="ATOM feed">
+  <link rel="author" href="humans.txt" />
+
+  <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🖥️</text></svg>">
+
+  <meta name="description" content="Franck Cuny's website, with articles about computers stuff.">
+  <meta name="author" content="Franck Cuny">
+
+  <title>{{ .Title }}</title>
+</head>
diff --git a/users/fcuny/blog/layouts/partials/header.html b/users/fcuny/blog/layouts/partials/header.html
new file mode 100644
index 0000000..65900eb
--- /dev/null
+++ b/users/fcuny/blog/layouts/partials/header.html
@@ -0,0 +1,10 @@
+<header>
+  <nav class="navbar">
+    <a class="nav-bold" href="{{ .Site.BaseURL }}">~/blog</a>
+    <ul class="nav-links">
+      {{ range .Site.Menus.main }}
+      <li class="nav-item"><a class="nav-bold" href="{{ absURL .URL }}">{{ .Title }}</a></li>
+      {{ end }}
+    </ul>
+  </nav>
+</header>
diff --git a/users/fcuny/blog/layouts/partials/postlist.html b/users/fcuny/blog/layouts/partials/postlist.html
new file mode 100644
index 0000000..3d5cf04
--- /dev/null
+++ b/users/fcuny/blog/layouts/partials/postlist.html
@@ -0,0 +1,12 @@
+{{ range .GroupByDate "2006" }}
+  <h2>{{ .Key }}</h2>
+  <ul>
+    {{ range .Pages.ByDate.Reverse }}
+    <li>
+      <div>
+        <a href="{{ .Permalink }}">{{ .Title }}</a>
+      </div>
+    </li>
+    {{ end }}
+  </ul>
+{{ end }}
diff --git a/users/fcuny/blog/layouts/taxonomy/tag.html b/users/fcuny/blog/layouts/taxonomy/tag.html
new file mode 100644
index 0000000..2b7d98a
--- /dev/null
+++ b/users/fcuny/blog/layouts/taxonomy/tag.html
@@ -0,0 +1,6 @@
+{{ define "main" }}
+
+  {{ $pgs := where .Data.Pages "Params.hidden" "ne" "true" }}
+  {{ partial "postlist" $pgs }}
+
+{{ end }}