all: add the work page and Portuguese translations
Pedro Lucas Porcellis porcellis@eletrotupi.com · 1 month ago
a038d85870abfa5840f549c944fe88149c867b17 Browse filesParents
c127a41Changed files
18
Additions
+540
Deletions
-21
assets/main.scss
1 1
@import 'fonts.scss';
2 2
3 3
$font-size-2: 19px;
4 4
5 5
$landing-size-value: 2.2;
111 111
}
112 112
}
113 113
}
114 114
}
115 115
116 +
.header-actions {
117 +
display: flex;
118 +
align-items: center;
119 +
gap: 1rem;
120 +
margin-left: 2.5vw;
121 +
}
122 +
123 +
.language-switcher {
124 +
display: flex;
125 +
align-items: center;
126 +
gap: 0.4rem;
127 +
font-family: sans-serif;
128 +
font-size: 0.8rem;
129 +
font-weight: 700;
130 +
131 +
a {
132 +
color: var(--color-muted);
133 +
text-decoration: none;
134 +
135 +
&:hover {
136 +
color: var(--color-accent);
137 +
}
138 +
}
139 +
140 +
.is-current {
141 +
color: var(--color-text);
142 +
}
143 +
}
144 +
145 +
.language-sep {
146 +
color: var(--color-faint);
147 +
}
148 +
116 149
.theme-toggle {
117 150
display: inline-flex;
118 151
align-items: center;
119 152
justify-content: center;
120 -
margin-left: 2.5vw;
121 153
padding: 0.25rem;
122 154
border: 0;
123 155
border-radius: 4px;
124 156
background: none;
125 157
color: var(--color-accent);
306 338
color: var(--color-muted);
307 339
font-family: sans-serif;
308 340
font-size: 0.8rem;
309 341
}
310 342
343 +
.work-intro {
344 +
margin-bottom: 2.5rem;
345 +
}
346 +
347 +
.work-blurb p {
348 +
color: var(--color-muted);
349 +
}
350 +
351 +
.project-list {
352 +
margin: 0;
353 +
padding: 0;
354 +
list-style: none;
355 +
}
356 +
357 +
.project {
358 +
display: grid;
359 +
grid-template-columns: 2.5rem minmax(0, 1fr) auto 1.5rem;
360 +
gap: 1rem;
361 +
align-items: start;
362 +
padding: 1.25rem 0;
363 +
border-top: 1px solid var(--color-rule);
364 +
}
365 +
366 +
.project:last-child {
367 +
border-bottom: 1px solid var(--color-rule);
368 +
}
369 +
370 +
.project-index {
371 +
padding-top: 0.2rem;
372 +
color: var(--color-muted);
373 +
font-family: sans-serif;
374 +
font-size: 0.8rem;
375 +
}
376 +
377 +
.project-name {
378 +
margin: 0;
379 +
font-size: 1.15rem;
380 +
}
381 +
382 +
.project-name a {
383 +
text-decoration: none;
384 +
}
385 +
386 +
.project-name a:hover {
387 +
text-decoration: underline;
388 +
}
389 +
390 +
.project-blurb {
391 +
margin: 0.35rem 0 0;
392 +
color: var(--color-muted);
393 +
font-size: 0.9rem;
394 +
}
395 +
396 +
.project-links {
397 +
display: flex;
398 +
flex-wrap: wrap;
399 +
gap: 0.75rem;
400 +
margin: 0.5rem 0 0;
401 +
padding: 0;
402 +
list-style: none;
403 +
font-family: sans-serif;
404 +
font-size: 0.75rem;
405 +
}
406 +
407 +
.project-tags {
408 +
display: flex;
409 +
flex-wrap: wrap;
410 +
gap: 0.35rem;
411 +
margin: 0;
412 +
padding: 0;
413 +
list-style: none;
414 +
}
415 +
416 +
.project-tags li {
417 +
padding: 0.15rem 0.35rem;
418 +
border: 1px solid var(--color-rule);
419 +
border-radius: 3px;
420 +
color: var(--color-muted);
421 +
font-family: sans-serif;
422 +
font-size: 0.65rem;
423 +
letter-spacing: 0.06em;
424 +
text-transform: uppercase;
425 +
}
426 +
427 +
.project-arrow {
428 +
color: var(--color-accent);
429 +
font-size: 1.2rem;
430 +
line-height: 1;
431 +
432 +
svg {
433 +
display: block;
434 +
width: 1em;
435 +
height: 1em;
436 +
fill: none;
437 +
stroke: currentColor;
438 +
stroke-width: 1.5;
439 +
stroke-linecap: round;
440 +
stroke-linejoin: round;
441 +
}
442 +
}
443 +
444 +
@media (max-width: 640px) {
445 +
.project {
446 +
grid-template-columns: 2rem minmax(0, 1fr);
447 +
}
448 +
449 +
.project-tags {
450 +
grid-column: 2;
451 +
}
452 +
453 +
.project-arrow {
454 +
display: none;
455 +
}
456 +
}
457 +
311 458
.landing p {
312 459
font-style: normal;
313 460
font-size: calc(calc(#{$landing-size-value} - 1) * calc(.012 * min(100vh, 900px)) + 1rem);
314 461
font-weight: 400;
315 462
line-height: calc(#{$landing-line-height} * (1 + (1 - #{$landing-size-value})/25));
326 473
width: 100%;
327 474
margin-top: 0.75rem;
328 475
padding-left: 0;
329 476
}
330 477
331 -
header .theme-toggle {
478 +
.header-actions {
332 479
margin-left: auto;
333 480
}
334 481
}
/dev/null → content/_index.pt-br.md
1 +
---
2 +
title: cabotiá?
3 +
---
4 +
5 +
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas sollicitudin
6 +
aliquam varius. Aenean varius libero ut metus fringilla, vitae tristique nibh
7 +
rhoncus. Vestibulum a massa at lectus semper facilisis. Nulla facilisi. Donec eu
8 +
tempor lectus. Suspendisse vitae metus at enim egestas venenatis. Etiam varius
9 +
nisl dolor, nec auctor lectus rhoncus et. Donec nunc lorem, tincidunt in iaculis
10 +
a, porta nec sem. In hac habitasse platea dictumst. Maecenas sagittis viverra
11 +
elit vitae blandit. Nunc pulvinar a risus ac viverra. Pellentesque at volutpat
12 +
metus, a vehicula dui. Ut at eros nulla. Morbi et justo nec purus eleifend
13 +
lacinia.
14 +
15 +
Vestibulum nec ipsum sed neque facilisis ornare. Donec pharetra velit neque, sed
16 +
convallis erat lacinia id. Donec ipsum libero, ultricies et augue in, elementum
17 +
aliquet arcu. Integer sapien sem, faucibus a aliquet vel, posuere id quam.
18 +
Phasellus consequat felis sapien, quis laoreet sapien scelerisque vitae.
19 +
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac
20 +
turpis egestas. Duis sit amet nibh id est mattis gravida nec a purus.
21 +
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac
22 +
turpis egestas. Fusce ultricies risus felis, non pulvinar ante vestibulum at.
23 +
Morbi sit amet ex libero. Cras in ornare nibh, a efficitur erat. Cras volutpat
24 +
eu sem in tincidunt.
25 +
26 +
Mauris ut sem eu enim blandit maximus. Phasellus vel augue elementum, fermentum
27 +
libero at, venenatis dolor. Cras posuere aliquam metus ut iaculis. Vivamus orci
28 +
nisi, iaculis non metus non, varius ultricies eros. Sed scelerisque mi eget
29 +
sapien luctus, sed maximus dolor faucibus. Etiam consectetur eros massa, eget
30 +
iaculis arcu hendrerit nec. Integer bibendum tincidunt augue, eget efficitur
31 +
magna consectetur in. Vestibulum ac pulvinar elit. Suspendisse a diam felis.
32 +
Donec ut dapibus enim. Vestibulum vel ultrices sapien, at blandit urna. Duis
33 +
rutrum urna eget lobortis rutrum. Pellentesque tortor risus, pellentesque sed
34 +
suscipit non, rhoncus at velit. Nulla pulvinar neque id tellus facilisis, sit
35 +
amet ultricies est ultrices. Nam in ex magna. Quisque at euismod nunc, eget
36 +
tristique nisi.
37 +
38 +
Nam nibh urna, tempor eu fermentum feugiat, facilisis eu sapien. Suspendisse ac
39 +
mauris mauris. Morbi a neque turpis. Suspendisse consectetur, arcu et tincidunt
40 +
lacinia, lectus metus pretium nisl, vel euismod massa enim at leo. Fusce nec
41 +
finibus nibh. Curabitur hendrerit scelerisque quam eget posuere. Ut condimentum
42 +
turpis ac massa egestas bibendum. Nullam malesuada euismod nunc at lacinia.
43 +
44 +
Suspendisse justo quam, porta et tempor hendrerit, consectetur quis ante. Donec
45 +
eleifend, est non dignissim rhoncus, nibh libero sollicitudin ex, a varius neque
46 +
ligula eget nisl. Nulla at pulvinar sapien. Curabitur tempor nec lacus ut
47 +
auctor. Donec dictum justo et dolor sagittis, eu laoreet urna hendrerit. Nullam
48 +
porttitor et diam interdum malesuada. Mauris ultrices aliquam eros quis tempor.
49 +
Suspendisse potenti. Praesent dictum lacus eget ultricies venenatis. Donec velit
50 +
est, placerat at eros id, tristique varius erat. Phasellus vehicula massa neque,
51 +
sit amet scelerisque tortor efficitur a. Quisque lacinia fringilla sapien, vel
52 +
sagittis ligula ullamcorper nec. Aenean sed vehicula nunc.
53 +
54 +
Etiam placerat auctor urna, et condimentum lectus venenatis quis. Nunc dictum
55 +
efficitur tellus in gravida. Cras eros velit, fermentum dignissim lacus ut,
56 +
tincidunt dapibus eros. Nam sed interdum ante, et gravida lorem. Aenean justo
57 +
tellus, malesuada ac convallis eu, dictum accumsan felis. Vivamus vitae orci at
58 +
mauris gravida sagittis ac at orci. Donec dignissim consequat laoreet. Duis
59 +
scelerisque lorem at sem commodo fringilla.
60 +
61 +
Donec mollis commodo lorem quis suscipit. Duis ut magna fringilla velit auctor
62 +
dapibus. Morbi ex mi, consequat sit amet ornare eget, pretium in urna. Sed
63 +
condimentum orci in mi dignissim accumsan. In pulvinar eget nulla vel
64 +
scelerisque. Phasellus eros metus, maximus ut accumsan non, dignissim vitae
65 +
nunc. Fusce vulputate, libero non ultricies tempor, eros tortor aliquet erat, in
66 +
dignissim arcu ipsum vitae nunc. Mauris rhoncus, libero ut suscipit feugiat,
67 +
elit mauris posuere lectus, quis aliquam erat eros nec sem. Vestibulum mi eros,
68 +
convallis in nisi eget, tempor euismod magna.
/dev/null → content/about.pt-br.md
1 +
---
2 +
title: Sobre
3 +
---
4 +
5 +
Uma página.
/dev/null → content/posts/_index.pt-br.md
1 +
+++
2 +
title = 'Blog'
3 +
description = 'Notas, experimentos e coisas que aprendemos construindo software.'
4 +
+++
/dev/null → content/posts/post-template.pt-br.md
1 +
+++
2 +
title = 'Template de post'
3 +
date = 2026-10-24
4 +
description = 'Um post de referência com os elementos Markdown disponíveis no blog.'
5 +
draft = false
6 +
# tags = ['hugo', 'referência']
7 +
# summary = 'Defina um resumo personalizado aqui; caso contrário, o Hugo usa o primeiro parágrafo.'
8 +
+++
9 +
10 +
Este é um post de referência para os elementos usados no blog. Substitua este
11 +
parágrafo pela introdução real.
12 +
13 +
<!--more-->
14 +
15 +
## Um título de seção
16 +
17 +
Um parágrafo comum com **texto em negrito**, *texto em itálico*, `código inline`
18 +
e um [link para a documentação do Hugo](https://gohugo.io/).
19 +
20 +
### Um título menor
21 +
22 +
- Primeiro item
23 +
- Segundo item
24 +
- Item aninhado
25 +
- Terceiro item
26 +
27 +
1. Primeiro passo
28 +
2. Segundo passo
29 +
3. Terceiro passo
30 +
31 +
> Uma citação para destacar uma frase importante.
32 +
33 +
## Código
34 +
35 +
Um exemplo de shell:
36 +
37 +
```bash
38 +
hugo server --buildDrafts
39 +
```
40 +
41 +
Um exemplo em Go:
42 +
43 +
```go
44 +
package main
45 +
46 +
import "fmt"
47 +
48 +
func main() {
49 +
fmt.Println("hello, cabotiá")
50 +
}
51 +
```
52 +
53 +
## Tabela
54 +
55 +
| Elemento | Propósito |
56 +
| -------- | -------------------------- |
57 +
| Título | Divide o post em seções |
58 +
| Lista | Agrupa itens relacionados |
59 +
| Código | Mostra comandos ou trechos |
60 +
| Citação | Destaca uma única frase |
61 +
62 +
## Imagem
63 +
64 +

65 +
66 +
## Fechamento
67 +
68 +
Esse é o template completo. Copie este arquivo, altere o front matter e
69 +
substitua o corpo pelo post real.
70 +
71 +
O marcador `<!--more-->` acima do primeiro título define o resumo exibido no
72 +
índice do blog. Sem ele, o Hugo usa os primeiros parágrafos ou o valor de
73 +
`summary` no front matter.
/dev/null → content/work/_index.md
1 +
+++
2 +
title = 'Work'
3 +
description = 'Selected projects from the studio.'
4 +
+++
5 +
6 +
Small, focused tools built around the way people actually work.
/dev/null → content/work/_index.pt-br.md
1 +
+++
2 +
title = 'Trabalhos'
3 +
description = 'Projetos selecionados do estúdio.'
4 +
+++
5 +
6 +
Ferramentas pequenas e focadas em como as pessoas realmente trabalham.
/dev/null → content/work/pira.md
1 +
+++
2 +
title = 'Squash UI'
3 +
description = 'Headless component primitives for dense, data-heavy interfaces.'
4 +
+++
5 +
6 +
Squash UI is a set of headless component primitives for interfaces that carry a
7 +
lot of data. It provides behaviour and accessibility without imposing a visual
8 +
language, so the same pieces can sit inside a dense operations console or a
9 +
small internal tool.
10 +
11 +
The project started as a shared foundation for the studio's own products and is
12 +
now maintained as a standalone library.
/dev/null → content/work/pira.pt-br.md
1 +
+++
2 +
title = 'Squash UI'
3 +
description = 'Primitivas de componentes headless para interfaces densas e ricas em dados.'
4 +
+++
5 +
6 +
Squash UI é um conjunto de primitivas de componentes headless para interfaces
7 +
que carregam muitos dados. Ele fornece comportamento e acessibilidade sem impor
8 +
uma linguagem visual, então as mesmas peças cabem tanto em um console
9 +
operacional denso quanto em uma pequena ferramenta interna.
10 +
11 +
O projeto começou como uma base compartilhada para os produtos do estúdio e hoje
12 +
é mantido como uma biblioteca independente.
/dev/null → data/projects.yaml
1 +
# Each entry needs a name and a blurb. `blurb`, `tags` and link `label` entries
2 +
# are maps keyed by language. `url` is the primary destination and can be an
3 +
# internal page (e.g. /work/squash-ui/) or an external link. `links` adds
4 +
# secondary destinations such as a repository or a landing page
5 +
6 +
- name: pira
7 +
blurb:
8 +
en: A small, hand-made git forge
9 +
pt-br: Um pequeno, forge do git feito à mão
10 +
tags:
11 +
- en: Go
12 +
pt-br: Go
13 +
- en: Alpha
14 +
pt-br: Alpha
15 +
url: /work/pira/
16 +
links:
17 +
- label:
18 +
en: Source
19 +
pt-br: Código
20 +
url: https://pira.dev
21 +
22 +
- name: Nexo
23 +
blurb:
24 +
en: A privacy-first, open-source Mood Tracker, focused for people with Bipolar Disorder
25 +
pt-br: Rastreador de humor, com enfasê em privacidade, para pessoas com Transtorno Bipolar
26 +
tags:
27 +
- en: Android/TS
28 +
pt-br: Android/TS
29 +
- en: Beta
30 +
pt-br: Beta
31 +
- en: Paper
32 +
pt-br: Acadêmico
33 +
url: https://usenexo.xyz
34 +
links:
35 +
- label:
36 +
en: Repository
37 +
pt-br: Repositório
38 +
url: https://github.com/pedrolucasp/nexo
hugo.toml
1 1
baseURL = 'https://cabotia.dev/'
2 -
defaultLanguageCode = 'pt-br'
3 -
title = 'cabotiá - micro estúdio de desenvolvimento de software'
2 +
defaultContentLanguage = 'en'
3 +
defaultContentLanguageInSubdir = false
4 +
title = 'cabotiá - a small software studio'
5 +
6 +
[languages]
7 +
[languages.en]
8 +
label = 'English'
9 +
weight = 1
10 +
title = 'cabotiá - a small software studio'
11 +
[languages.pt-br]
12 +
label = 'Português'
13 +
weight = 2
14 +
title = 'cabotiá - micro estúdio de desenvolvimento de software'
i18n/en.toml
1 1
[nav]
2 2
blog = "blog"
3 3
about = "about"
4 4
contact = "contact"
5 5
work = "work"
7 7
[footer]
8 8
fine_line = "cabotiá is a company registered in Brazil, with the number 64.947.407/0001-03"
9 9
code = "source-code"
10 10
license = "license"
11 11
12 +
[logo]
13 +
alt = "A stylized cabotiá pumpkin, cabotiá logo"
14 +
15 +
[theme]
16 +
to_dark = "Switch to dark theme"
17 +
to_light = "Switch to light theme"
18 +
19 +
[language]
20 +
switcher = "Language"
21 +
22 +
[date]
23 +
format = "2 January 2006"
i18n/pt-br.toml
1 1
[nav]
2 2
blog = "blog"
3 3
about = "sobre"
4 4
contact = "contato"
5 5
work = "trabalhos"
6 6
7 7
[footer]
8 8
fine_line = "cabotiá é uma empresa registrada no Brasil, sob o CNPJ 64.947.407/0001-03"
9 9
code = "código-fonte"
10 10
license = "licença"
11 +
12 +
[logo]
13 +
alt = "Uma cabotiá estilizada, logotipo da cabotiá"
14 +
15 +
[theme]
16 +
to_dark = "Mudar para o tema escuro"
17 +
to_light = "Mudar para o tema claro"
18 +
19 +
[language]
20 +
switcher = "Idioma"
21 +
22 +
[date]
23 +
format = "02/01/2006"
layouts/_default/baseof.html
1 1
<!DOCTYPE html>
2 2
<html lang="{{ .Site.Language.Lang }}">
3 3
<head>
4 4
<meta charset="utf-8">
5 5
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
23 23
</script>
24 24
25 25
{{ $style := resources.Get "main.scss" | css.Sass | resources.Minify | resources.Fingerprint }}
26 26
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
27 27
28 +
{{ range .AllTranslations }}
29 +
<link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}">
30 +
{{ end }}
31 +
28 32
{{ range .AlternativeOutputFormats -}}
29 33
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
30 34
{{ end -}}
31 35
32 36
{{ template "_internal/opengraph.html" . }}
33 37
</head>
34 38
35 39
<body>
36 40
<header>
37 41
<div class="logo">
38 -
<a href="{{ .Site.BaseURL | relLangURL }}">
39 -
<img class="logo-type" src="{{ (resources.Get "images/Cabotia.svg").RelPermalink }}" alt="A stylized cabotiá pumpkin, cabotiá logo">
42 +
<a href="{{ .Site.Home.RelPermalink }}">
43 +
<img class="logo-type" src="{{ (resources.Get "images/Cabotia.svg").RelPermalink }}" alt="{{ i18n "logo.alt" }}">
40 44
</a>
41 45
</div>
42 46
43 47
<nav>
44 -
<a href="/">
48 +
<a href="{{ "/" | relLangURL }}">
45 49
{{ i18n "nav.about" | safeHTML }}
46 50
</a>
47 -
<a href="/work">
51 +
<a href="{{ "work/" | relLangURL }}">
48 52
{{ i18n "nav.work" | safeHTML }}
49 53
</a>
50 -
<a href="/posts">
54 +
<a href="{{ "posts/" | relLangURL }}">
51 55
{{ i18n "nav.blog" | safeHTML }}
52 56
</a>
53 57
<a href="mailto:contact@cabotia.dev">
54 58
{{ i18n "nav.contact" | safeHTML }}
55 59
</a>
56 60
</nav>
57 61
58 -
<button class="theme-toggle" type="button" aria-pressed="false" aria-label="Switch to dark theme">
59 -
<svg class="icon-sun" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
60 -
<circle cx="12" cy="12" r="4"></circle>
61 -
<path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"></path>
62 -
</svg>
63 -
<svg class="icon-moon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
64 -
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
65 -
</svg>
66 -
</button>
62 +
<div class="header-actions">
63 +
{{ partial "language-switcher.html" . }}
64 +
65 +
<button class="theme-toggle" type="button" aria-pressed="false" aria-label="{{ i18n "theme.to_dark" }}" data-label-dark="{{ i18n "theme.to_dark" }}" data-label-light="{{ i18n "theme.to_light" }}">
66 +
<svg class="icon-sun" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
67 +
<circle cx="12" cy="12" r="4"></circle>
68 +
<path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"></path>
69 +
</svg>
70 +
<svg class="icon-moon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
71 +
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
72 +
</svg>
73 +
</button>
74 +
</div>
67 75
</header>
68 76
69 77
<main>
70 78
{{ block "main" . }}{{ end }}
71 79
</main>
94 102
(() => {
95 103
const root = document.documentElement;
96 104
const toggle = document.querySelector('.theme-toggle');
97 105
if (!toggle) return;
98 106
107 +
const labelDark = toggle.dataset.labelDark;
108 +
const labelLight = toggle.dataset.labelLight;
109 +
99 110
const sync = () => {
100 111
const dark = root.dataset.theme === 'dark';
101 112
toggle.setAttribute('aria-pressed', String(dark));
102 -
toggle.setAttribute('aria-label', dark ? 'Switch to light theme' : 'Switch to dark theme');
113 +
toggle.setAttribute('aria-label', dark ? labelLight : labelDark);
103 114
};
104 115
105 116
toggle.addEventListener('click', () => {
106 117
root.dataset.theme = root.dataset.theme === 'dark' ? 'light' : 'dark';
107 118
try {
113 124
sync();
114 125
})();
115 126
</script>
116 127
</body>
117 128
</html>
layouts/_default/list.html
1 1
{{ define "main" }}
2 +
{{ $dateFormat := i18n "date.format" }}
2 3
<h1>{{ .Title }}</h1>
3 4
{{ .Content }}
4 5
5 6
{{ range .Pages.ByDate.Reverse }}
6 7
<article>
8 9
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
9 10
</h2>
10 11
11 12
{{ if not .Date.IsZero }}
12 13
<p class="post-meta">
13 -
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2 January 2006" }}</time>
14 +
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format $dateFormat }}</time>
14 15
</p>
15 16
{{ end }}
16 17
17 18
{{ with .Summary }}
18 19
<p>{{ . | plainify | truncate 240 }}</p>
19 20
{{ end }}
20 21
</article>
21 22
{{ end }}
22 23
{{ end }}
layouts/_default/single.html
1 1
{{ define "main" }}
2 +
{{ $dateFormat := i18n "date.format" }}
2 3
<article>
3 4
<h1>{{ .Title }}</h1>
4 5
5 6
{{ if not .Date.IsZero }}
6 7
<p class="post-meta">
7 -
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2 January 2006" }}</time>
8 +
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format $dateFormat }}</time>
8 9
</p>
9 10
{{ end }}
10 11
11 12
{{ .Content }}
12 13
</article>
13 14
{{ end }}
/dev/null → layouts/partials/language-switcher.html
1 +
<div class="language-switcher" role="group" aria-label="{{ i18n "language.switcher" }}">
2 +
{{ if .IsTranslated }}
3 +
{{ range $i, $translation := .AllTranslations }}
4 +
{{ if $i }}<span class="language-sep" aria-hidden="true">|</span>{{ end }}
5 +
{{ if eq $translation.Language.Lang $.Language.Lang }}
6 +
<span class="is-current" aria-current="page" title="{{ $translation.Language.Label }}">{{ $translation.Language.Lang }}</span>
7 +
{{ else }}
8 +
<a href="{{ $translation.RelPermalink }}" hreflang="{{ $translation.Language.Lang }}" lang="{{ $translation.Language.Lang }}" title="{{ $translation.Language.Label }}">{{ $translation.Language.Lang }}</a>
9 +
{{ end }}
10 +
{{ end }}
11 +
{{ else }}
12 +
{{ range $i, $site := .Sites }}
13 +
{{ if $i }}<span class="language-sep" aria-hidden="true">|</span>{{ end }}
14 +
{{ if eq $site.Language.Lang $.Language.Lang }}
15 +
<span class="is-current" aria-current="page" title="{{ $site.Language.Label }}">{{ $site.Language.Lang }}</span>
16 +
{{ else }}
17 +
<a href="{{ $site.Home.RelPermalink }}" hreflang="{{ $site.Language.Lang }}" lang="{{ $site.Language.Lang }}" title="{{ $site.Language.Label }}">{{ $site.Language.Lang }}</a>
18 +
{{ end }}
19 +
{{ end }}
20 +
{{ end }}
21 +
</div>
/dev/null → layouts/work/list.html
1 +
{{ define "main" }}
2 +
{{ $lang := .Site.Language.Lang }}
3 +
<div class="work-intro">
4 +
<h1>{{ .Title }}</h1>
5 +
{{ with .Content }}
6 +
<div class="work-blurb">{{ . }}</div>
7 +
{{ end }}
8 +
</div>
9 +
10 +
<ol class="project-list">
11 +
{{ range $index, $project := hugo.Data.projects }}
12 +
{{ $url := "" }}
13 +
{{ with $project.url }}
14 +
{{ $url = . }}
15 +
{{ if not (strings.HasPrefix . "http") }}
16 +
{{ $url = . | relLangURL }}
17 +
{{ end }}
18 +
{{ end }}
19 +
20 +
{{ $blurb := "" }}
21 +
{{ with $project.blurb }}
22 +
{{ $blurb = or (index . $lang) (index . "en") }}
23 +
{{ end }}
24 +
25 +
<li class="project">
26 +
<span class="project-index" aria-hidden="true">{{ printf "%02d" (add $index 1) }}</span>
27 +
28 +
<div class="project-body">
29 +
{{ with $url }}
30 +
<h2 class="project-name">
31 +
<a href="{{ . }}"{{ if strings.HasPrefix . "http" }} target="_blank" rel="noopener noreferrer"{{ end }}>{{ $project.name }}</a>
32 +
</h2>
33 +
{{ else }}
34 +
<h2 class="project-name">{{ $project.name }}</h2>
35 +
{{ end }}
36 +
37 +
{{ with $blurb }}
38 +
<p class="project-blurb">{{ . }}</p>
39 +
{{ end }}
40 +
41 +
{{ with $project.links }}
42 +
<ul class="project-links">
43 +
{{ range . }}
44 +
{{ $label := "" }}
45 +
{{ with .label }}
46 +
{{ $label = or (index . $lang) (index . "en") }}
47 +
{{ end }}
48 +
<li>
49 +
<a href="{{ .url }}"{{ if strings.HasPrefix .url "http" }} target="_blank" rel="noopener noreferrer"{{ end }}>{{ $label }}</a>
50 +
</li>
51 +
{{ end }}
52 +
</ul>
53 +
{{ end }}
54 +
</div>
55 +
56 +
{{ with $project.tags }}
57 +
<ul class="project-tags">
58 +
{{ range . }}
59 +
{{ $tag := . }}
60 +
{{ if reflect.IsMap . }}
61 +
{{ $tag = or (index . $lang) (index . "en") }}
62 +
{{ end }}
63 +
<li>{{ $tag }}</li>
64 +
{{ end }}
65 +
</ul>
66 +
{{ end }}
67 +
68 +
{{ with $url }}
69 +
<a class="project-arrow" href="{{ . }}"{{ if strings.HasPrefix . "http" }} target="_blank" rel="noopener noreferrer"{{ end }} aria-hidden="true" tabindex="-1">
70 +
<svg viewBox="0 0 16 16" focusable="false">
71 +
<path d="M5 3l5 5-5 5"></path>
72 +
</svg>
73 +
</a>
74 +
{{ end }}
75 +
</li>
76 +
{{ end }}
77 +
</ol>
78 +
{{ end }}