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
49 changes: 1 addition & 48 deletions app/pages/recharging.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,48 +57,6 @@ const icons = [
'i-lucide:star',
'i-lucide:moon',
] as const

// --- .ics calendar reminder ---

// Format as UTC for the .ics file
const fmt = (d: Date) =>
d
.toISOString()
.replace(/[-:]/g, '')
.replace(/\.\d{3}/, '')

// Pick a random daytime hour (9–17) in the user's local timezone on Feb 22
// so reminders are staggered and people don't all flood in at once.
function downloadIcs() {
const hour = 9 + Math.floor(Math.random() * 9) // 9..17
const start = new Date(2026, 1, 22, hour, 0, 0) // month is 0-indexed
const end = new Date(2026, 1, 22, hour + 1, 0, 0)

const uid = `npmx-vacations-${start.getTime()}@npmx.dev`

const ics = [
'BEGIN:VCALENDAR',
'VERSION:2.0',
'PRODID:-//npmx//recharging//EN',
'BEGIN:VEVENT',
`DTSTART:${fmt(start)}`,
`DTEND:${fmt(end)}`,
`SUMMARY:npmx Discord is back!`,
`DESCRIPTION:The npmx team is back from vacation. Time to rejoin! https://chat.npmx.dev`,
'STATUS:CONFIRMED',
`UID:${uid}`,
'END:VEVENT',
'END:VCALENDAR',
].join('\r\n')

const blob = new Blob([ics], { type: 'text/calendar;charset=utf-8' })
const url = URL.createObjectURL(blob)
const a = document.createElement('a')
a.href = url
a.download = 'npmx-discord-reminder.ics'
a.click()
URL.revokeObjectURL(url)
}
</script>

<template>
Expand Down Expand Up @@ -149,7 +107,7 @@ function downloadIcs() {
</div>

<section class="prose prose-invert max-w-none space-y-8">
<!-- What's happening -->
<!-- What happened -->
<div>
<h2 class="text-lg text-fg-subtle uppercase tracking-wider mb-4">
{{ $t('vacations.what.title') }}
Expand Down Expand Up @@ -238,11 +196,6 @@ function downloadIcs() {
</template>
</i18n-t>
</p>

<!-- Add to calendar button -->
<ButtonBase classicon="i-lucide:calendar" @click="downloadIcs">
{{ $t('vacations.return.add_to_calendar') }}
</ButtonBase>
</div>

<div
Expand Down
19 changes: 9 additions & 10 deletions i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1131,28 +1131,27 @@
},
"vacations": {
"title": "on vacation",
"meta_description": "The npmx team is recharging. Discord reopens in a week.",
"meta_description": "The npmx team was recharging. Discord reopened after a week.",
"heading": "recharging",
"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.",
"subtitle": "we were building npmx at a pace that was costing {some} of us sleep. we didn't want that to be the norm! so we took a week off. together.",
"illustration_alt": "a single row of cosy icons",
"poke_log": "Poke the campfire",
"what": {
"title": "what's happening",
"p1": "discord is closed {dates}.",
"title": "what happened",
"p1": "discord was closed {dates}.",
"dates": "February 14 – 21",
"p2": "all invite links are gone and channels are locked – except {garden}, which stays open for folks who want to keep hanging out.",
"p2": "all invite links were gone and channels were locked – except {garden}, which stayed open for folks who wanted to keep hanging out.",
"garden": "#garden"
},
"meantime": {
"title": "in the meantime",
"p1": "{site} and {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.",
"p1": "{site} and {repo} stayed open – people still dug in, filed some issues, opened a few PRs, but mainly everyone spent time somewhere near a cosy fireplace.",
"repo_link": "the repo"
},
"return": {
"title": "see you soon",
"p1": "we'll come back recharged and ready for the final push to March 3rd. {social} for updates.",
"social_link": "follow us on Bluesky",
"add_to_calendar": "remind me when Discord reopens"
"title": "we came back!",
"p1": "we came back recharged and ready for the final push to March 3rd. {social} for updates.",
"social_link": "follow us on Bluesky"
},
"stats": {
"contributors": "Contributors",
Expand Down
3 changes: 0 additions & 3 deletions i18n/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3459,9 +3459,6 @@
},
"social_link": {
"type": "string"
},
"add_to_calendar": {
"type": "string"
}
},
"additionalProperties": false
Expand Down
2 changes: 1 addition & 1 deletion vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"value": "chat.npmx.dev"
}
],
"destination": "https://npmx.dev/recharging"
"destination": "https://discord.gg/x9KE5U2q8w"
},
{
"source": "/(.*)",
Expand Down
Loading