Skip to content

Commit

Permalink
feat: new theme support
Browse files Browse the repository at this point in the history
  • Loading branch information
baiyuanneko committed Feb 3, 2025
1 parent a75ca2a commit 88dbfff
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion App/default_theme_src
Submodule default_theme_src updated 1 files
+179 −13 index.html
3 changes: 3 additions & 0 deletions App/render_blog_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,9 @@ module.exports = function () {
"site_theme_choose_solarized_pink"
).selected = true;
break;
case "Miracle":
document.getElementById("site_theme_choose_miracle").selected = true;
break;
}

const selectElements = document.querySelectorAll("select");
Expand Down
4 changes: 4 additions & 0 deletions App/save_blog_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ module.exports = function () {
"site_theme_choose_default_theme"
).selected === true) {
blog["站点主题"] = "default";
} else if (document.getElementById(
"site_theme_choose_miracle"
).selected === true) {
blog["站点主题"] = "Miracle";
}

BlogInstance.writeBlogData();
Expand Down
1 change: 1 addition & 0 deletions App/ui/blog_settings_ui.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ <h2>
${langdata["DEFAULT_THEME"][lang_name]}
</option>
<option value="solarized_pink" id="site_theme_choose_solarized_pink">Solarized_Pink</option>
<option value="miracle" id="site_theme_choose_miracle">Miracle</option>
</select>
</div>

Expand Down

0 comments on commit 88dbfff

Please sign in to comment.