轻雪天气更新

This commit is contained in:
远野千束 2024-04-27 11:42:58 +08:00
parent 86c7b70e63
commit 3713bf397c
3 changed files with 19 additions and 4 deletions

View File

@ -19,7 +19,13 @@ body {
} }
#author-description { #author-description {
text-align: center; display: flex;
justify-content: center;
align-items: center;
}
#author-text {
margin-left: 20px;
color: var(--sub-text-color); color: var(--sub-text-color);
font-size: 30px; font-size: 30px;
} }

View File

@ -13,5 +13,15 @@ document.body.style.backgroundImage = `url(./img/${bgs[Math.floor(Math.random()
let descriptionDiv = document.createElement("div"); let descriptionDiv = document.createElement("div");
descriptionDiv.className = 'info-box' descriptionDiv.className = 'info-box'
descriptionDiv.id = 'author-description' descriptionDiv.id = 'author-description'
descriptionDiv.innerText = 'Designed by SnowyKami' // 添加一副头像且垂直居中
let avatar = document.createElement("img");
avatar.src = 'https://q.qlogo.cn/g?b=qq&nk=2751454815&s=640'
avatar.style.height = '50px';
avatar.style.borderRadius = '50%';
let text = document.createElement("div");
text.id = 'author-text';
text.innerText = 'Designed by SnowyKami';
descriptionDiv.appendChild(avatar);
descriptionDiv.appendChild(text);
document.body.appendChild(descriptionDiv); document.body.appendChild(descriptionDiv);

View File

@ -58,7 +58,7 @@ class Database:
""" """
table_name = model.TABLE_NAME table_name = model.TABLE_NAME
model_type = type(model) model_type = type(model)
nonebot.logger.debug(f"Selecting {model_type} WHERE {condition} {args}") nonebot.logger.debug(f"Selecting {model.TABLE_NAME} WHERE {condition.replace('?', '%s') % args}")
if not table_name: if not table_name:
raise ValueError(f"数据模型{model_type.__name__}未提供表名") raise ValueError(f"数据模型{model_type.__name__}未提供表名")
@ -82,7 +82,6 @@ class Database:
"""增/改操作 """增/改操作
Args: Args:
*args: *args:
Returns: Returns:
""" """
table_list = [item[0] for item in self.cursor.execute("SELECT name FROM sqlite_master WHERE type='table'").fetchall()] table_list = [item[0] for item in self.cursor.execute("SELECT name FROM sqlite_master WHERE type='table'").fetchall()]