修改主页,感觉还可以

This commit is contained in:
2025-12-27 13:35:20 +08:00
parent 7c94590c40
commit 8ca06abe4a
20 changed files with 353 additions and 337 deletions

View File

@@ -0,0 +1,142 @@
{# base模板 #}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" lang="zh_CN">
<link rel="icon" type="image/x-icon" href="/static/icon/original.ico">
<link rel="preload" href="{{ wallpaper }}" as="image">
<title>{% block title %}{% endblock %} | ww3</title>
</head>
<body>
{% set navbar_list = [
{"id":1, "name": "首页", "url": url_for('blog.home')},
{"id":2, "name": "关于", "url": url_for('blog.about')},
{"id":3, "name": "文章", "url": url_for('blog.posts_list')},
{"id":4, "name": "mirrors", "url": url_for('blog.autoindex')},
{"id":5, "name": "study", "url": url_for('study.home')},
]%}
{% 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 %}
<div style="display: none;">
<p>一个致力于分享个人学习到的知识的记录形式的屑站</p>
<p>在这里,我会分享我学到的计算机知识或者记录一些自己经常碰到的问题</p>
</div>
<div id="wallpaper">
<div id="navbar1">
<br>
</div>
<div id="navbar">
{% for navbar in navbar_list %}
<a href="{{ navbar.url }}" id="url_">{{ navbar.name }}</a></td>
{% endfor %}
<a id="url_" href="https://api.ww3.tw">api</a>
<a id="url_" href="https://gitea.ww3.tw">gitea</a>
</div>
<br>
<div style="text-align: center;
font-weight: bolder;
text-shadow:
3px 3px 0 rgba(0,0,0,0.2),
6px 6px 0 rgba(0,0,0,0.1);
font-size: 300%;
color: rgb(240, 248, 255);
">
<p>open-ww3-poject</p>
</div>
<div>
<p style="text-align: right; margin: 420px 0 0 0;">图片来源: <a href="{{ wallpaper }}" style="color: rgb(247, 74, 74);">{{ wallpaper }}<a></p>
</div>
<div style="text-align: center; color: rgba(255, 255, 255, 0.664); margin: -400px 0 0 0; text-shadow: 3px 3px 5px rgba(47, 79, 79, 0.7);">
<p>一个致力于分享个人学习到的知识的记录形式的屑站</p>
<p>在这里,我会分享我学到的计算机知识或者记录一些自己经常碰到的问题</p>
</div>
</div>
<div id="logs_and_page">
{% block logs_and_page %}
{# 这里存放写入模板的数据 #}
{% endblock %}
</div>
<footer style="
text-align: center;
background-color: rgba(0, 0, 0, 0);
color: rgb(255, 255, 255);
padding: 10px;
margin-top: 0;
">
© 2025 | open-ww3-poject for ww3.tw
<br>
<a href="https://wiki.ww3.tw/doku.php?id=zh_cn:skimrme" style="color: rgb(188, 188, 255);">关于站长</a>
<a href="{{ url_for('blog.sitemap') }}" style="color: rgb(188, 188, 255);">网页地图</a>
<br>
<br>
联系:
<br>
电子邮件: <a style="color: rgb(188, 188, 255);">master@ww3.tw<a>
<br>
社交:
<br>
暂不提供
</footer>
</body>
</html>
{# css部分 #}
<style>
#navbar {
width: 100%;
text-align: center;
}
#url_ {
margin: 0 5px 0 0;
color: black;
font-weight: bold;
}
#logs_and_page {
margin: 0 0 0 0;
margin-left: 5%;
width: 90%;
height: 640px;
background-color: #93B9FFA4;
}
#wallpaper {
margin-left: 5%;
width: 90%;
height: 640px;
background-color: #93B9FFA4;
background-image: url('{{ wallpaper }}');
background-size: 100% 100%;
background-size: cover;
background-position: center;
}
#navbar1 {
font-size: 125%;
width: 35%;
height: 13px;
background-color: rgba(169, 198, 252, 0);
}
#navbar {
font-size: 125%;
width: 500px;
height: auto;
background-color: rgb(169, 198, 252);
}
html, body {
margin: 0;
}
a {
text-decoration: none;
}
body {
background-color: rgb(92, 92, 92);
}
</style>