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

View file

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

View file

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