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
7 changes: 7 additions & 0 deletions calendarium/liturgics/day.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,11 @@ async def _add_supplemental_commemorations(self):
# self.feasts; story-only, excluded here.

self.saints = []
# Parallel to self.saints, but pairs each title with the story's id
# (or None) so the readings template can link a commemoration to its
# full story further down the page, without changing self.saints
# itself -- it's consumed as plain strings elsewhere (ical.py, RSS).
self.saint_links = []
self.spoken_saints = []
self.minimal_saints = []
for dcs in day_native_by_day.values():
Expand All @@ -304,11 +309,13 @@ async def _add_supplemental_commemorations(self):
# feast-level-facts preference for this tradition.
titles = [dc.title for dc in dcs]
self.saints.extend(titles)
self.saint_links.extend((dc.title, dc.id if dc.story else None) for dc in dcs)
self.spoken_saints.extend(dc.title for dc in dcs if _speech_worthy(dc))
if titles:
self.minimal_saints.append('; '.join(titles))

self.saints.extend(dc.title for dc in additive)
self.saint_links.extend((dc.title, dc.id if dc.story else None) for dc in additive)
self.spoken_saints.extend(dc.title for dc in additive if _speech_worthy(dc))

# spoken_saints excludes only the story-less tradition='greek' overlay
Expand Down
6 changes: 3 additions & 3 deletions calendarium/templates/readings.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ <h2>Feasts</h2>
<section class="commemorations">
<h2>Commemorations</h2>
<ul>
{% for saint in day.saints %}
<li>{{ saint|widont }}</li>
{% for saint, story_id in day.saint_links %}
<li>{% if story_id %}<a href="#commemoration-{{ story_id }}">{{ saint|widont }}</a>{% else %}{{ saint|widont }}{% endif %}</li>
{% endfor %}
</ul>
</section>
Expand Down Expand Up @@ -107,7 +107,7 @@ <h2>
<h1>Commemorations</h1>

{% for reading in day.stories %}
<article class="passage">
<article class="passage" id="commemoration-{{ reading.id }}">
<h2>{{ reading.title|widont }}</h2>

{{ reading.story|safe }}
Expand Down
7 changes: 7 additions & 0 deletions orthocal/static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,13 @@ table.month tr:first-child th {
color: black;
padding: 0.5em;
}
.commemorations li a {
color: inherit;
text-decoration: none;
}
.commemorations li a:hover {
text-decoration: underline;
}

p.feast {
font-weight: bold;
Expand Down