feat(footer): CMS-editable copyright with 2002–current year range
CI Pipeline with Test Management / 🧪 Run Tests & Generate Reports (push) Waiting to run
CI Pipeline with Test Management / 🐳 Docker Integration Tests (push) Blocked by required conditions
CI Pipeline with Test Management / 🏗️ Build Docker Image (push) Blocked by required conditions
CI Pipeline with Test Management / 📊 Generate Test Summary (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🧪 Run Tests & Generate Reports (push) Waiting to run
Test Reporting & Gherkin Analysis / 📊 Analyze Test Coverage (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🔄 Sync with Linear (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / ⚡ Performance Monitoring (push) Blocked by required conditions
CI Pipeline with Test Management / 🧪 Run Tests & Generate Reports (push) Waiting to run
CI Pipeline with Test Management / 🐳 Docker Integration Tests (push) Blocked by required conditions
CI Pipeline with Test Management / 🏗️ Build Docker Image (push) Blocked by required conditions
CI Pipeline with Test Management / 📊 Generate Test Summary (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🧪 Run Tests & Generate Reports (push) Waiting to run
Test Reporting & Gherkin Analysis / 📊 Analyze Test Coverage (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / 🔄 Sync with Linear (push) Blocked by required conditions
Test Reporting & Gherkin Analysis / ⚡ Performance Monitoring (push) Blocked by required conditions
The copyright text lived in site.ts with a build-time year and was not
CMS-editable. It now lives in common.json (footer.copyright, editable via
the Közös szövegek tab) with a {year} placeholder that resolves to the
current year at render: '© 2002–{year} mozdIT Bt. Minden jog fenntartva.'
Schema and types extended; site.ts keeps only the footer links.
Closes MITHOME-66
This commit is contained in:
@@ -36,11 +36,11 @@ describe('Footer', () => {
|
||||
expect(screen.getByText('Műszaki támogatás')).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('should render copyright notice with dynamic year', () => {
|
||||
it('should render copyright notice from common.json with the current year', () => {
|
||||
render(<Footer />)
|
||||
|
||||
const currentYear = new Date().getFullYear()
|
||||
expect(screen.getByText(`© ${currentYear} mozdIT Bt. Minden jog fenntartva.`)).toBeInTheDocument()
|
||||
expect(screen.getByText(`© 2002–${currentYear} mozdIT Bt. Minden jog fenntartva.`)).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('should render legal links', () => {
|
||||
|
||||
@@ -131,11 +131,12 @@ export default function Footer() {
|
||||
style={{ borderColor: 'var(--color-border)' }}
|
||||
>
|
||||
<div className="flex flex-col sm:flex-row justify-between items-center gap-4">
|
||||
<p
|
||||
<p
|
||||
className="text-sm"
|
||||
style={{ color: 'var(--color-foreground-muted)' }}
|
||||
>
|
||||
{siteConfig.footer.copyright}
|
||||
{/* Copyright text is CMS-editable (common.json); {year} resolves to the current year */}
|
||||
{content.common.footer.copyright.replace('{year}', String(new Date().getFullYear()))}
|
||||
</p>
|
||||
<div className="flex items-center gap-6">
|
||||
{siteConfig.footer.links.map((link) => (
|
||||
|
||||
@@ -32,7 +32,7 @@ export const siteConfig: SiteConfig = {
|
||||
},
|
||||
|
||||
footer: {
|
||||
copyright: `© ${new Date().getFullYear()} mozdIT Bt. Minden jog fenntartva.`,
|
||||
// Copyright text lives in content/common.json (CMS-editable) — only links remain here.
|
||||
links: [
|
||||
{ label: 'Adatvédelmi tájékoztató', href: '/adatvedelem' },
|
||||
{ label: 'Használati feltételek', href: '/felhasznalasi-feltetelek' }
|
||||
|
||||
@@ -16,5 +16,8 @@
|
||||
},
|
||||
"staging": {
|
||||
"banner": "⚠ STAGING / TESZTKÖRNYEZET — A STAGING OLDALT LÁTOD"
|
||||
},
|
||||
"footer": {
|
||||
"copyright": "© 2002–{year} mozdIT Bt. Minden jog fenntartva."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ const schemas = {
|
||||
labels: object({ required: string, features: string }),
|
||||
validation: object({ required: string, invalidEmail: string, minLength: string }),
|
||||
staging: object({ banner: string }),
|
||||
footer: object({ copyright: string }),
|
||||
}),
|
||||
home: object({
|
||||
hero: object({ title: string, subtitle: string, description: string, trustBullets: array(string), cta: object({ primary: ctaLink, secondary: ctaLink }) }),
|
||||
|
||||
@@ -193,6 +193,9 @@ export interface CommonContent {
|
||||
staging: {
|
||||
banner: string
|
||||
}
|
||||
footer: {
|
||||
copyright: string
|
||||
}
|
||||
}
|
||||
|
||||
export interface LegalPageContent {
|
||||
|
||||
Reference in New Issue
Block a user