Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,7 @@
## 2024-07-13 - ๋นˆ ๋””๋ ‰ํ† ๋ฆฌ ์ƒํƒœ์˜ ์ ‘๊ทผ์„ฑ(Accessibility) ๊ฐœ์„ 
**Learning:** ์ •์  ํŒŒ์ผ ์„œ๋ฒ„์˜ ๋นˆ ๋””๋ ‰ํ† ๋ฆฌ ์ƒํƒœ๋Š” ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์‚ฌ์šฉ์ž์—๊ฒŒ ์ปจํ…์ธ  ๋ˆ„๋ฝ์œผ๋กœ ์˜คํ•ด๋ฐ›์„ ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์‹œ๊ฐ์ ์œผ๋กœ๋„ ์ผ๋ฐ˜ ๋ฆฌ์ŠคํŠธ ์•„์ดํ…œ๊ณผ ์ •๋ ฌ์ด ๋งž์ง€ ์•Š๋Š” ๋ฌธ์ œ๊ฐ€ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.
**Action:** ๋นˆ ์ƒํƒœ๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” ์š”์†Œ์— `role="status"`๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ ์Šคํฌ๋ฆฐ ๋ฆฌ๋”๊ฐ€ ๋ช…ํ™•ํ•˜๊ฒŒ ์ธ์ง€ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•˜๊ณ , ์•„์ด์ฝ˜๊ณผ flex ๋ ˆ์ด์•„์›ƒ์„ ํ†ตํ•ด ๋‹ค๋ฅธ ๋ฆฌ์ŠคํŠธ ์•„์ดํ…œ๊ณผ ์ผ๊ด€๋œ ์‹œ๊ฐ์  ํ๋ฆ„์„ ์ œ๊ณตํ•˜๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.

## 2026-08-05 - ๋””๋ ‰ํ† ๋ฆฌ ์ œ๋ชฉ์ด ๋„ˆ๋ฌด ๊ธด ๊ฒฝ์šฐ์˜ ๋ ˆ์ด์•„์›ƒ ๊นจ์ง ๋ฐฉ์ง€ ๋ฐ ์‹œ๊ฐ์  ๊ณ„์ธตํ™”
**Learning:** ๋„์–ด์“ฐ๊ธฐ ์—†๋Š” ๋งค์šฐ ๊ธด ๋””๋ ‰ํ† ๋ฆฌ ์ด๋ฆ„์€ ๋ชจ๋ฐ”์ผ ํ™˜๊ฒฝ ๋“ฑ ์ œํ•œ๋œ ํญ์—์„œ ์ปจํ…Œ์ด๋„ˆ๋ฅผ ๋ฒ—์–ด๋‚˜ ๋ ˆ์ด์•„์›ƒ์„ ๋ฌด๋„ˆ๋œจ๋ฆฌ๊ฑฐ๋‚˜ ๊ฐ€๋…์„ฑ์„ ์ €ํ•˜์‹œํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋˜ํ•œ ๋””๋ ‰ํ† ๋ฆฌ ๋ชฉ๋ก๊ณผ ์ œ๋ชฉ ๊ฐ„์˜ ์‹œ๊ฐ์  ๊ตฌ๋ถ„์ด ์—†์œผ๋ฉด ์ •๋ณด์˜ ๊ตฌ์กฐ๋ฅผ ํŒŒ์•…ํ•˜๊ธฐ ์–ด๋ ต์Šต๋‹ˆ๋‹ค.
**Action:** ๊ธด ์ œ๋ชฉ ํ…์ŠคํŠธ(`<h1>`)์— `word-break: break-all;`์„ ์ ์šฉํ•˜์—ฌ ํ™”๋ฉด์„ ๋ฒ—์–ด๋‚˜์ง€ ์•Š๋„๋ก ํ•˜๊ณ , ํ•˜๋‹จ ํ…Œ๋‘๋ฆฌ(`border-bottom`) ๋ฐ ์—ฌ๋ฐฑ์„ ์ถ”๊ฐ€ํ•˜์—ฌ ์ฝ˜ํ…์ธ ์™€ ๋ช…ํ™•ํžˆ ๊ตฌ๋ถ„๋˜๋„๋ก ์‹œ๊ฐ์  ๊ณ„์ธต์„ ๋ถ€์—ฌํ•˜์‹ญ์‹œ์˜ค. (๋‹คํฌ ๋ชจ๋“œ์—์„œ์˜ ํ…Œ๋‘๋ฆฌ ์ƒ‰์ƒ ์ฒ˜๋ฆฌ๋„ ํ•จ๊ป˜ ๊ณ ๋ ค)
27 changes: 19 additions & 8 deletions src/main/kotlin/html4tree/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ main {
max-width: 800px;
margin: 0 auto;
}
h1 {
font-size: 1.5rem;
margin-top: 0;
margin-bottom: 1rem;
padding-bottom: 0.5rem;
border-bottom: 1px solid #d0d7de;
word-break: break-all;
}
ul {
list-style-type: none;
padding-left: 0;
Expand Down Expand Up @@ -59,11 +67,22 @@ a:hover, a:focus-visible {
transition: none;
}
}
.empty-dir {
display: flex;
align-items: flex-start;
gap: 0.5rem;
padding: 0.5rem;
opacity: 0.7;
font-style: italic;
}
@media (prefers-color-scheme: dark) {
body {
background-color: #0d1117;
color: #c9d1d9;
}
h1 {
border-bottom-color: #21262d;
}
a {
color: #58a6ff;
}
Expand All @@ -72,14 +91,6 @@ a:hover, a:focus-visible {
outline-color: #58a6ff;
}
}
.empty-dir {
display: flex;
align-items: flex-start;
gap: 0.5rem;
padding: 0.5rem;
opacity: 0.7;
font-style: italic;
}
""".trimIndent()

private val STYLE_HASH = "sha256-" + Base64.getEncoder().encodeToString(MessageDigest.getInstance("SHA-256").digest(CSS_CONTENT.toByteArray(Charsets.UTF_8)))
Expand Down
15 changes: 15 additions & 0 deletions src/test/kotlin/html4tree/MainTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -706,4 +706,19 @@ class MainTest {
assertFalse(processed, "fileKey mismatch should skip directory processing")
assertFalse(listed, "fileKey mismatch should skip child listing")
}

@Test
fun testGeneratedCssContainsNewH1Styles() {
val testDir = File(tempDir, "h1_style_test")
testDir.mkdir()
go(testDir.absolutePath, 0)

val indexFile = File(testDir, "index.html")
assertTrue(indexFile.exists())

val content = indexFile.readText()
assertTrue(content.contains("word-break: break-all;"))
assertTrue(content.contains("border-bottom: 1px solid #d0d7de;"))
assertTrue(content.contains("border-bottom-color: #21262d;"))
}
}
Loading