fix: dynamic year calculation in Footer and remove WhatsApp button from desktop Header
This commit is contained in:
+2
-2
@@ -419,7 +419,7 @@ async function run() {
|
|||||||
title: 'Działam w ramach b.b.h. Lohnsteuerhilfeverein e.V.',
|
title: 'Działam w ramach b.b.h. Lohnsteuerhilfeverein e.V.',
|
||||||
link: 'https://bbh-lohnsteuerhilfe.de',
|
link: 'https://bbh-lohnsteuerhilfe.de',
|
||||||
},
|
},
|
||||||
copyright: '© 2024 Finanz- & Lohnbuchhaltung Dipl.-Ing. Janusz Kędzierski. Wszelkie prawa zastrzeżone.',
|
copyright: '© {year} Finanz- & Lohnbuchhaltung Dipl.-Ing. Janusz Kędzierski. Wszelkie prawa zastrzeżone.',
|
||||||
creator: {
|
creator: {
|
||||||
label: 'Realizacja:',
|
label: 'Realizacja:',
|
||||||
name: 'NetScale',
|
name: 'NetScale',
|
||||||
@@ -437,7 +437,7 @@ async function run() {
|
|||||||
title: 'Ich bin im Rahmen des b.b.h. Lohnsteuerhilfevereins e.V. tätig.',
|
title: 'Ich bin im Rahmen des b.b.h. Lohnsteuerhilfevereins e.V. tätig.',
|
||||||
link: 'https://bbh-lohnsteuerhilfe.de',
|
link: 'https://bbh-lohnsteuerhilfe.de',
|
||||||
},
|
},
|
||||||
copyright: '© 2024 Finanz- & Lohnbuchhaltung Dipl.-Ing. Janusz Kędzierski. Alle Rechte vorbehalten.',
|
copyright: '© {year} Finanz- & Lohnbuchhaltung Dipl.-Ing. Janusz Kędzierski. Alle Rechte vorbehalten.',
|
||||||
creator: {
|
creator: {
|
||||||
label: 'Erstellt von',
|
label: 'Erstellt von',
|
||||||
name: 'NetScale',
|
name: 'NetScale',
|
||||||
|
|||||||
@@ -36,7 +36,14 @@ export function Footer({
|
|||||||
const assocLink = association?.link;
|
const assocLink = association?.link;
|
||||||
const assocLogo = association?.logo;
|
const assocLogo = association?.logo;
|
||||||
|
|
||||||
const copyrightText = getLocText(copyright) || `© ${new Date().getFullYear()} Finanz- & Lohnbuchhaltung Dipl.-Ing. Janusz Kędzierski.`;
|
const currentYear = new Date().getFullYear();
|
||||||
|
const rawCopyright = getLocText(copyright);
|
||||||
|
const copyrightText = rawCopyright
|
||||||
|
? rawCopyright
|
||||||
|
.replace(/\b(19|20)\d{2}\b/, currentYear.toString())
|
||||||
|
.replace('{year}', currentYear.toString())
|
||||||
|
: `© ${currentYear} Finanz- & Lohnbuchhaltung Dipl.-Ing. Janusz Kędzierski. ${currentLocaleCode === 'de' ? 'Alle Rechte vorbehalten.' : 'Wszelkie prawa zastrzeżone.'}`;
|
||||||
|
|
||||||
const creatorLabel = getLocText(creator?.label);
|
const creatorLabel = getLocText(creator?.label);
|
||||||
const creatorName = creator?.name;
|
const creatorName = creator?.name;
|
||||||
const creatorUrl = creator?.url;
|
const creatorUrl = creator?.url;
|
||||||
|
|||||||
@@ -63,21 +63,8 @@ export function Header({ navItems = [] }: { navItems?: any[] }) {
|
|||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
{/* Right Actions & Hamburger */}
|
{/* Right Actions & Hamburger */}
|
||||||
<div className="flex items-center gap-4 z-50">
|
<div className="flex items-center gap-2 sm:gap-3 z-50">
|
||||||
<div className="flex items-center gap-2 sm:gap-4">
|
<div className="flex items-center gap-2">
|
||||||
<Link
|
|
||||||
href={process.env.NEXT_PUBLIC_WHATSAPP_NUMBER ? `https://wa.me/${process.env.NEXT_PUBLIC_WHATSAPP_NUMBER}` : '#'}
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
className="flex items-center gap-2 px-3 py-2 sm:px-5 sm:py-2.5 rounded-full bg-green-500 hover:bg-green-600 text-white transition-colors font-medium text-sm shadow-sm"
|
|
||||||
>
|
|
||||||
<MessageCircle size={18} />
|
|
||||||
<span className="hidden sm:inline">WhatsApp</span>
|
|
||||||
</Link>
|
|
||||||
<div className="w-px h-6 bg-border mx-1 sm:mx-2 hidden xl:block" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="hidden sm:flex items-center gap-2">
|
|
||||||
<ThemeSwitcher />
|
<ThemeSwitcher />
|
||||||
<LanguageSwitcher />
|
<LanguageSwitcher />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user