Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/calendar-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: JavaScript behavior tests

on:
pull_request:
push:
branches: [develop, main]

jobs:
calendar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24'
- name: Test calendar and cursor behavior
run: node --test tests/*.test.cjs
36 changes: 36 additions & 0 deletions .github/workflows/multilingual.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Multilingual tests

on:
pull_request:
push:
branches: [develop, main]

jobs:
multilingual:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.147.9
# Bundler's vendor/bundle is not a Go module vendor directory.
GOFLAGS: -mod=readonly
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: '1.24'

- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true

- name: Install Hugo
run: |
wget -O "${{ runner.temp }}/hugo.deb" "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb"
sudo dpkg -i "${{ runner.temp }}/hugo.deb"

- name: Check Go modules with Bundler vendor directory
run: bundle exec ruby scripts/test_go_modules.rb

- name: Test native multilingual behavior
run: bundle exec ruby scripts/test_multilingual.rb
107 changes: 105 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# My new Blog
# My Blog

[Deploy](https://kellen-xavier.github.io/ladydebug.github.io/)
My "blog" is a space where I document what I learn and the challenges I face, serving as a "knowledge portfolio." Much like the approach described in *The Pragmatic Programmer*, I view my studies as a continuous investment in my personal and professional growth. The concept is simple: regularly invest in new knowledge, diversify my skill set, and manage the risks associated with focusing on technologies that might eventually become obsolete. In short, it’s about writing and practicing as a way to facilitate my own learning.

[Learn about the book here: The Pragmatic Programmer: From Journeyman to Master](https://a.co/d/00da8YtH)

[Our here](https://github.com/CodesdaLu/Programming-Books/blob/main/o-programador-pragmatico.pdf)

[Deploy on my blog](https://kellen-xavier.github.io/ladydebug.github.io/)

## Started

Expand All @@ -10,6 +16,20 @@ Programming and Quality. This is not a tutorials. This is my daily study, buildi
Well ok. Where from this idea? Good, this ideia emerge from the book The Programatic Programmer.
Specifically, of the chapter one [get to know the book here](https://www.amazon.com.br/Programador-Pragm%C3%A1tico-Aprendiz-Mestre/dp/8577807002).

## Run this Project

Preview with:

`hugo server -D -F`

Use the language button to select English. Hugo connects the matching files automatically; it does not translate the text for you.

Before publishing, run:

bundle exec ruby scripts/test_multilingual.rb
bundle exec mdl content README.md
hugo --gc --minify

## Testando localmente

**Pré-requisitos:** [Hugo extended](https://gohugo.io/installation/) `0.147.9`+
Expand Down Expand Up @@ -74,6 +94,47 @@ corrigir sem risco (ver `scripts/fix_markdown.rb` pra saber exatamente o quê):
bundle exec ruby scripts/fix_markdown.rb
```

## Português e inglês com o seletor nativo

O blog usa o modo multilíngue do Hugo e o seletor de idioma do tema Hextra.
O botão de idioma no cabeçalho abre as opções **Português** e **English**.
As páginas em português mantêm suas URLs; as versões em inglês ficam em `/en/`.
Menus, busca, RSS e os textos da página inicial acompanham o idioma selecionado.

O seletor abre a tradução do post atual. Quando ela ainda não existe, o tema
leva à página inicial do idioma escolhido. A troca funciona localmente e não
depende de um serviço externo de tradução.

As traduções são arquivos Markdown separados, com o mesmo nome e o sufixo `.en`:

```text
content/docs/2026/outubro/meu-post.md
content/docs/2026/outubro/meu-post.en.md

content/docs/2026/julho/meu-projeto/index.md
content/docs/2026/julho/meu-projeto/index.en.md
```

Traduza o título e o conteúdo, preservando data, slug e estado de rascunho.
Em page bundles, o Hugo compartilha as imagens entre as traduções. Em posts
soltos com imagens externas ao bundle, use caminhos que resolvam também em `/en/`.
Os posts publicados já têm versões em inglês; rascunhos continuam como estão.
Novos posts precisam de uma versão `.en.md` antes de serem publicados.

### Testes do modo multilíngue

Com os mesmos pré-requisitos do blog, execute:

```bash
bundle exec ruby scripts/test_multilingual.rb
```

Os testes geram um site temporário e verificam o seletor nativo, a troca entre
posts equivalentes, o fallback sem tradução, URLs em subdiretórios, textos
localizados e imagens compartilhadas. Também verificam se cada post publicado
tem um arquivo em inglês. O workflow `multilingual.yaml` executa os testes nos
PRs e pushes para `develop` e `main`.

## Changelog e releases

O `CHANGELOG.md` (formato [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)) é gerado
Expand Down Expand Up @@ -105,8 +166,50 @@ tema em arquivos próprios:
Pra trocar o link do Spotify ou adicionar um evento, é só editar os `.yaml`
acima — não precisa mexer nos templates.

### Calendário

O botão **Calendário** abre a mesma janela da doca, com uma grade mensal.
As setas mudam o mês; **Hoje** volta ao dia atual no fuso do visitante.
O dia atual tem uma borda e os dias com eventos têm um ponto. Clique em um dia
para ver seus eventos. A interface acompanha o idioma do blog.

Para adicionar eventos, substitua o `[]` de `data/events.yaml` por uma lista:

```yaml
- date: "2026-11-10"
title: "Meu evento"
title_en: "My event"
url: "https://example.com/evento"
```

`title_en` e `url` são opcionais. Eventos antigos continuam disponíveis ao
navegar pelos meses. As alterações aparecem depois do build e deploy do blog.
O calendário funciona sem serviços externos; sem JavaScript, a janela mostra
uma lista dos eventos cadastrados.

Para validar o calendário e sua integração com os idiomas:

```bash
node --test tests/calendar.test.cjs
bundle exec ruby scripts/test_multilingual.rb
```

Ícones: [Pixelarticons](https://github.com/halfmage/pixelarticons) (MIT).

### Brilho no cursor

O movimento do mouse deixa uma trilha discreta de estrelas rosas e douradas.
As partículas duram 600 ms, com no máximo 12 visíveis ao mesmo tempo, e não
interceptam cliques nem alteram o layout. O efeito fica desativado para toque,
caneta e preferência de movimento reduzido do sistema.

Os arquivos são `assets/js/cursor-trail.js` e `assets/css/cursor-trail-style.css`.
Para testar o comportamento do cursor e do calendário:

```bash
node --test tests/*.test.cjs
```

Fonte: [Pixelify Sans](https://fonts.google.com/specimen/Pixelify+Sans) (OFL,
licença em `assets/font/pixelify-sans/OFL.txt`), self-hosted como WOFF2 —
usada só dentro da doca e das janelas, não no resto do site. Emitida via
Expand Down
30 changes: 30 additions & 0 deletions assets/css/cursor-trail-style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.cursor-sparkle {
position: fixed;
z-index: 100;
width: 7px;
height: 7px;
margin: -3.5px 0 0 -3.5px;
background: var(--sparkle-color, var(--ld-accent));
clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
pointer-events: none;
user-select: none;
animation: cursor-sparkle-fade 600ms ease-out forwards;
}

@keyframes cursor-sparkle-fade {
from {
opacity: 0.85;
transform: translate3d(0, 0, 0) scale(1);
}
to {
opacity: 0;
transform: translate3d(var(--sparkle-x), var(--sparkle-y), 0) rotate(45deg) scale(0.2);
}
}

@media (prefers-reduced-motion: reduce) {
.cursor-sparkle {
display: none;
animation: none;
}
}
22 changes: 17 additions & 5 deletions assets/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/* Paleta clara e quente + ajustes de layout do blog */

:root {
--primary-hue: 16deg;
--primary-saturation: 62%;
/* Hextra links, hover states and focus rings follow the pink UI accent. */
--primary-hue: 326.1deg;
--primary-saturation: 55.67%;
--primary-lightness: 42%;

--ld-bg: #faf6ed;
Expand All @@ -16,9 +17,9 @@
}

.dark {
--primary-hue: 18deg;
--primary-saturation: 55%;
--primary-lightness: 58%;
--primary-hue: 326.1deg;
--primary-saturation: 55.67%;
--primary-lightness: 61.96%;

--ld-bg: #17130f;
--ld-bg-soft: #211b15;
Expand Down Expand Up @@ -191,3 +192,14 @@ body,
.ld-aside nav a:hover {
color: var(--ld-accent);
}

/* Keep room for Hextra's native language switcher on narrow screens. */
@media (max-width: 640px) {
.ld-navbar-brand {
flex-shrink: 0;
}

.ld-navbar-brand > span {
display: none;
}
}
79 changes: 79 additions & 0 deletions assets/css/desktop-dock.css
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,85 @@ a.dock-window__item-title:hover {
color: var(--ld-muted);
}

.dock-calendar__navigation {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.25rem;
font-weight: 600;
}

.dock-calendar__navigation button,
.dock-calendar__today {
border: 1px solid var(--ld-border);
padding: 0.25rem 0.5rem;
color: var(--ld-fg);
background: var(--ld-bg-soft);
cursor: pointer;
}

.dock-calendar__table {
width: 100%;
table-layout: fixed;
border-collapse: collapse;
margin: 0.5rem 0;
text-align: center;
font-size: 0.8rem;
}

.dock-calendar__table th {
color: var(--ld-muted);
font-weight: 400;
padding-bottom: 0.25rem;
}

.dock-calendar__day {
position: relative;
width: 100%;
min-height: 2rem;
border: 1px solid transparent;
background: transparent;
color: var(--ld-fg);
cursor: pointer;
}

.dock-calendar__day[aria-current="date"] {
border-color: var(--ld-accent);
}

.dock-calendar__day:hover,
.dock-calendar__day[aria-pressed="true"] {
background: var(--ld-bg-soft);
color: var(--ld-accent);
}

.dock-calendar__day--event::after {
content: "";
position: absolute;
width: 3px;
height: 3px;
bottom: 2px;
left: calc(50% - 1.5px);
background: var(--ld-accent);
}

.dock-calendar button:focus-visible {
outline: 2px solid var(--ld-accent);
outline-offset: 1px;
}

.dock-calendar__events {
margin-top: 0.75rem;
padding-top: 0.5rem;
border-top: 1px solid var(--ld-border);
font-size: 0.8rem;
}

.dock-calendar__events h3 {
margin-bottom: 0.5rem;
font-weight: 600;
}

@media (max-width: 30rem) {
.dock__label {
display: none;
Expand Down
Loading
Loading