Skip to content

Commit 7f3c9a7

Browse files
committed
refactor: rework content and move to /holiday
1 parent 4124562 commit 7f3c9a7

File tree

7 files changed

+91
-197
lines changed

7 files changed

+91
-197
lines changed
Lines changed: 59 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,27 @@ const icons = [
4545
] as const
4646
4747
// --- .ics calendar reminder ---
48+
49+
// Format as UTC for the .ics file
50+
const fmt = (d: Date) =>
51+
d
52+
.toISOString()
53+
.replace(/[-:]/g, '')
54+
.replace(/\.\d{3}/, '')
55+
4856
// Pick a random daytime hour (9–17) in the user's local timezone on Feb 22
4957
// so reminders are staggered and people don't all flood in at once.
5058
function downloadIcs() {
5159
const hour = 9 + Math.floor(Math.random() * 9) // 9..17
5260
const start = new Date(2026, 1, 22, hour, 0, 0) // month is 0-indexed
5361
const end = new Date(2026, 1, 22, hour + 1, 0, 0)
5462
55-
// Format as UTC for the .ics file
56-
const fmt = (d: Date) =>
57-
d
58-
.toISOString()
59-
.replace(/[-:]/g, '')
60-
.replace(/\.\d{3}/, '')
61-
6263
const uid = `npmx-vacations-${start.getTime()}@npmx.dev`
6364
6465
const ics = [
6566
'BEGIN:VCALENDAR',
6667
'VERSION:2.0',
67-
'PRODID:-//npmx//vacations//EN',
68+
'PRODID:-//npmx//holiday//EN',
6869
'BEGIN:VEVENT',
6970
`DTSTART:${fmt(start)}`,
7071
`DTEND:${fmt(end)}`,
@@ -117,19 +118,12 @@ function downloadIcs() {
117118
scope="global"
118119
class="text-fg-muted text-lg sm:text-xl"
119120
>
120-
<template #weeks>
121-
{{ $t('vacations.stats.subtitle.weeks') }}
122-
</template>
123-
<template #contributors>
124-
{{
125-
$t('vacations.stats.subtitle.contributors', [$t('vacations.stats.contributors_text')])
126-
}}
127-
</template>
128-
<template #commits>
129-
{{ $t('vacations.stats.subtitle.commits', [$t('vacations.stats.commits_text')]) }}
130-
</template>
131-
<template #npmx>
132-
<strong>npmx</strong>
121+
<template #some>
122+
<span class="line-through decoration-fg">{{
123+
$t('vacations.stats.subtitle.some')
124+
}}</span>
125+
{{ ' ' }}
126+
<strong class="text-fg">{{ $t('vacations.stats.subtitle.all') }}</strong>
133127
</template>
134128
</i18n-t>
135129
</header>
@@ -163,57 +157,7 @@ function downloadIcs() {
163157
</div>
164158
</div>
165159

166-
<!-- Icon banner — a single row of cosy icons, clipped to fill width -->
167-
<div
168-
class="relative mb-12 px-4 border border-border rounded-lg bg-bg-subtle overflow-hidden select-none"
169-
:aria-label="$t('vacations.illustration_alt')"
170-
role="group"
171-
>
172-
<div class="flex items-center gap-4 sm:gap-5 py-3 sm:py-4 w-max">
173-
<template v-for="n in 4" :key="`set-${n}`">
174-
<!-- Campsite icon — click it 3x to light the fire -->
175-
<button
176-
type="button"
177-
class="relative shrink-0 cursor-pointer rounded transition-transform duration-200 hover:scale-110 focus-visible:outline-accent/70 w-5 h-5 sm:w-6 sm:h-6"
178-
:aria-label="$t('vacations.poke_log')"
179-
@click="pokeLog"
180-
>
181-
<span
182-
class="absolute inset-0 i-carbon:fire w-5 h-5 sm:w-6 sm:h-6 text-orange-400 transition-opacity duration-400"
183-
:class="fireVisible ? 'opacity-100' : 'opacity-0'"
184-
/>
185-
<span
186-
class="absolute inset-0 i-carbon:campsite w-5 h-5 sm:w-6 sm:h-6 transition-colors duration-400"
187-
:class="fireVisible ? 'text-amber-700' : ''"
188-
/>
189-
</button>
190-
<span
191-
v-for="(icon, i) in icons"
192-
:key="`${n}-${i}`"
193-
class="shrink-0 w-5 h-5 sm:w-6 sm:h-6 opacity-40"
194-
:class="icon"
195-
aria-hidden="true"
196-
/>
197-
</template>
198-
</div>
199-
</div>
200-
201160
<section class="prose prose-invert max-w-none space-y-8">
202-
<div>
203-
<p class="text-fg-muted leading-relaxed mb-4">
204-
<i18n-t keypath="vacations.intro.p1" tag="span" scope="global">
205-
<template #some>
206-
<span class="line-through decoration-fg">{{ $t('vacations.intro.some') }}</span>
207-
{{ ' ' }}
208-
<strong class="text-fg">{{ $t('vacations.intro.all') }}</strong>
209-
</template>
210-
</i18n-t>
211-
</p>
212-
<p class="text-fg-muted leading-relaxed">
213-
{{ $t('vacations.intro.p2') }}
214-
</p>
215-
</div>
216-
217161
<!-- What's happening -->
218162
<div>
219163
<h2 class="text-lg text-fg-subtle uppercase tracking-wider mb-4">
@@ -226,34 +170,21 @@ function downloadIcs() {
226170
</template>
227171
</i18n-t>
228172
</p>
229-
<ul class="space-y-3 text-fg-muted list-none p-0">
230-
<li class="flex items-start gap-3">
231-
<span class="text-fg-subtle shrink-0 mt-1">&mdash;</span>
232-
<span>
233-
<i18n-t keypath="vacations.what.discord" tag="span" scope="global">
234-
<template #garden>
235-
<code class="font-mono text-fg text-sm">{{ $t('vacations.what.garden') }}</code>
236-
</template>
237-
</i18n-t>
238-
</span>
239-
</li>
240-
<li class="flex items-start gap-3">
241-
<span class="text-fg-subtle shrink-0 mt-1">&mdash;</span>
242-
<span>{{ $t('vacations.what.site') }}</span>
243-
</li>
244-
<li class="flex items-start gap-3">
245-
<span class="text-fg-subtle shrink-0 mt-1">&mdash;</span>
246-
<span>{{ $t('vacations.what.repo') }}</span>
247-
</li>
248-
</ul>
173+
<p class="text-fg-muted leading-relaxed mb-4">
174+
<i18n-t keypath="vacations.what.p2" tag="span" scope="global">
175+
<template #garden>
176+
<code class="font-mono text-fg text-sm">{{ $t('vacations.what.garden') }}</code>
177+
</template>
178+
</i18n-t>
179+
</p>
249180
</div>
250181

251182
<!-- In the meantime -->
252183
<div>
253184
<h2 class="text-lg text-fg-subtle uppercase tracking-wider mb-4">
254185
{{ $t('vacations.meantime.title') }}
255186
</h2>
256-
<p class="text-fg-muted leading-relaxed mb-4">
187+
<p class="text-fg-muted leading-relaxed">
257188
<i18n-t keypath="vacations.meantime.p1" tag="span" scope="global">
258189
<template #repo>
259190
<LinkBase to="https://repo.npmx.dev">
@@ -262,21 +193,50 @@ function downloadIcs() {
262193
</template>
263194
</i18n-t>
264195
</p>
265-
<p class="text-fg-muted leading-relaxed">
266-
{{ $t('vacations.meantime.p2') }}
267-
</p>
196+
</div>
197+
198+
<!-- Icon banner — a single row of cosy icons, clipped to fill width -->
199+
<div
200+
class="relative mb-12 px-4 border border-border rounded-lg bg-bg-subtle overflow-hidden select-none"
201+
:aria-label="$t('vacations.illustration_alt')"
202+
role="group"
203+
>
204+
<div class="flex items-center gap-4 sm:gap-5 py-3 sm:py-4 w-max">
205+
<template v-for="n in 4" :key="`set-${n}`">
206+
<!-- Campsite icon — click it 3x to light the fire -->
207+
<button
208+
type="button"
209+
class="relative shrink-0 cursor-pointer rounded transition-transform duration-200 hover:scale-110 focus-visible:outline-accent/70 w-5 h-5 sm:w-6 sm:h-6"
210+
:aria-label="$t('vacations.poke_log')"
211+
@click="pokeLog"
212+
>
213+
<span
214+
class="absolute inset-0 i-carbon:fire w-5 h-5 sm:w-6 sm:h-6 text-orange-400 transition-opacity duration-400"
215+
:class="fireVisible ? 'opacity-100' : 'opacity-0'"
216+
/>
217+
<span
218+
class="absolute inset-0 i-carbon:campsite w-5 h-5 sm:w-6 sm:h-6 transition-colors duration-400"
219+
:class="fireVisible ? 'text-amber-700' : ''"
220+
/>
221+
</button>
222+
<span
223+
v-for="(icon, i) in icons"
224+
:key="`${n}-${i}`"
225+
class="shrink-0 w-5 h-5 sm:w-6 sm:h-6 opacity-40"
226+
:class="icon"
227+
aria-hidden="true"
228+
/>
229+
</template>
230+
</div>
268231
</div>
269232

270233
<!-- See you soon -->
271234
<div>
272235
<h2 class="text-lg text-fg-subtle uppercase tracking-wider mb-4">
273236
{{ $t('vacations.return.title') }}
274237
</h2>
275-
<p class="text-fg-muted leading-relaxed mb-4">
276-
{{ $t('vacations.return.p1') }}
277-
</p>
278238
<p class="text-fg-muted leading-relaxed mb-6">
279-
<i18n-t keypath="vacations.return.p2" tag="span" scope="global">
239+
<i18n-t keypath="vacations.return.p1" tag="span" scope="global">
280240
<template #social>
281241
<LinkBase to="https://social.npmx.dev">
282242
{{ $t('vacations.return.social_link') }}

i18n/locales/en.json

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,34 +1115,24 @@
11151115
"title": "on vacation",
11161116
"meta_description": "The npmx team is recharging. Discord reopens in a week.",
11171117
"heading": "recharging",
1118-
"subtitle": "after {weeks} of intense coding, {contributors}, and over {commits}, the {npmx} team is taking a short break, because it's a marathon, not a sprint.",
1118+
"subtitle": "we've been building npmx at a pace that has cost {some} of us sleep. we don't want that to be the norm! so we are taking a week off. together.",
11191119
"illustration_alt": "a single row of cosy icons",
11201120
"poke_log": "Poke the campfire",
1121-
"intro": {
1122-
"p1": "We've been building npmx at a pace that has cost {some} of us sleep. That's not sustainable – and we don't want it to be the norm. So we're doing something about it: all of us are taking a week off. Together.",
1123-
"some": "some",
1124-
"all": "all",
1125-
"p2": "Go outside. Touch grass – or snow. Finish that book you started before npmx took over your evenings. Visit someone you've been meaning to visit. Do something that has nothing to do with code. We'll all be better for it."
1126-
},
11271121
"what": {
11281122
"title": "what's happening",
1129-
"p1": "Discord is closed {dates}.",
1123+
"p1": "discord is closed {dates}.",
11301124
"dates": "February 14 – 21",
1131-
"discord": "All invite links are gone and channels are locked – except {garden}, which stays open for folks already there who want to keep hanging out.",
1132-
"garden": "#garden",
1133-
"site": "npmx.dev is still up. Browse packages as usual.",
1134-
"repo": "The repo is open. Issues and PRs are welcome – but expect us to be hands-off until we're back."
1125+
"p2": "all invite links are gone and channels are locked – except {garden}, which stays open for folks who want to keep hanging out.",
1126+
"garden": "#garden"
11351127
},
11361128
"meantime": {
11371129
"title": "in the meantime",
1138-
"p1": "You're more than welcome to keep poking around while we're away. The codebase is on {repo} – dig in, file issues, open PRs. We'll get to everything when we return.",
1139-
"repo_link": "GitHub",
1140-
"p2": "Just don't expect a fast review. We'll be somewhere near a cosy fireplace."
1130+
"p1": "npmx.dev and the {repo} stay open – dig in, file issues, open PRs. we'll get to everything when we're back. just don't expect a fast review. we'll be somewhere near a cosy fireplace.",
1131+
"repo_link": "GitHub"
11411132
},
11421133
"return": {
11431134
"title": "see you soon",
1144-
"p1": "We'll come back recharged and ready for the final push to March 3rd. Things are going to get even more interesting after that – so let's make sure we're taking care of each other first.",
1145-
"p2": "Follow us {social} if you want updates in the meantime.",
1135+
"p1": "we'll come back recharged and ready for the final push to March 3rd. follow us {social} for updates.",
11461136
"social_link": "on Bluesky",
11471137
"add_to_calendar": "remind me when Discord reopens"
11481138
},
@@ -1154,9 +1144,8 @@
11541144
"pr": "PRs Merged",
11551145
"pr_text": "900+",
11561146
"subtitle": {
1157-
"weeks": "3 weeks",
1158-
"commits": "{0} commits",
1159-
"contributors": "{0} contributors"
1147+
"some": "some",
1148+
"all": "all"
11601149
}
11611150
}
11621151
}

i18n/schema.json

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3358,24 +3358,6 @@
33583358
"poke_log": {
33593359
"type": "string"
33603360
},
3361-
"intro": {
3362-
"type": "object",
3363-
"properties": {
3364-
"p1": {
3365-
"type": "string"
3366-
},
3367-
"some": {
3368-
"type": "string"
3369-
},
3370-
"all": {
3371-
"type": "string"
3372-
},
3373-
"p2": {
3374-
"type": "string"
3375-
}
3376-
},
3377-
"additionalProperties": false
3378-
},
33793361
"what": {
33803362
"type": "object",
33813363
"properties": {
@@ -3388,17 +3370,11 @@
33883370
"dates": {
33893371
"type": "string"
33903372
},
3391-
"discord": {
3373+
"p2": {
33923374
"type": "string"
33933375
},
33943376
"garden": {
33953377
"type": "string"
3396-
},
3397-
"site": {
3398-
"type": "string"
3399-
},
3400-
"repo": {
3401-
"type": "string"
34023378
}
34033379
},
34043380
"additionalProperties": false
@@ -3414,9 +3390,6 @@
34143390
},
34153391
"repo_link": {
34163392
"type": "string"
3417-
},
3418-
"p2": {
3419-
"type": "string"
34203393
}
34213394
},
34223395
"additionalProperties": false
@@ -3430,9 +3403,6 @@
34303403
"p1": {
34313404
"type": "string"
34323405
},
3433-
"p2": {
3434-
"type": "string"
3435-
},
34363406
"social_link": {
34373407
"type": "string"
34383408
},
@@ -3466,13 +3436,10 @@
34663436
"subtitle": {
34673437
"type": "object",
34683438
"properties": {
3469-
"weeks": {
3439+
"some": {
34703440
"type": "string"
34713441
},
3472-
"commits": {
3473-
"type": "string"
3474-
},
3475-
"contributors": {
3442+
"all": {
34763443
"type": "string"
34773444
}
34783445
},

0 commit comments

Comments
 (0)