質問編集履歴

1

階層構造,ソースコードの追記

2021/12/21 00:11

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -22,6 +22,10 @@
22
22
 
23
23
  └ templates/
24
24
 
25
+ |└ application.html
26
+
27
+ |└ index.html
28
+
25
29
  |└ nav.html
26
30
 
27
31
 
@@ -172,6 +176,110 @@
172
176
 
173
177
 
174
178
 
179
+ ▼templates/application.html
180
+
181
+ ```
182
+
183
+ <!DOCTYPE html>
184
+
185
+ <html>
186
+
187
+ <head>
188
+
189
+ <meta charset="UTF-8">
190
+
191
+ <title>{{title}}</title>
192
+
193
+ <link rel="stylesheet" href="{{ url_for('static', filename='css/reset.css') }}">
194
+
195
+ <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
196
+
197
+ <link rel="preconnect" href="https://fonts.gstatic.com">
198
+
199
+ <!-- <script src="{{ url_for('static', filename='js/index.js') }}"></script> -->
200
+
201
+ <script src="https://kit.fontawesome.com/23659bd18a.js" crossorigin="anonymous"></script>
202
+
203
+ </head>
204
+
205
+
206
+
207
+ <body>
208
+
209
+ {% block body %}
210
+
211
+ {% endblock %}
212
+
213
+ </body>
214
+
215
+ </html>
216
+
217
+ ```
218
+
219
+
220
+
221
+ ▼templates/index.html
222
+
223
+ ```
224
+
225
+ {% extends 'application.html' %}
226
+
227
+
228
+
229
+ {% block body %}
230
+
231
+ <section class="admin">
232
+
233
+ {% include 'nav.html' %}
234
+
235
+ <div class="right_content">
236
+
237
+ {% include 'header.html' %}
238
+
239
+
240
+
241
+ <div id="content">
242
+
243
+ <div class="home_content">
244
+
245
+ <div class="user_content">
246
+
247
+ <h3>ユーザ管理</h3>
248
+
249
+ <a href="{{ url_for('user_edit_form') }}"><p>ユーザ情報の編集</p></a>
250
+
251
+ <a href="{{ url_for('user_list') }}"><p>ユーザ一覧</p></a>
252
+
253
+ </div>
254
+
255
+ <div class="news_content">
256
+
257
+ <h3>お知らせ管理</h3>
258
+
259
+ <a href="{{ url_for('news_post_form') }}"><p>お知らせ投稿</p></a>
260
+
261
+ <a href="{{ url_for('news_list') }}"><p>お知らせ一覧</p></a>
262
+
263
+ </div>
264
+
265
+ </div>
266
+
267
+ </div>
268
+
269
+
270
+
271
+ {% include 'footer.html' %}
272
+
273
+ </div>
274
+
275
+ </section>
276
+
277
+ {% endblock %}
278
+
279
+ ```
280
+
281
+
282
+
175
283
  ▼templates/nav.html
176
284
 
177
285
  ```