Make the resume bilingual and part of the shared site chrome
Adds a Russian version (data/resume.ru.json, default language) with an RU/EN switch stored under the key shared with the front page and the portfolio. The top bar becomes the site-wide one (brand, Resume, Portfolio, Gitea, Contact, language, theme) with a second row of anchors for this page's sections, and the fonts move to Unbounded and Onest so the three pages share one type system. Portfolio links now point at /portfolio/. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XtcZtnG4GQA1d6mW5PNrS9
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
'use client'
|
||||
|
||||
import { useEffect, useState } from 'react'
|
||||
import { useLang } from '@/lib/useLang'
|
||||
import styles from './topbar.module.css'
|
||||
|
||||
type Theme = 'dark' | 'light'
|
||||
@@ -8,6 +9,7 @@ type Theme = 'dark' | 'light'
|
||||
/** Switches between the dark (default) and light theme; the choice is remembered in this browser. */
|
||||
export default function ThemeToggle() {
|
||||
const [theme, setTheme] = useState<Theme>('dark')
|
||||
const lang = useLang()
|
||||
|
||||
// The page starts dark; a small script in <head> applies a stored "light" choice before the first paint.
|
||||
useEffect(() => {
|
||||
@@ -30,7 +32,11 @@ export default function ThemeToggle() {
|
||||
type="button"
|
||||
className={styles.toggle}
|
||||
onClick={toggle}
|
||||
aria-label={theme === 'dark' ? 'Switch to the light theme' : 'Switch to the dark theme'}
|
||||
aria-label={
|
||||
theme === 'dark'
|
||||
? lang === 'ru' ? 'Включить светлую тему' : 'Switch to the light theme'
|
||||
: lang === 'ru' ? 'Включить тёмную тему' : 'Switch to the dark theme'
|
||||
}
|
||||
>
|
||||
{theme === 'dark' ? (
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true">
|
||||
|
||||
Reference in New Issue
Block a user