跟着麦叔学flask,感谢b站麦叔
This commit is contained in:
54
templates/study/base.html
Executable file
54
templates/study/base.html
Executable file
@@ -0,0 +1,54 @@
|
||||
{# base模板 #}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" lang="zh_CN">
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
<!--link rel="stylesheet" href="/static/css/style.css"-->
|
||||
{# 建立一个url,来源于static文件夹的,文件名字为css文件夹下的style.css #}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div style="width: 100%; background-color: rgb(122, 91, 246);">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="url">
|
||||
<a href="/study" class="url">home</a>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="url">
|
||||
<!--a href="/study/about" class="url">about</a-->
|
||||
<a href="{{ url_for('study.about')}}" class="url">about</a>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="url">
|
||||
<a href="/study/posts/new" class="url">新建文章</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% for message in get_flashed_messages() %}
|
||||
<div>{{ message }}</div>
|
||||
{% endfor %}
|
||||
|
||||
{% block content %} {% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<style>
|
||||
body {
|
||||
margin: 0 0 0 0;
|
||||
background-color: rgb(157, 209, 255);
|
||||
}
|
||||
|
||||
.url {
|
||||
height: 40px;
|
||||
margin: 10px 0 0 10px;
|
||||
color: rgb(0, 0, 0);
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user