忘记做了什么先上传

This commit is contained in:
2026-02-08 10:54:32 +08:00
parent 24dc04287e
commit 27aeb90285
6 changed files with 144 additions and 14 deletions

View File

@@ -97,11 +97,19 @@
<div id="class">
<h1></h1>
<h1>更多</h1>
my plan
<br>
<br>
essay
<form action="https://greendam.icu/" method="get">
<button>随机一张格林达姆</button>
<br>
来源: <a href="https://greendam.icu/">https://greendam.icu/</a>
</form>
<form action="./paint/" method="get">
<button>paint</button>
</form>
<p style="margin: 870px 0 0 0; text-align: center; color: white;">
主页访问计数: {{counter}}
</p>
</div>
<style>
#class {

View File

@@ -37,4 +37,5 @@
<a href="https://icp.hentioe.dev/sites/20257900" target="_blank">喵ICP备20257900号</a>
<br>
<a href="https://icp.redcha.cn/beian/ICP-2026010278.html" title="茶ICP备2026010278号" target="_blank">茶ICP备2026010278号</a>
<br>
</footer>

16
templates/blog/paint.html Normal file
View File

@@ -0,0 +1,16 @@
{# 引入base #}
{% extends 'blog/extension/base.html' %}
{# 引入标题 #}
{% block title %}paint{% endblock %}
{% include 'blog/include/head.html' %}
{% block content %}
{% include 'blog/include/navbar.html' %}
施工中...
<br>
这里会展示我绘制的一些屑作....
<br>
{% endblock %}

View File

@@ -2,6 +2,13 @@
<html>
<head>
<title>{{ posts['title'] }}</title>
<link rel="icon" type="image/x-icon" href="/static/icon/original.ico">
<meta property="og:title" content="{{ posts['title'] }}">
<meta property="og:description" content="{{ posts['content']}}">
<meta property="og:image" content="https://ww3.tw/static/img/open-ww3-project.png">
<meta property="og:url" content="https://ww3.tw/blog/posts/{{ posts['id']}}/">
<meta property="og:type" content="website">
</head>
</head>
<body>
<a href="/blog">返回主页</a>
@@ -13,11 +20,24 @@
<br>
<br>
<br>
<hr>
<h2>留言区: </h2>
{% for message in message %}
[ {{ message['name'] }} ] >$
{{ message['content'] }}<br>
{{ message['date'] }}
<form method="post" action="./chat/">
昵称: (20字)
<input type="text" name="name" maxlength="20" required>
<br>
留言内容: (100字)
<br>
<textarea name="data" maxlength="100" style="height: 60px;" required></textarea>
<button type="submit">发送</button>
</form>
<br>
{% for message_ss in message_ss %}
<span class="msg-date">{{message_ss.date}}</span>
<br>
[{{message_ss.name}}@arch-cat ArchLinux]
<br>
$ {{message_ss.data}}
<br>
<br>
{% endfor %}
@@ -30,4 +50,26 @@
a {
text-decoration: none;
}
</style>
</style>
<script>
document.querySelectorAll('.msg-date').forEach(el => {
let dateStr = el.innerText.trim();
if (dateStr) {
// 兼容 ISO 格式,将空格替换为 T 方便解析
let date = new Date(dateStr.replace(' ', 'T'));
// 增加 8 小时
date.setHours(date.getHours() + 8);
// 格式化回 YYYY-MM-DD HH:mm:ss
let formatted = date.getFullYear() + '-' +
String(date.getMonth() + 1).padStart(2, '0') + '-' +
String(date.getDate()).padStart(2, '0') + ' ' +
String(date.getHours()).padStart(2, '0') + ':' +
String(date.getMinutes()).padStart(2, '0') + ':' +
String(date.getSeconds()).padStart(2, '0');
el.innerText = formatted;
}
});
</script>