Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5006163ddf | |||
| 35fb31249a | |||
| 120ba0488c | |||
| ffb637e05c | |||
| b97de267d9 | |||
| 1c3918d9e3 | |||
| c89933a7d4 | |||
| d67085fef8 |
@@ -149,7 +149,7 @@ export function TeamGrid({ members }: TeamGridProps) {
|
||||
className="group flex flex-col bg-white rounded-[2rem] border border-neutral-100 shadow-[0_8px_30px_rgb(0,0,0,0.04)] hover:shadow-[0_20px_40px_rgba(238,114,3,0.1)] transition-all duration-500 hover:-translate-y-2 overflow-hidden"
|
||||
>
|
||||
{/* Card Banner with Signature E-TIB LogoArcs Design Element */}
|
||||
<div className="h-36 bg-neutral-50 relative border-b border-neutral-100 overflow-hidden select-none">
|
||||
<div className="h-44 sm:h-52 md:h-36 bg-neutral-50 relative border-b border-neutral-100 overflow-hidden select-none">
|
||||
<div className="absolute inset-0 bg-gradient-to-br from-neutral-100/90 via-neutral-50 to-orange-50/20" />
|
||||
|
||||
{/* Signature E-TIB Logo Arcs Design Element */}
|
||||
@@ -171,17 +171,19 @@ export function TeamGrid({ members }: TeamGridProps) {
|
||||
<div className="absolute inset-0 opacity-[0.025] pointer-events-none" style={{ backgroundImage: "url('data:image/svg+xml,%3Csvg width=\\'20\\' height=\\'20\\' viewBox=\\'0 0 20 20\\' xmlns=\\'http://www.w3.org/2000/svg\\'%3E%3Crect width=\\'1\\' height=\\'1\\' fill=\\'%23000000\\'/%3E%3C/svg%3E')" }} />
|
||||
</div>
|
||||
|
||||
<div className="px-8 pb-8 relative flex-grow flex flex-col">
|
||||
{/* Overlapping Profile Picture with Shared Layout Animation */}
|
||||
<div className="px-6 sm:px-8 pb-8 relative flex-grow flex flex-col items-center md:items-start text-center md:text-left">
|
||||
{/* Overlapping Profile Picture (Extra Large Centered on Mobile, Lightbox modal active only on Desktop) */}
|
||||
<m.div
|
||||
layoutId={`team-avatar-${member.id}`}
|
||||
onClick={() => {
|
||||
setPage([0, 0]);
|
||||
setSelectedMember(member);
|
||||
if (typeof window !== 'undefined' && window.innerWidth >= 768) {
|
||||
setPage([0, 0]);
|
||||
setSelectedMember(member);
|
||||
}
|
||||
}}
|
||||
onMouseEnter={() => handlePreload(imageUrl)}
|
||||
onTouchStart={() => handlePreload(imageUrl)}
|
||||
className="w-32 h-32 md:w-36 md:h-36 rounded-2xl overflow-hidden border-4 border-white shadow-xl bg-white relative -mt-16 md:-mt-20 mb-6 group-hover:-translate-y-2 transition-transform duration-500 cursor-pointer group/avatar"
|
||||
className="w-52 h-64 sm:w-60 sm:h-72 md:w-36 md:h-44 mx-auto md:mx-0 rounded-2xl overflow-hidden border-4 border-white shadow-xl bg-white relative -mt-28 md:-mt-24 mb-6 transition-transform duration-500 cursor-default md:cursor-pointer group/avatar"
|
||||
>
|
||||
{imageUrl ? (
|
||||
<>
|
||||
@@ -189,11 +191,11 @@ export function TeamGrid({ members }: TeamGridProps) {
|
||||
src={imageUrl}
|
||||
alt={member.name}
|
||||
fill
|
||||
sizes="(max-width: 768px) 128px, 144px"
|
||||
className="object-cover transition-transform duration-500 group-hover/avatar:scale-105"
|
||||
sizes="(max-width: 768px) 300px, 144px"
|
||||
className="object-cover object-[center_15%] transition-transform duration-500 group-hover/avatar:scale-105"
|
||||
/>
|
||||
{/* Zoom Icon Overlay on Hover */}
|
||||
<div className="absolute inset-0 bg-black/40 opacity-0 group-hover/avatar:opacity-100 transition-opacity duration-300 flex items-center justify-center text-white cursor-pointer">
|
||||
{/* Zoom Icon Overlay on Hover (Desktop only) */}
|
||||
<div className="hidden md:flex absolute inset-0 bg-black/40 opacity-0 group-hover/avatar:opacity-100 transition-opacity duration-300 items-center justify-center text-white cursor-pointer">
|
||||
<svg className="w-8 h-8 drop-shadow-md" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
||||
<circle cx="11" cy="11" r="8"></circle>
|
||||
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
@@ -204,8 +206,8 @@ export function TeamGrid({ members }: TeamGridProps) {
|
||||
</>
|
||||
) : (
|
||||
<div className="absolute inset-0 flex items-center justify-center text-neutral-300 bg-neutral-50 group-hover/avatar:bg-neutral-100 transition-colors">
|
||||
<svg className="w-14 h-14" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>
|
||||
<div className="absolute inset-0 bg-black/30 opacity-0 group-hover/avatar:opacity-100 transition-opacity duration-300 flex items-center justify-center text-white cursor-pointer">
|
||||
<svg className="w-16 h-16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>
|
||||
<div className="hidden md:flex absolute inset-0 bg-black/30 opacity-0 group-hover/avatar:opacity-100 transition-opacity duration-300 items-center justify-center text-white cursor-pointer">
|
||||
<svg className="w-8 h-8 drop-shadow-md" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
||||
<circle cx="11" cy="11" r="8"></circle>
|
||||
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
@@ -230,7 +232,7 @@ export function TeamGrid({ members }: TeamGridProps) {
|
||||
)}
|
||||
|
||||
{/* Contacts (Sticky at bottom) */}
|
||||
<div className="mt-auto pt-6 border-t border-neutral-100 flex flex-col gap-4">
|
||||
<div className="mt-auto pt-6 border-t border-neutral-100 flex flex-col gap-4 w-full text-left">
|
||||
{member.email && (
|
||||
<a href={`mailto:${member.email}`} className="group/link flex items-center gap-4 text-text-secondary hover:text-primary transition-colors font-medium cursor-pointer">
|
||||
<div className="w-10 h-10 rounded-xl bg-neutral-50 flex items-center justify-center text-neutral-400 group-hover/link:bg-primary/10 group-hover/link:text-primary transition-colors border border-neutral-100">
|
||||
@@ -365,15 +367,15 @@ export function TeamGrid({ members }: TeamGridProps) {
|
||||
scale: { duration: 0.25 },
|
||||
}}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
className="bg-white rounded-3xl overflow-hidden max-w-lg w-full shadow-2xl border border-white/20 relative flex flex-col z-20 my-auto touch-none cursor-grab active:cursor-grabbing"
|
||||
className="bg-white rounded-[2rem] sm:rounded-3xl overflow-hidden max-w-[380px] sm:max-w-md md:max-w-lg w-full shadow-2xl border border-white/20 relative flex flex-col z-20 my-auto touch-none cursor-grab active:cursor-grabbing shrink-0"
|
||||
>
|
||||
{/* Mobile Drag Indicator Bar */}
|
||||
<div className="absolute top-3 left-1/2 -translate-x-1/2 z-30 w-12 h-1.5 rounded-full bg-white/50 backdrop-blur-sm pointer-events-none" />
|
||||
|
||||
{/* Portrait Container - Height tuned for Mobile without vertical squishing */}
|
||||
{/* Portrait Container - Immersive Extra Large Portrait Aspect Framing for Mobile */}
|
||||
<m.div
|
||||
layoutId={`team-avatar-${selectedMember.id}`}
|
||||
className="relative w-full h-[320px] sm:h-[400px] md:h-[450px] bg-neutral-900 overflow-hidden shrink-0"
|
||||
className="relative w-full h-[60vh] min-h-[440px] max-h-[620px] md:h-[460px] bg-neutral-900 overflow-hidden shrink-0"
|
||||
>
|
||||
{selectedMember.image ? (
|
||||
<Image
|
||||
@@ -381,7 +383,7 @@ export function TeamGrid({ members }: TeamGridProps) {
|
||||
alt={selectedMember.name}
|
||||
fill
|
||||
sizes="(max-width: 768px) 100vw, 600px"
|
||||
className="object-cover object-top pointer-events-none select-none"
|
||||
className="object-cover object-[center_15%] pointer-events-none select-none"
|
||||
priority
|
||||
/>
|
||||
) : (
|
||||
|
||||
@@ -104,7 +104,7 @@ layout: "fullBleed"
|
||||
icon: "hdd",
|
||||
lists: [
|
||||
[
|
||||
"Horizontalspülbohrverfahren (bis 250m)",
|
||||
"Horizontalspülbohrverfahren (bis 400m)",
|
||||
"Horizontalspülbohrverfahren (bis 400er Rohr)",
|
||||
"Erdrakete (bis 15m DÖ-Länge)",
|
||||
"Erdrakete (bis 160er Rohr)"
|
||||
|
||||
@@ -104,7 +104,7 @@ layout: "fullBleed"
|
||||
icon: "hdd",
|
||||
lists: [
|
||||
[
|
||||
"Horizontal directional drilling (up to 250m)",
|
||||
"Horizontal directional drilling (up to 400m)",
|
||||
"Horizontal directional drilling (up to 400mm pipe)",
|
||||
"Earth rocket (up to 15m crossing length)",
|
||||
"Earth rocket (up to 160mm pipe)"
|
||||
|
||||
@@ -27,7 +27,8 @@ services:
|
||||
- "traefik.http.routers.${PROJECT_NAME:-klz}.middlewares=${AUTH_MIDDLEWARE:-etib-ratelimit,etib-forward,etib-compress}"
|
||||
|
||||
# Public Router – paths that bypass Gatekeeper auth (health, SEO, static assets, OG images)
|
||||
- "traefik.http.routers.${PROJECT_NAME:-klz}-public.rule=(${TRAEFIK_HOST_RULE:-Host(`${TRAEFIK_HOST:-e-tib.com}`) || Host(`staging.${TRAEFIK_HOST:-e-tib.com}`) || Host(`testing.${TRAEFIK_HOST:-e-tib.com}`)}) && PathRegexp(`^/([a-z]{2}/)?(health|login|gatekeeper|uploads|media|assets|robots\\.txt|manifest\\.webmanifest|sitemap(-[0-9]+)?\\.xml|(.*/)?api/og(/.*)?|(.*/)?opengraph-image.*)`)"
|
||||
- "traefik.http.routers.${PROJECT_NAME:-klz}-public.rule=(${TRAEFIK_HOST_RULE:-Host(`${TRAEFIK_HOST:-e-tib.com}`) || Host(`staging.${TRAEFIK_HOST:-e-tib.com}`) || Host(`testing.${TRAEFIK_HOST:-e-tib.com}`)}) && PathRegexp(`^/([a-z]{2}/)?(health|login|gatekeeper|uploads|media|assets|_next|robots\\.txt|manifest\\.webmanifest|sitemap(-[0-9]+)?\\.xml|(.*/)?api/og(/.*)?|(.*/)?opengraph-image.*)`)"
|
||||
|
||||
- "traefik.http.routers.${PROJECT_NAME:-klz}-public.entrypoints=${TRAEFIK_ENTRYPOINT:-web}"
|
||||
- "traefik.http.routers.${PROJECT_NAME:-klz}-public.tls.certresolver=${TRAEFIK_CERT_RESOLVER:-}"
|
||||
- "traefik.http.routers.${PROJECT_NAME:-klz}-public.tls=${TRAEFIK_TLS:-false}"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "e-tib-nextjs",
|
||||
"version": "2.4.49",
|
||||
"version": "2.4.57",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@10.18.3",
|
||||
|
||||
11
proxy.ts
11
proxy.ts
@@ -7,11 +7,12 @@ export default createMiddleware({
|
||||
});
|
||||
|
||||
export const config = {
|
||||
// Match all pathnames except for
|
||||
// Match all pathnames except for:
|
||||
// - /api (API routes)
|
||||
// - /stats (Analytics proxy)
|
||||
// - /_next (Next.js internals)
|
||||
// - /_static (inside /public)
|
||||
// - all root files inside /public (e.g. /favicon.ico)
|
||||
matcher: ['/((?!api|stats|_next|assets|_static|_vercel|[\\w-]+\\.\\w+).*)']
|
||||
// - /_next (Next.js internals & image optimizer)
|
||||
// - /assets, /_static (static files in /public)
|
||||
// - all files with an extension (e.g. /favicon.ico, .JPG, .png, .webp, .svg)
|
||||
matcher: ['/((?!api|stats|_next|assets|_static|_vercel|.*\\..*).*)']
|
||||
};
|
||||
|
||||
|
||||
21
tests/proxy-config.test.ts
Normal file
21
tests/proxy-config.test.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { config } from '../proxy';
|
||||
|
||||
describe('Proxy Middleware Config Matcher', () => {
|
||||
const matcherRegex = new RegExp(`^${config.matcher[0]}`);
|
||||
|
||||
|
||||
it('matches localized page routes for next-intl processing', () => {
|
||||
expect(matcherRegex.test('/de')).toBe(true);
|
||||
expect(matcherRegex.test('/en/contact')).toBe(true);
|
||||
expect(matcherRegex.test('/karriere')).toBe(true);
|
||||
});
|
||||
|
||||
it('excludes static assets with any file extension including uppercase .JPG and subdirectories', () => {
|
||||
// These should NOT match the middleware (expect test to be false so middleware is bypassed)
|
||||
expect(matcherRegex.test('/assets/photos/DJI_0048.JPG')).toBe(false);
|
||||
expect(matcherRegex.test('/assets/videos/web/hero-kabelpflug-poster.jpg')).toBe(false);
|
||||
expect(matcherRegex.test('/assets/logo-white.png')).toBe(false);
|
||||
expect(matcherRegex.test('/_next/image')).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user