Skip to content

Commit

Permalink
bump to version 20241112
Browse files Browse the repository at this point in the history
  • Loading branch information
baiyuanneko committed Nov 12, 2024
1 parent 8b98c47 commit 2c71391
Show file tree
Hide file tree
Showing 10 changed files with 275 additions and 129 deletions.
2 changes: 1 addition & 1 deletion App/App.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"VersionNumber": 20240613,
"VersionNumber": 20241112,
"AppName": "Baiyuanneko's Blog Generator",
"officialWebsite": "https://bbg.nekomoe.xyz",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion App/default_theme_src
Submodule default_theme_src updated 1 files
+42 −1 index.html
3 changes: 3 additions & 0 deletions App/generate_rss.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ module.exports = function () {
<link href="${blog["网站域名(包括https://)"]}/index.html?type=article&filename=${blog["文章列表"][i]["文件名"]}"/>
<id>${blog["网站域名(包括https://)"]}/index.html?type=article&filename=${blog["文章列表"][i]["文件名"]}</id>
<content type="html">
<![CDATA[
${blog["文章列表"][i]["是否加密"]===true?blog["文章列表"][i]["摘要"]:xss_filter(marked(readFileSync(rootDir+"/data/articles/"+blog["文章列表"][i]["文件名"],"utf-8")))}
]]>
</content>
<summary type="html">${blog["文章列表"][i]["摘要"]}</summary>
<updated>${new Date(blog["文章列表"][i]["修改时间(时间戳)"]).toISOString()}</updated>
Expand Down
2 changes: 1 addition & 1 deletion App/i18n
8 changes: 8 additions & 0 deletions App/migrate_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ function addLive2DWidgetSupport() {
}};
}

function addSupportForSiteTheme() {
blog["站点主题"] = "default";
}

module.exports = function () {
const currentBlogVersion = parseInt(
blog["博客程序版本(禁止修改此值,否则会导致跨版本升级异常)"],
Expand Down Expand Up @@ -323,6 +327,10 @@ module.exports = function () {
addLive2DWidgetSupport();
}

if (currentBlogVersion <= 20241111) {
addSupportForSiteTheme();
}

check_third_party_theme_compatiblity();
updateBlogIndexHtml();

Expand Down
358 changes: 233 additions & 125 deletions App/render_blog_settings.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions App/save_blog_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,15 @@ module.exports = function () {
blog["全局评论设置"]["waline设置"]["serverurl"] = waline_server_url;
}

if (document.getElementById(
"site_theme_choose_solarized_pink"
).selected === true) {
blog["站点主题"] = "Solarized_Pink";
} else if (document.getElementById(
"site_theme_choose_default_theme"
).selected === true) {
blog["站点主题"] = "default";
}

BlogInstance.writeBlogData();
if(save_blog_settings_operate_success === true){

Check warning on line 217 in App/save_blog_settings.js

View workflow job for this annotation

GitHub Actions / run-eslint

Empty block statement
Expand Down
11 changes: 11 additions & 0 deletions App/ui/blog_settings_ui.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@ <h2>
<option value="japanese" id="sitelang_japanese">日本語</option>
</select>
</div>

<div class="mb-3">
<label class="form-label"><i class="fa fa-paint-brush"></i> ${langdata["SITE_THEME"][lang_name]}</label>
<br />
<select class="form-select">
<option value="default_theme" id="site_theme_choose_default_theme">
${langdata["DEFAULT_THEME"][lang_name]}
</option>
<option value="solarized_pink" id="site_theme_choose_solarized_pink">Solarized_Pink</option>
</select>
</div>

<br />

Expand Down
7 changes: 7 additions & 0 deletions docs/zh-cn/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# 更新日志

## 20241112

- 修复了生成博客的页面中页面可能会错位的问题
- 在打开站点时添加安全提示
- 默认主题支持站点主题功能
- 让生成博客的暗色模式的效果更易读

## 20240613

- 修复了无法创建新文章(`Invalid time value`)的问题
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bbg",
"version": "20240613.0.0",
"version": "20241112.0.0",
"packageManager": "[email protected]",
"description": "A static blog generator based on Electron Technology.",
"license": "UNLICENSED",
Expand Down

0 comments on commit 2c71391

Please sign in to comment.