From 5b887c7926a5e3332b464894d68a0b567ff2b871 Mon Sep 17 00:00:00 2001 From: Jalil Arfaoui Date: Wed, 11 Mar 2026 15:23:49 +0100 Subject: [PATCH] =?UTF-8?q?Refactoring=20CSS=20cards=20parcours=20:=20CSS?= =?UTF-8?q?=20partag=C3=A9,=20propri=C3=A9t=C3=A9s=20logiques,=20suppressi?= =?UTF-8?q?on=20des=20!important=20et=20de=20la=20duplication=203x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/main.astro | 22 +++-- src/pages/ar/برمجة/مسار.astro | 88 ++------------------ src/pages/code/parcours.astro | 88 ++------------------ src/pages/en/code/career.astro | 88 ++------------------ src/styles/exp-card.css | 144 +++++++++++++++++++++++++++++++++ 5 files changed, 177 insertions(+), 253 deletions(-) create mode 100644 src/styles/exp-card.css diff --git a/src/layouts/main.astro b/src/layouts/main.astro index c4df27a..f5027a7 100644 --- a/src/layouts/main.astro +++ b/src/layouts/main.astro @@ -55,25 +55,33 @@ const locale = pathname.startsWith("/en") color: rgba(255, 255, 255, 0.85) !important; } + /* + * Page-level text overrides for the purple gradient. + * Any component that manages its own colors should add + * the `.code-card` class — it will be excluded automatically. + */ [data-facet="code"] > section h1, - [data-facet="code"] > section h2, - [data-facet="code"] > section h3:not(.exp-card h3):not(.facet-card h3), - [data-facet="code"] > section strong:not(.exp-card strong):not(.facet-card strong) { + [data-facet="code"] > section h2 { color: white !important; } - [data-facet="code"] > section a:not(.facet-card a) { + [data-facet="code"] > section h3:not(.code-card h3), + [data-facet="code"] > section strong:not(.code-card strong) { + color: white !important; + } + + [data-facet="code"] > section a:not(.code-card a) { color: #d4b5ff !important; text-decoration-color: rgba(212, 181, 255, 0.3) !important; } - [data-facet="code"] > section a:not(.facet-card a):hover { + [data-facet="code"] > section a:not(.code-card a):hover { color: white !important; text-decoration-color: white !important; } - [data-facet="code"] > section p:not(.exp-card p):not(.facet-card p), - [data-facet="code"] > section li:not(.exp-card li):not(.facet-card li) { + [data-facet="code"] > section p:not(.code-card p), + [data-facet="code"] > section li:not(.code-card li) { color: rgba(255, 255, 255, 0.75) !important; } diff --git a/src/pages/ar/برمجة/مسار.astro b/src/pages/ar/برمجة/مسار.astro index 9c527c2..9922699 100644 --- a/src/pages/ar/برمجة/مسار.astro +++ b/src/pages/ar/برمجة/مسار.astro @@ -2,6 +2,7 @@ import { getCollection, render } from "astro:content"; import { Image } from "astro:assets"; import Layout from "../../../layouts/main.astro"; +import "../../../styles/exp-card.css"; const logos = import.meta.glob<{ default: ImageMetadata }>('../../../assets/images/companies/*.png', { eager: true }); @@ -91,12 +92,12 @@ function computeDuration(startStr: string, endStr?: string) {
{getLogo(exp.data.logo) ? ( -