修改主页,感觉还可以
This commit is contained in:
100
templates/blog/list.html
Executable file
100
templates/blog/list.html
Executable file
@@ -0,0 +1,100 @@
|
||||
<!DOCTYPE id="html" html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="icon" type="image/x-icon" href="https://ww3.tw/blog/icon/original.ico">
|
||||
<title>文章列表</title> <!-- 标题 -->
|
||||
</head>
|
||||
<body id="wallpaper" >
|
||||
<!-- 背景 -->
|
||||
<div id="div_1">
|
||||
<a href='{{ url_for("blog.home") }}' style='background-color: rgba(147, 185, 255, 0)'>返回首页</a>
|
||||
<center id="center_2"><b><h2>全部文章</h2></b></center>
|
||||
<br>
|
||||
<div id="posts_list">文章如下↓</div>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<div id='content'>
|
||||
{% for posts in posts %}
|
||||
<div id="posts_bian_kuang">
|
||||
<br>
|
||||
<br>
|
||||
文章id:{{ posts['id'] }}
|
||||
<br>
|
||||
文章标题:{{ posts['title'] }}
|
||||
<br>
|
||||
<a href="{{ url_for('blog.posts_list') }}{{ posts['id'] }}">页面跳转</a>__{{ posts['date'] }}
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
{# 随机变换图床api #}
|
||||
{% set wallpaper_apis =[
|
||||
'https://www.loliapi.com/acg/pc/',
|
||||
'https://api.sretna.cn/api/pc.php',
|
||||
'https://www.api.plus/API/dongman/',
|
||||
'https://moe.jitsu.top/img/?sort=pc',
|
||||
'https://www.dmoe.cc/random.php',
|
||||
'https://api.r10086.com/樱道随机图片api接口.php?图片系列=猫娘1',
|
||||
'https://api.mtyqx.cn/tapi/random.php'] %}
|
||||
{% set wallpaper = wallpaper_apis | random %}
|
||||
</html>
|
||||
|
||||
|
||||
<style>
|
||||
#center_2 {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
background-color: rgba(255, 255, 255, 0.415);
|
||||
text-align: center;
|
||||
margin: -55px 0 0 0;
|
||||
}
|
||||
#posts_list {
|
||||
width: 90px;
|
||||
height: 30px;
|
||||
background-color: rgba(255, 255, 255, 0.415);
|
||||
}
|
||||
#posts_bian_kuang {
|
||||
width: 600px;
|
||||
height: 200px;
|
||||
background-color: rgba(255, 255, 255, 0.415);
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
html {
|
||||
margin: 0 0 0 0;
|
||||
}
|
||||
#wallpaper {
|
||||
background-image: url('{{ wallpaper }}');
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat; /*禁止平铺*/
|
||||
background-size: 100% 100%; /*图片占满100%*/
|
||||
margin: 0; /* 外边框为0 */
|
||||
/*padding: 0;*/
|
||||
|
||||
}
|
||||
|
||||
#div_1 {
|
||||
height: 100%;
|
||||
color: rgb(0, 0, 0);
|
||||
font-size: 19px;
|
||||
background-color: rgba(169, 169, 169, 0.212);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
#content {
|
||||
/* up、right、down、left */
|
||||
margin: 0px 0px 0px 100px;
|
||||
}
|
||||
|
||||
#wallpaper_url {
|
||||
color: rgba(255, 0, 0, 0.354);
|
||||
/* up、right、down、left */
|
||||
margin: 20% 0px 0px 75%;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user