From ab27bb1183f1d016c7a8980aea803a27c685aca2 Mon Sep 17 00:00:00 2001 From: Alex Mickelson Date: Thu, 5 Mar 2026 10:36:32 -0700 Subject: [PATCH] landing page updates --- kubernetes/gitea/landingpage.css | 29 ----------------------------- kubernetes/gitea/landingpage.html | 4 ---- kubernetes/gitea/landingpage.js | 10 +++++++--- 3 files changed, 7 insertions(+), 36 deletions(-) diff --git a/kubernetes/gitea/landingpage.css b/kubernetes/gitea/landingpage.css index 8dce0d9..8855af6 100644 --- a/kubernetes/gitea/landingpage.css +++ b/kubernetes/gitea/landingpage.css @@ -65,35 +65,6 @@ background-clip: text; } -.hero-links { - display: flex; - gap: var(--space-xs); - justify-content: center; - flex-wrap: wrap; -} -.btn-primary { - padding: var(--space-2xs) var(--space-lg); - border-radius: var(--radius-md); - background: var(--color-success); - color: var(--color-white); - font-weight: 600; - font-size: var(--text-btn); - text-decoration: none; - transition: background 0.2s; -} -.btn-primary:hover { background: var(--color-success-hover); } -.btn-ghost { - padding: var(--space-2xs) var(--space-lg); - border-radius: var(--radius-md); - border: 1px solid var(--color-border-muted); - color: var(--color-text); - font-weight: 600; - font-size: var(--text-btn); - text-decoration: none; - transition: border-color 0.2s, background 0.2s; -} -.btn-ghost:hover { border-color: var(--color-accent); background: var(--color-accent-subtle); } - /* Projects section */ .projects-section { max-width: 1100px; diff --git a/kubernetes/gitea/landingpage.html b/kubernetes/gitea/landingpage.html index 6e3e8ee..2dc32d6 100644 --- a/kubernetes/gitea/landingpage.html +++ b/kubernetes/gitea/landingpage.html @@ -5,10 +5,6 @@

Alex Mickelson

-
diff --git a/kubernetes/gitea/landingpage.js b/kubernetes/gitea/landingpage.js index f5db01b..dd8ece1 100644 --- a/kubernetes/gitea/landingpage.js +++ b/kubernetes/gitea/landingpage.js @@ -87,9 +87,10 @@ card.href = esc(repoUrl); card.innerHTML = `
+ 📦 ${esc(shortName)}
-
${esc(repoName)}
+
${esc(repoName)}
${esc(commitMsg)} @@ -147,9 +148,12 @@ const description = item.querySelector('description')?.textContent || ''; const when = pubDate ? timeAgo(pubDate) : ''; - // Strip HTML from title for plain text display + // Parse title HTML — Gitea only puts tags in it, safe to use as innerHTML const titleDoc = new DOMParser().parseFromString(title, 'text/html'); const titleText = titleDoc.body.textContent || title; + // Preserve links but strip any unsafe tags (only expected from Gitea) + titleDoc.body.querySelectorAll('*:not(a)').forEach(el => el.replaceWith(el.textContent)); + const titleHtmlSafe = titleDoc.body.innerHTML; let icon = '⚡'; const t = titleText.toLowerCase(); @@ -192,7 +196,7 @@ el.innerHTML = `
${icon}
- +
${titleHtmlSafe}
${commitsHtml}
${when}