chore: optimize reference gallery, add typography plugin, fix SEO and map animations
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 37s
Build & Deploy / 🧪 QA (push) Failing after 1m31s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 4s
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 37s
Build & Deploy / 🧪 QA (push) Failing after 1m31s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 4s
This commit is contained in:
86
lib/map-data.ts
Normal file
86
lib/map-data.ts
Normal file
@@ -0,0 +1,86 @@
|
||||
export interface Location {
|
||||
id: string;
|
||||
name: string;
|
||||
type: 'hq' | 'branch' | 'project';
|
||||
x: number;
|
||||
y: number;
|
||||
description: string;
|
||||
details?: string[];
|
||||
href?: string;
|
||||
featuredImage?: string;
|
||||
}
|
||||
|
||||
export const defaultLocations: Location[] = [
|
||||
{
|
||||
id: 'guben',
|
||||
name: 'Guben (Hauptsitz)',
|
||||
type: 'hq',
|
||||
x: 85,
|
||||
y: 48,
|
||||
description: 'E-TIB GmbH Holding & Bohrtechnik GmbH',
|
||||
details: ['Zentrale Steuerung', 'Kabelleitungstiefbau', 'Maschinenpark'],
|
||||
},
|
||||
{
|
||||
id: 'buelstedt',
|
||||
name: 'Bülstedt (Ingenieurgesellschaft)',
|
||||
type: 'branch',
|
||||
x: 37,
|
||||
y: 25,
|
||||
description: 'E-TIB Ingenieurgesellschaft mbH',
|
||||
details: ['Planung & Projektierung', 'Vermessung', 'Dokumentation'],
|
||||
},
|
||||
{
|
||||
id: 'spreewald',
|
||||
name: 'Spreewald (LWL-Trasse)',
|
||||
type: 'project',
|
||||
x: 81,
|
||||
y: 42,
|
||||
description: '28km LWL-Trasse inkl. Spülbohrung',
|
||||
href: '/referenzen/spreewald',
|
||||
},
|
||||
{
|
||||
id: 'bomlitz',
|
||||
name: 'Bomlitz (110kV-Trasse)',
|
||||
type: 'project',
|
||||
x: 43,
|
||||
y: 30,
|
||||
description: 'Neuverlegung einer 110kV Hochspannungstrasse',
|
||||
href: '/referenzen/bomlitz',
|
||||
},
|
||||
{
|
||||
id: 'forst',
|
||||
name: 'Forst (Verteilerknoten)',
|
||||
type: 'project',
|
||||
x: 87,
|
||||
y: 52,
|
||||
description: 'Ausbau lokaler Glasfasernetze',
|
||||
href: '/referenzen/forst',
|
||||
},
|
||||
{
|
||||
id: 'eisenhuettenstadt',
|
||||
name: 'Eisenhüttenstadt (Industriegebiet)',
|
||||
type: 'project',
|
||||
x: 86,
|
||||
y: 44,
|
||||
description: 'Erschließung Industriegebiet Nord',
|
||||
href: '/referenzen/eisenhuettenstadt',
|
||||
},
|
||||
{
|
||||
id: 'goerne',
|
||||
name: 'Görne (Breitbandausbau)',
|
||||
type: 'project',
|
||||
x: 65,
|
||||
y: 35,
|
||||
description: 'Glasfaser-Rückgrat für 3 Gemeinden',
|
||||
href: '/referenzen/goerne',
|
||||
},
|
||||
{
|
||||
id: 'boerde',
|
||||
name: 'Börde (Windpark-Anschluss)',
|
||||
type: 'project',
|
||||
x: 55,
|
||||
y: 38,
|
||||
description: 'Kabeltrasse für erneuerbare Energien',
|
||||
href: '/referenzen/boerde',
|
||||
}
|
||||
];
|
||||
52
lib/references.ts
Normal file
52
lib/references.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import matter from 'gray-matter';
|
||||
|
||||
export interface ReferenceFrontmatter {
|
||||
title: string;
|
||||
client: string;
|
||||
date: string;
|
||||
dateString?: string;
|
||||
featuredImage?: string | null;
|
||||
location: string;
|
||||
}
|
||||
|
||||
export interface ReferenceData {
|
||||
slug: string;
|
||||
frontmatter: ReferenceFrontmatter;
|
||||
content: string;
|
||||
}
|
||||
|
||||
export async function getReferenceBySlug(slug: string, locale: string): Promise<ReferenceData | null> {
|
||||
const localeDir = path.join(process.cwd(), 'content', locale, 'referenzen');
|
||||
const filePath = path.join(localeDir, `${slug}.mdx`);
|
||||
|
||||
if (!fs.existsSync(filePath)) return null;
|
||||
|
||||
const source = fs.readFileSync(filePath, 'utf8');
|
||||
const { content, data } = matter(source);
|
||||
|
||||
return {
|
||||
slug,
|
||||
frontmatter: data as ReferenceFrontmatter,
|
||||
content,
|
||||
};
|
||||
}
|
||||
|
||||
export async function getAllReferences(locale: string): Promise<ReferenceData[]> {
|
||||
const localeDir = path.join(process.cwd(), 'content', locale, 'referenzen');
|
||||
if (!fs.existsSync(localeDir)) return [];
|
||||
|
||||
const files = fs.readdirSync(localeDir).filter(f => f.endsWith('.mdx'));
|
||||
|
||||
const references = await Promise.all(
|
||||
files.map(async f => {
|
||||
const slug = f.replace('.mdx', '');
|
||||
return await getReferenceBySlug(slug, locale);
|
||||
})
|
||||
);
|
||||
|
||||
return references
|
||||
.filter((p): p is ReferenceData => p !== null)
|
||||
.sort((a, b) => new Date(b.frontmatter.date).getTime() - new Date(a.frontmatter.date).getTime());
|
||||
}
|
||||
@@ -17,9 +17,9 @@ export const getOrganizationSchema = () => ({
|
||||
sameAs: ['https://www.instagram.com/me.and.eloise/'],
|
||||
contactPoint: {
|
||||
'@type': 'ContactPoint' as const,
|
||||
telephone: '+49-15207230518',
|
||||
telephone: '+4935616857733',
|
||||
contactType: 'customer service' as const,
|
||||
email: 'd.joseph@e-tib.com',
|
||||
email: 'info@e-tib.com',
|
||||
availableLanguage: ['German', 'English'],
|
||||
},
|
||||
});
|
||||
@@ -43,8 +43,8 @@ export const getLocalBusinessSchema = () => ({
|
||||
logo: LOGO_URL,
|
||||
image: LOGO_URL,
|
||||
description: 'Ihr Partner für Kabelleitungstiefbau, Horizontalspülbohrungen, Planung und Vermessung in Guben und überregional.',
|
||||
telephone: '+49-15207230518',
|
||||
email: 'd.joseph@e-tib.com',
|
||||
telephone: '+4935616857733',
|
||||
email: 'info@e-tib.com',
|
||||
address: {
|
||||
'@type': 'PostalAddress' as const,
|
||||
streetAddress: 'Gewerbestraße 22',
|
||||
|
||||
Reference in New Issue
Block a user