refactor: change from standard html blocks to jinja2

This commit is contained in:
Blake Ridgway 2025-04-05 20:22:32 -05:00
parent 781d88080f
commit 13d8f65ee3
3 changed files with 11 additions and 20 deletions

View file

@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>RideAware</title>
<link rel="stylesheet" href="/static/css/styles.css">
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
</head>
<body>
<header>
@ -19,7 +19,7 @@
<section class="hero-section-1">
<div class="hero-content">
<div class="hero-text">
<img src="/static/assets/RideAwareLogo.svg" alt="RideAware Logo">
<img src="{{ url_for('static', filename='assets/RideAwareLogo.svg') }}" alt="RideAware Logo">
</div>
</section>
<section class="hero-section-2">
@ -90,6 +90,6 @@
<footer class="normal-footer">
Copyright &copy; 2025 RideAware. All rights reserved.
</footer>
<script src="/static/js/main.js"></script>
<script src="{{ url_for('static', filename='js/main.js') }}"></script>
</body>
</html>

View file

@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RideAware - Newsletter Detail</title>
<link rel="stylesheet" href="/static/css/styles.css" />
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}" />
</head>
<body>
<header>
@ -17,17 +17,16 @@
</header>
<main>
<a href="/newsletters" class="back-link">← Back to Newsletters</a>
<h1>{{ newsletter.subject }}</h1>
<div class="newsletter-content">
{{ newsletter.body | safe }}
</div>
<a href="/newsletters" class="back-link">← Back to Newsletters</a>
</div>
</main>
<footer class="fixed-footer">
<footer class="normal-footer">
<p>© 2025 RideAware. All rights reserved.</p>
</footer>
<script src="/static/js/main.js"></script>
<script src="{{ url_for('static', filename='js/main.js') }}"></script>
</body>
</html>

View file

@ -4,15 +4,7 @@
<meta charset="UTF-8">
<title>RideAware - Newsletters</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/static/css/styles.css">
<style>
main {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
</style>
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
</head>
<body>
@ -30,10 +22,10 @@
{% for nl in newsletters %}
<div class="newsletter">
<h2>
<a href="{{ url_for('newsletter_detail', newsletter_id=nl['id']) }}">{{ nl['subject'] }}</a>
<a href="/newsletter/{{ nl['id'] }}">{{ nl['subject'] }}</a>
</h2>
<p class="newsletter-time">Sent on: {{ nl['sent_at'] }}</p>
<a href="{{ url_for('newsletter_detail', newsletter_id=nl['id']) }}" class="read-more">Read More</a>
<a href="/newsletter/{{ nl['id'] }}" class="read-more">Read More</a>
</div>
{% endfor %}
{% else %}
@ -43,6 +35,6 @@
<footer class="fixed-footer">
<p>© 2025 RideAware. All rights reserved.</p>
</footer>
<script src="/static/js/main.js"></script>
<script src="{{ url_for('static', filename='js/main.js') }}"></script>
</body>
</html>