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()
|
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 />)
|
render(<Footer />)
|
||||||
|
|
||||||
const currentYear = new Date().getFullYear()
|
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', () => {
|
it('should render legal links', () => {
|
||||||
|
|||||||
@@ -135,7 +135,8 @@ export default function Footer() {
|
|||||||
className="text-sm"
|
className="text-sm"
|
||||||
style={{ color: 'var(--color-foreground-muted)' }}
|
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>
|
</p>
|
||||||
<div className="flex items-center gap-6">
|
<div className="flex items-center gap-6">
|
||||||
{siteConfig.footer.links.map((link) => (
|
{siteConfig.footer.links.map((link) => (
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export const siteConfig: SiteConfig = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
footer: {
|
footer: {
|
||||||
copyright: `© ${new Date().getFullYear()} mozdIT Bt. Minden jog fenntartva.`,
|
// Copyright text lives in content/common.json (CMS-editable) — only links remain here.
|
||||||
links: [
|
links: [
|
||||||
{ label: 'Adatvédelmi tájékoztató', href: '/adatvedelem' },
|
{ label: 'Adatvédelmi tájékoztató', href: '/adatvedelem' },
|
||||||
{ label: 'Használati feltételek', href: '/felhasznalasi-feltetelek' }
|
{ label: 'Használati feltételek', href: '/felhasznalasi-feltetelek' }
|
||||||
|
|||||||
@@ -16,5 +16,8 @@
|
|||||||
},
|
},
|
||||||
"staging": {
|
"staging": {
|
||||||
"banner": "⚠ STAGING / TESZTKÖRNYEZET — A STAGING OLDALT LÁTOD"
|
"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 }),
|
labels: object({ required: string, features: string }),
|
||||||
validation: object({ required: string, invalidEmail: string, minLength: string }),
|
validation: object({ required: string, invalidEmail: string, minLength: string }),
|
||||||
staging: object({ banner: string }),
|
staging: object({ banner: string }),
|
||||||
|
footer: object({ copyright: string }),
|
||||||
}),
|
}),
|
||||||
home: object({
|
home: object({
|
||||||
hero: object({ title: string, subtitle: string, description: string, trustBullets: array(string), cta: object({ primary: ctaLink, secondary: ctaLink }) }),
|
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: {
|
staging: {
|
||||||
banner: string
|
banner: string
|
||||||
}
|
}
|
||||||
|
footer: {
|
||||||
|
copyright: string
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LegalPageContent {
|
export interface LegalPageContent {
|
||||||
|
|||||||
Reference in New Issue
Block a user