feat: add favicon, one stylesheet, base.html

This commit is contained in:
Cipher Vance 2025-08-31 13:05:16 -05:00
parent 2e9bda85c7
commit 7a31bb7e3a
7 changed files with 1166 additions and 671 deletions

View file

@ -1,130 +1,114 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RideAware - {{ newsletter.subject if newsletter else 'Newsletter Detail' }}</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
<link rel="preconnect" href="https://cdn.statically.io" crossorigin>
{% extends "base.html" %}
<link rel="preload" as="style"
href="https://cdn.statically.io/gl/rideaware/landing/main/static/css/newsletter_styles.min.css"
onload="this.onload=null;this.rel='stylesheet'">
<noscript>
<link rel="stylesheet"
href="https://cdn.statically.io/gl/rideaware/landing/main/static/css/newsletter_styles.min.css">
</noscript>
</head>
<body>
<!-- Navigation -->
<nav class="navbar">
<div class="nav-container">
<a href="/" class="logo">Ride<span class="logo-accent">Aware</span></a>
<ul class="nav-links">
<li><a href="/">Home</a></li>
<li><a href="/newsletters">Newsletters</a></li>
</ul>
{% block title %}
RideAware - {{ newsletter.subject if newsletter else 'Newsletter Detail' }}
{% endblock %}
{% block content %}
<div class="article-wrap">
<aside class="article-aside">
<a href="/newsletters" class="back-link">
<i class="fas fa-arrow-left"></i>
Back to Newsletters
</a>
<div class="article-meta">
<h2 class="article-title">{{ newsletter.subject if newsletter else 'Newsletter Title' }}</h2>
<div class="meta-row">
<i class="fas fa-calendar-alt"></i>
<span>{{ newsletter.sent_at if newsletter else 'Published Date' }}</span>
</div>
</nav>
{% if newsletter and newsletter.get('reading_time') %}
<div class="meta-row">
<i class="fas fa-clock"></i>
<span>{{ newsletter.reading_time }} min read</span>
</div>
{% endif %}
{% if newsletter and newsletter.get('author') %}
<div class="meta-row">
<i class="fas fa-user"></i>
<span>{{ newsletter.author }}</span>
</div>
{% endif %}
<!-- Back Navigation -->
<div class="back-navigation">
<a href="/newsletters" class="back-link">
<i class="fas fa-arrow-left"></i>
Back to Newsletters
{% if newsletter and newsletter.get('tags') %}
<div class="article-tags">
{% for tag in newsletter.tags %}
<span class="tag">{{ tag }}</span>
{% endfor %}
</div>
{% endif %}
</div>
<nav class="toc">
<div class="toc-title">On this page</div>
<ol id="toc-list"></ol>
</nav>
</aside>
<main class="article-main">
<header class="article-hero">
<div class="newsletter-icon"><i class="fas fa-envelope-open-text"></i></div>
<h1>{{ newsletter.subject if newsletter else 'Newsletter Title' }}</h1>
</header>
<article class="newsletter-content" id="article">
{% if newsletter %}
{{ newsletter.body | safe }}
{% else %}
<h2>Welcome to RideAware Newsletter</h2>
<p>Sample content…</p>
{% endif %}
</article>
<div class="newsletter-actions">
<a href="/newsletters" class="action-btn primary">
<i class="fas fa-list"></i>
View All Newsletters
</a>
</div>
<!-- Main Content -->
<main class="main-content">
<!-- Newsletter Header -->
<div class="newsletter-header">
<div class="newsletter-icon">
<i class="fas fa-envelope-open-text"></i>
</div>
<h1>{{ newsletter.subject if newsletter else 'Newsletter Title' }}</h1>
<div class="newsletter-meta">
<div class="meta-item">
<i class="fas fa-calendar-alt"></i>
<span>{{ newsletter.sent_at if newsletter else 'Published Date' }}</span>
</div>
{% if newsletter and newsletter.get('reading_time') %}
<div class="meta-item">
<i class="fas fa-clock"></i>
<span>{{ newsletter.reading_time }} min read</span>
</div>
{% endif %}
{% if newsletter and newsletter.get('author') %}
<div class="meta-item">
<i class="fas fa-user"></i>
<span>{{ newsletter.author }}</span>
</div>
{% endif %}
</div>
{% if newsletter and newsletter.get('tags') %}
<div class="newsletter-tags">
{% for tag in newsletter.tags %}
<span class="tag">{{ tag }}</span>
{% endfor %}
</div>
{% else %}
<div class="newsletter-tags">
<span class="tag">Cycling Tips</span>
<span class="tag">Training</span>
<span class="tag">Performance</span>
</div>
{% endif %}
</div>
<!-- Newsletter Content -->
<article class="newsletter-content">
{% if newsletter %}
{{ newsletter.body | safe }}
{% else %}
<h2>Welcome to RideAware Newsletter</h2>
<p>This is a sample newsletter content that demonstrates the modern, clean design of our newsletter system. The content would typically include cycling tips, training advice, and product updates.</p>
<h3>This Week's Highlights</h3>
<ul>
<li>New training features released</li>
<li>Community spotlight on top performers</li>
<li>Upcoming events and challenges</li>
<li>Expert tips from professional cyclists</li>
</ul>
<blockquote>
"The bicycle is a curious vehicle. Its passenger is its engine." - John Howard
</blockquote>
<p>Stay tuned for more exciting content and updates from the RideAware team. We're committed to helping you achieve your cycling goals with the best tools and community support.</p>
{% endif %}
</article>
<!-- Action Buttons -->
<div class="newsletter-actions">
<a href="/newsletters" class="action-btn primary">
<i class="fas fa-list"></i>
View All Newsletters
</a>
<button onclick="window.print()" class="action-btn secondary">
<i class="fas fa-print"></i>
Print Newsletter
</button>
<button onclick="shareNewsletter()" class="action-btn secondary">
<i class="fas fa-share-alt"></i>
Share
</button>
</div>
<button onclick="window.print()" class="action-btn secondary">
<i class="fas fa-print"></i>
Print
</button>
<button onclick="shareNewsletter()" class="action-btn secondary">
<i class="fas fa-share-alt"></i>
Share
</button>
</div>
</main>
</div>
{% endblock %}
<!-- Footer -->
<footer class="footer">
<p>&copy; 2025 RideAware. All rights reserved.</p>
</footer>
<script defer
src="https://cdn.statically.io/gl/rideaware/landing/06d19988c7df53636277f945f9ed853bda76471b/static/js/main.min.js"
crossorigin="anonymous"></script>
</body>
</html>
{% block extra_scripts %}
<script>
function shareNewsletter() {
if (navigator.share) {
navigator.share({ title: document.title, url: location.href }).catch(() => {});
} else {
navigator.clipboard.writeText(location.href);
alert('Link copied to clipboard!');
}
}
// Build TOC from h2/h3 inside the article
(function buildTOC() {
const article = document.getElementById('article');
if (!article) return;
const headings = article.querySelectorAll('h2, h3');
const list = document.getElementById('toc-list');
if (!headings.length || !list) return;
headings.forEach((h, idx) => {
const id = h.id || `h-${idx}`;
h.id = id;
const li = document.createElement('li');
li.className = h.tagName === 'H2' ? 'toc-h2' : 'toc-h3';
const a = document.createElement('a');
a.href = `#${id}`;
a.textContent = h.textContent;
li.appendChild(a);
list.appendChild(li);
});
})();
</script>
{% endblock %}