Files
kennethreitz af7ee14d0f Add dark mode enhancements and UI improvements
- Add dark mode support for text selection highlights (bright yellow with black text)
- Implement golden glow effect for sidenote highlights in dark mode
- Fix article icons appearing on sidenote links (exclude sidenote elements)
- Add dark mode styling for mobile sidenote popups
- Reduce tooltip hover delay from 800ms to 500ms
- Make sidenote highlights persistent instead of fading

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 09:43:53 -04:00

188 lines
5.8 KiB
HTML

{% extends "base.html" %}
{% block content %}
<article>
<header>
<h1>Sidenotes Index</h1>
<p class="subtitle">The contemplative layer &mdash; {{ total_count }} marginalia across the digital garden.</p>
</header>
<section>
<p>Every sidenote from across the site, extracted and presented as its own contemplative document. These margin thoughts often contain the most honest insights, the recursive observations that couldn't fit in the main narrative flow.</p>
<hr>
{% if articles %}
{% for article in articles %}
<div class="article-group">
<div class="article-title-container">
{% if article.unique_icon %}
<img src="{{ article.unique_icon }}" alt="Icon for {{ article.title }}" class="article-icon" loading="lazy">
{% endif %}
<h3 class="article-title">
<a href="{{ article.url }}">{{ article.title }}</a>
</h3>
</div>
<div class="article-meta">
{{ article.category }}
{% if article.date %}
&middot; {{ article.date.strftime('%B %Y') if article.date.day == 1 else article.date.strftime('%B %d, %Y') }}
{% endif %}
&middot; {{ article.sidenotes|length }} sidenote{{ 's' if article.sidenotes|length != 1 else '' }}
</div>
<div class="sidenotes-list">
{% for sidenote in article.sidenotes %}
<p class="sidenote-entry">
{% if sidenote.id %}
<a href="{{ article.url }}#{{ sidenote.id }}" class="sidenote-link">
{{ sidenote.text|safe if sidenote.text else '' }}
</a>
{% else %}
{{ sidenote.text|safe if sidenote.text else sidenote|safe }}
{% endif %}
</p>
{% endfor %}
</div>
</div>
{% endfor %}
{% else %}
<p>No sidenotes found across the site.</p>
{% endif %}
</section>
</article>
<style>
.subtitle {
font-style: italic;
color: #666;
margin-top: -1rem;
margin-bottom: 2rem;
}
.article-group {
margin-bottom: 3rem;
border-bottom: 1px solid #e0e0e0;
padding-bottom: 2rem;
}
.article-group:last-child {
border-bottom: none;
}
.article-title-container {
position: relative;
margin-bottom: 0.5rem;
}
.article-icon {
width: 32px;
height: 32px;
position: absolute;
left: -4rem;
top: 0;
}
.article-title {
font-size: 1.4rem;
margin: 0;
}
.article-title a {
color: #333;
text-decoration: none;
}
.article-title a:hover {
color: #000;
text-decoration: underline;
}
.article-meta {
font-size: 0.9rem;
color: #888;
margin-bottom: 1.5rem;
}
.sidenotes-list {
padding-left: 0;
}
.sidenote-entry {
margin-bottom: 1.2rem;
padding-left: 2rem;
border-left: 3px solid #f0f0f0;
font-size: 1.4rem;
line-height: 1.8;
color: #333;
font-style: italic;
}
.sidenotes-list img {
display: none !important;
}
.sidenote-entry img {
display: none !important;
}
.sidenote-link img {
display: none !important;
}
.sidenote-entry:last-child {
margin-bottom: 0;
}
.sidenote-link {
color: inherit;
text-decoration: none;
display: block;
}
.sidenote-link:hover {
color: #222;
background-color: #fafafa;
margin-left: -0.5rem;
padding-left: 0.5rem;
border-radius: 3px;
}
@media (max-width: 768px) {
.sidenotes-list {
padding-left: 0.5rem;
}
.sidenote-entry {
padding-left: 1rem;
font-size: 1rem;
}
}
body.light-mode .subtitle { color: #666 !important; }
body.light-mode .article-group { border-bottom-color: #e0e0e0 !important; }
body.light-mode .article-title a { color: #333 !important; }
body.light-mode .article-title a:hover { color: #000 !important; }
body.light-mode .article-meta { color: #888 !important; }
body.light-mode .sidenote-entry { border-left-color: #f0f0f0 !important; color: #333 !important; }
body.light-mode .sidenote-link:hover { color: #222 !important; background-color: #fafafa !important; }
body.dark-mode .subtitle { color: #999; }
body.dark-mode .article-group { border-bottom-color: #2a2a2a; }
body.dark-mode .article-title a { color: #ccc; }
body.dark-mode .article-title a:hover { color: #fff; }
body.dark-mode .article-meta { color: #666; }
body.dark-mode .sidenote-entry { border-left-color: #333; color: #ccc; }
body.dark-mode .sidenote-link:hover { color: #fff; background-color: #1a1a1a; }
@media (prefers-color-scheme: dark) {
.subtitle { color: #999; }
.article-group { border-bottom-color: #2a2a2a; }
.article-title a { color: #ccc; }
.article-title a:hover { color: #fff; }
.article-meta { color: #666; }
.sidenote-entry { border-left-color: #333; color: #ccc; }
.sidenote-link:hover { color: #fff; background-color: #1a1a1a; }
}
</style>
{% endblock %}