Skip to content
3 changes: 3 additions & 0 deletions .jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
## 2024-06-25 - Directory Listing Navigation Landmark
**Learning:** Generated directory listings act as navigation regions, and screen readers benefit when the listing is announced separately from the page's main content.
**Action:** Wrap generated directory listing `<ul>` elements in `<nav aria-label="Directory listing">` while keeping the surrounding semantic `<main>` structure.
## 2024-07-07 - Add basic responsive layout & typography to directory listing
**Learning:** CLI ๋„๊ตฌ๋กœ ์ƒ์„ฑ๋œ ๊ธฐ๋ณธ HTML์€ ๋ธŒ๋ผ์šฐ์ € ๋ทฐํฌํŠธ ์ „์ฒด๋ฅผ ์ฐจ์ง€ํ•˜๋ฉฐ, ์ค„๊ธ€์ด ๊ธธ์–ด์ง€๊ฑฐ๋‚˜ ํ™”๋ฉด์ด ๋„“์–ด์ง€๋ฉด ๊ฐ€๋…์„ฑ์ด ํฌ๊ฒŒ ๋–จ์–ด์ง€๋Š” ๋ฌธ์ œ์™€ ๋ชจ๋ฐ”์ผ์—์„œ ์—ฌ๋ฐฑ ์—†์ด ๋”ฑ ๋ถ™์–ด์„œ ์ถœ๋ ฅ๋˜๋Š” ๋ฌธ์ œ๊ฐ€ ๋ฐœ๊ฒฌ๋จ.
**Action:** ๊ฐ„๋‹จํ•œ CLI ๋„๊ตฌ์ผ์ง€๋ผ๋„ ์ƒ์„ฑํ•˜๋Š” HTML ํŒŒ์ผ์—๋Š” `body` ํƒœ๊ทธ์— ์ตœ์†Œํ•œ์˜ ๋ฐ˜์‘ํ˜•(`max-width: 800px`, `margin: 0 auto`, `padding`) ๋ฐ ์‹œ์Šคํ…œ ํฐํŠธ(`system-ui`)๋ฅผ ์„ค์ •ํ•˜์—ฌ ์–ด๋–ค ๋””๋ฐ”์ด์Šค์—์„œ๋“  ์ฝ๊ธฐ ํŽธํ•œ ๊ฒฝํ—˜์„ ์ œ๊ณตํ•ด์•ผ ํ•จ์„ ๊ธฐ์–ตํ•˜๊ธฐ.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# ๋ณ€๊ฒฝ ์‚ฌํ•ญ (CHANGELOG)

## [Unreleased]
### ์ถ”๊ฐ€๋จ
- ์ƒ์„ฑ๋˜๋Š” HTML ๋ฌธ์„œ์˜ ๊ฐ€๋…์„ฑ ๋ฐ ๋ฐ˜์‘ํ˜• ๋ ˆ์ด์•„์›ƒ ๊ฐœ์„ ์„ ์œ„ํ•ด `body` ํƒœ๊ทธ์— ๊ธฐ๋ณธ ์Šคํƒ€์ผ (ํฐํŠธ, `max-width`, `margin`, `padding` ๋“ฑ)์„ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค. (๐ŸŽจ Palette)
8 changes: 8 additions & 0 deletions src/main/kotlin/html4tree/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,14 @@ fun process_dir(curr_dir: File){

val css = """
<style>
body {
font-family: system-ui, -apple-system, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 1rem;
line-height: 1.5;
color: #24292e;
}
ul {
list-style-type: none;
padding-left: 0;
Expand Down
2 changes: 2 additions & 0 deletions src/test/kotlin/html4tree/MainTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ class MainTest {
assertFalse(htmlContent.contains("test.ignore"))
assertTrue(htmlContent.contains("Content-Security-Policy"))
assertTrue(htmlContent.contains("default-src 'none'; style-src 'unsafe-inline';"))
assertTrue(htmlContent.contains("font-family: system-ui, -apple-system, sans-serif;"))
assertTrue(htmlContent.contains("max-width: 800px;"))
}

@Test
Expand Down
Loading