Files
open-ww3-project-ww3-tw/templates/blog/home.html
2026-03-24 14:24:08 +08:00

123 lines
3.0 KiB
HTML

{# 引入base #}
{% extends 'blog/extension/base.html' %}
{# 引入标题 #}
{% block title %}首页{% endblock %}
{% include 'blog/include/head.html' %}
{% include 'blog/include/wallpaper.html' %}
{% block content %}
<h1>欢迎访问open-ww3-project</h1>
<!-- 屑站日志 -->
<h3 style="margin: 10px 0 30px 50px;">屑站日志:<br></h3>
<div id="logs">
<font size="3.2">
<table border="0">
<tbody>
{# 调用数据库 #}
{% for logs in logs %}
<tr>
<td id="td_logs">
<a style='font-size: 16.7px;'>
{{ logs['date'].replace('.', '-') }}
</a>
<br>
</td>
<td id="td_logs_content">
{{ logs['content'].replace('&&', '<br>') | safe }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</font>
</div>
<!-- 屑站日志 -->
<div id="posts">
<h1>全部文章</h1>
文章如下↓
<br>
<br>
<div id="posts_list">
{% for posts in posts %}
文章id:{{ posts['id'] }}
<br>
标题: {{ posts['title'] }}
<br>
日期: {{ posts['date'].replace('.', '-')}}
<a href="{{ url_for('blog.posts_list') }}{{ posts['id'] }}">页面跳转</a>
<br>
<br>
{% endfor %}
</div>
</div>
<!-- css 部分 -->
<style>
#posts_list {
height: 300px;
overflow: auto;
}
#posts {
margin: -400px 0 0 60%;
}
/* 日志 */
#logs
{
height: 50%;
width: 40%;
overflow: auto;
background: #ffffffbc;
/* up、right、down、left */
margin: -10px 0px 0px 30px;
}
#td_logs
{
width: 93px;
padding-top: 1.8px;
vertical-align: top;
}
#td_logs_content
{
color: rgb(132, 132, 132);
padding-left: 10px;
padding-bottom: 5px;
}
/* 日志 */
</style>
{% endblock %}
{% block move %}
<div id="class">
<h1></h1>
<h1>更多</h1>
<form action="https://greendam.icu/" method="get">
<button>随机一张格林达姆</button>
<br>
来源: <a href="https://greendam.icu/">https://greendam.icu/</a>
</form>
<a href="./paint/">
<button>paint</button>
</a>
<p style="margin: 870px 0 0 0; text-align: center; color: white;">
主页访问计数: {{counter}}
</p>
</div>
<style>
#class {
margin: 0 0 0 0;
margin-left: 5%;
width: 90%;
height: 640px;
background-color: #93B9FFA4;
}
</style>
{% endblock %}