-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathlayout_finished.html
More file actions
175 lines (153 loc) Β· 7.31 KB
/
layout_finished.html
File metadata and controls
175 lines (153 loc) Β· 7.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Site Info -->
{% if title %}
<title>FastAPI Blog - {{ title }}</title>
{% else %}
<title>FastAPI Blog</title>
{% endif %}
<meta name="description" content="FastAPI Tutorial">
<meta name="author" content="Corey Schafer">
<!-- Open Graph Tags: The title of the page for social media sharing. It can match the title tag or be more descriptive. -->
<meta property="og:title" content="FastAPI Blog">
<!-- Open Graph Tags: Typically set to "website" for static sites or "article" for content-heavy pages. -->
<meta property="og:type" content="website">
<!-- Open Graph Tags: The URL of the page, used to ensure link previews resolve to the correct page. -->
<meta property="og:url" content="">
<!-- Open Graph Tags: URL of an image that represents the page. Useful for link previews. -->
<meta property="og:image" content="">
<!-- Open Graph Tags: Provides an alternative text for the image to improve accessibility. -->
<meta property="og:image:alt" content="">
<!-- Preconnect for Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<!-- Custom Font -->
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap"
rel="stylesheet">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB"
crossorigin="anonymous">
<!-- Stylesheet -->
<link rel="stylesheet" type="text/css" href="/static/css/main.css">
<!-- Set a theme color that matches your website's primary color -->
<meta name="theme-color" content="#527c9f">
<!-- Favicon for all browsers -->
<link rel="icon" href="/static/icons/favicon.ico" sizes="any">
<link rel="icon" href="/static/icons/icon.svg" type="image/svg+xml">
<!-- Apple touch icon for iOS devices -->
<link rel="apple-touch-icon" sizes="180x180" href="/static/icons/icon.png">
<!-- Web app manifest for Progressive Web Apps -->
<link rel="manifest" href="/static/site.webmanifest">
<!-- Content Security Policy: Uncomment to enhance security by restricting where content can be loaded from (useful for preventing certain attacks like XSS). Update if adding external sources (e.g., Google Fonts, Bootstrap CDN, analytics, etc). -->
<!-- <meta http-equiv="Content-Security-Policy" content=" default-src 'self'; script-src 'self' code.jquery.com; style-src 'self' fonts.googleapis.com; font-src fonts.gstatic.com; img-src 'self' images.examplecdn.com; "> -->
</head>
<body class="d-flex flex-column min-vh-100">
<header class="site-header">
<nav class="navbar navbar-expand-md bg-steel fixed-top"
data-bs-theme="dark">
<div class="container">
<a class="navbar-brand me-4" href="#">FastAPI Blog</a>
<button class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarToggle"
aria-controls="navbarToggle"
aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarToggle">
<div class="navbar-nav me-auto">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</div>
<!-- Navbar Right Side -->
<div class="navbar-nav">
<a class="btn btn-outline-light mb-2 mb-md-0 me-md-2" href="#">Login</a>
<a class="btn btn-light mb-2 mb-md-0 me-md-3" href="#">Register</a>
<div class="nav-item dropdown">
<a class="nav-link dropdown-toggle"
href="#"
role="button"
id="bd-theme"
data-bs-toggle="dropdown"
aria-expanded="false">
<span id="bd-theme-text">π Auto</span>
</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="bd-theme">
<li>
<button class="dropdown-item" type="button" data-bs-theme-value="light">π Light</button>
</li>
<li>
<button class="dropdown-item" type="button" data-bs-theme-value="dark">π Dark</button>
</li>
<li>
<button class="dropdown-item" type="button" data-bs-theme-value="auto">π Auto</button>
</li>
</ul>
</div>
</div>
</div>
</div>
</nav>
</header>
<main role="main" class="container">
<div class="row">
<div class="col-md-8">
{% block content %}
{% endblock content %}
</div>
<aside class="col-md-4">
<div class="content-section py-3 px-4 mb-4">
<h3>Our Sidebar</h3>
<p class="text-body-secondary">You can put any information here you'd like.</p>
<ul class="list-group">
<li class="list-group-item">Latest Posts</li>
<li class="list-group-item">Announcements</li>
<li class="list-group-item">Calendars</li>
<li class="list-group-item">etc</li>
</ul>
</div>
</aside>
</div>
</main>
<footer class="mt-auto py-3 bg-body-tertiary border-top">
<div class="container text-center">
<p class="text-body-secondary mb-0">
Β© <span id="year"></span> Corey Schafer
</p>
</div>
</footer>
<!-- Set the current year in the footer -->
<script>document.getElementById('year').textContent = new Date().getFullYear();</script>
<!-- Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js"
integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI"
crossorigin="anonymous"></script>
<!-- Dark Mode Toggle -->
<script>
const setTheme = (theme) => {
if (theme === 'auto') {
document.documentElement.setAttribute('data-bs-theme',
window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
} else {
document.documentElement.setAttribute('data-bs-theme', theme);
}
localStorage.setItem('theme', theme);
// Update button text
const themeText = { light: 'π Light', dark: 'π Dark', auto: 'π Auto' };
document.getElementById('bd-theme-text').textContent = themeText[theme];
};
// Set theme on click
document.querySelectorAll('[data-bs-theme-value]').forEach(button => {
button.addEventListener('click', () => setTheme(button.getAttribute('data-bs-theme-value')));
});
// Initialize
setTheme(localStorage.getItem('theme') || 'auto');
</script>
</body>
</html>