Skip to content

Commit 79b31df

Browse files
brabojclaude
andcommitted
fix: address P1 and P2 issues from code review
- Remove set:html XSS risk in Footer (#208) - Fix hardcoded JSON-LD URLs to use Astro.site (#209) - Fix dark mode link contrast for WCAG AAA (#210) - Remove unused search box CSS (#211) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ddea358 commit 79b31df

4 files changed

Lines changed: 5 additions & 43 deletions

File tree

astro-site/src/components/Footer.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import site from "../data/site.json";
33
---
44

55
<footer class="site-footer">
6-
<Fragment set:html={site.copyright} />
6+
{site.copyright}
77
</footer>

astro-site/src/pages/[...slug].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const jsonLd = {
3737
"isPartOf": {
3838
"@type": "Course",
3939
"name": "Git Tutorial — Code with Branko",
40-
"url": "https://braboj.github.io/tutorial-git/"
40+
"url": new URL(import.meta.env.BASE_URL, import.meta.env.SITE).toString()
4141
}
4242
};
4343
---

astro-site/src/pages/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const jsonLd = {
1616
"@type": "Course",
1717
"name": "Git Tutorial — Code with Branko",
1818
"description": "A hands-on Git tutorial from first commit to confident daily use — concepts, exercises, and real-world examples.",
19-
"url": "https://braboj.github.io/tutorial-git/",
19+
"url": new URL(import.meta.env.BASE_URL, import.meta.env.SITE).toString(),
2020
"provider": {
2121
"@type": "Person",
2222
"name": "Branimir Georgiev",

astro-site/src/styles/global.css

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
--color-fg-muted: #aaaaaa;
5656
--color-fg-faint: #888888;
5757
--color-border: #ffffff1f;
58-
--color-link: #4dd0e1;
59-
--color-focus: #4dd0e1;
58+
--color-link: #00bcd4;
59+
--color-focus: #00bcd4;
6060
--color-code-bg: #2a2a2a;
6161
--color-code-fg: #e0e0e0;
6262
}
@@ -169,44 +169,6 @@ a:hover {
169169
gap: var(--space-sm);
170170
}
171171

172-
/* Search box */
173-
.search-box {
174-
position: relative;
175-
display: flex;
176-
align-items: center;
177-
}
178-
179-
.search-icon {
180-
position: absolute;
181-
left: 0.5rem;
182-
color: #fff;
183-
opacity: 0.7;
184-
pointer-events: none;
185-
}
186-
187-
.search-box input {
188-
background: rgba(255, 255, 255, 0.15);
189-
border: none;
190-
border-radius: 3px;
191-
color: #fff;
192-
font-family: var(--font-text);
193-
font-size: var(--font-size-sm);
194-
padding: 0.35rem 0.5rem 0.35rem 2rem;
195-
width: 10rem;
196-
transition: background 0.2s, width 0.2s;
197-
}
198-
199-
.search-box input::placeholder {
200-
color: rgba(255, 255, 255, 0.7);
201-
}
202-
203-
.search-box input:focus-visible {
204-
background: rgba(255, 255, 255, 0.25);
205-
width: 14rem;
206-
outline: 2px solid #fff;
207-
outline-offset: 1px;
208-
}
209-
210172
/* Theme toggle */
211173
.theme-toggle {
212174
background: none;

0 commit comments

Comments
 (0)