Skip to content
Merged
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
18 changes: 4 additions & 14 deletions scripts/build_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -5750,14 +5750,8 @@ def split_catalogued_text_title(work):


def text_contents_title(work):
"""Render one catalogue title in romanized Phi and Tengwar."""
phi_title, english_title = split_catalogued_text_title(work)
tengwar_title = tengwar.render_line(phi_title)
if tengwar_title is None:
raise ValueError(
f"text catalogue title cannot render in Tengwar: texts/{work['path']}"
)
return phi_title, english_title, tengwar_title
"""Split one catalogue title into its romanized Phi and English halves."""
return split_catalogued_text_title(work)


def text_contents_arrow():
Expand Down Expand Up @@ -5808,7 +5802,7 @@ def text_contents_page(news_chapter_count):
work_rows = []
for index, work in enumerate(TEXTS, 1):
spec = method_specs[work["method"]]
phi_title, english_title, tengwar_title = text_contents_title(work)
phi_title, english_title = text_contents_title(work)
href = f"{Path(work['path']).stem}.html"
work_rows.append(
f'<li class="text-index-entry text-index-entry-{spec["kind"]}">'
Expand All @@ -5822,15 +5816,13 @@ def text_contents_page(news_chapter_count):
"</div>"
'<div class="text-index-entry-meta">'
f'<p class="text-index-entry-method">{html_module.escape(spec["label"])}</p>'
f'<div class="text-index-entry-tengwar" aria-hidden="true">'
f"{tengwar_title}</div>"
"</div>"
f"{text_contents_arrow()}"
"</a></li>"
)

news_spec = method_specs[NEWS_WORK["method"]]
news_phi, news_english, news_tengwar = text_contents_title(NEWS_WORK)
news_phi, news_english = text_contents_title(NEWS_WORK)
chapter_noun = "chapter" if news_chapter_count == 1 else "chapters"
book_entry = (
'<section class="text-index-book" aria-labelledby="text-index-book-heading">'
Expand All @@ -5856,8 +5848,6 @@ def text_contents_page(news_chapter_count):
f'{html_module.escape(news_spec["label"])}</p>'
f'<p class="text-index-book-progress">{news_chapter_count:02d} '
f"{chapter_noun} available</p>"
f'<div class="text-index-entry-tengwar" aria-hidden="true">'
f"{news_tengwar}</div>"
"</div>"
f"{text_contents_arrow()}"
"</a></section>"
Expand Down
22 changes: 0 additions & 22 deletions site/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2282,20 +2282,6 @@ table.primer-ladder {
.text-index-entry-original .text-index-entry-method {
color: var(--sage);
}
.text-index-entry-tengwar {
color: var(--muted);
margin: .65rem 0 0 auto;
max-width: 12rem;
opacity: .68;
width: 100%;
}
.text-index-entry-tengwar .teng-svg {
display: block;
height: 1.65rem !important;
margin-left: auto;
max-width: 100%;
width: auto;
}
.text-index-arrow {
color: var(--muted);
display: flex;
Expand Down Expand Up @@ -4379,13 +4365,6 @@ table.text-ledger {
}
.text-index-entry-method,
.text-index-book-progress { text-align: left; }
.text-index-entry-tengwar {
flex-basis: 100%;
margin-left: 0;
margin-top: .3rem;
max-width: 12rem;
}
.text-index-entry-tengwar .teng-svg { margin-left: 0; }
.text-index-arrow {
align-self: center;
grid-column: 3;
Expand Down Expand Up @@ -5141,7 +5120,6 @@ table.text-ledger {
grid-template-columns: 2.5em minmax(0, 1fr) 11em;
}
.text-index-arrow { display: none; }
.text-index-entry-tengwar .teng-svg { height: 1.35em !important; }
.text-editorial .text-work-header h1 { font-size: 2.5em; }
.text-editorial h2.text-method-heading { font-size: 1.75em; }
.text-editorial h3 { break-after: avoid; }
Expand Down
Loading