mirror of
https://gitee.com/huanghongxun/HMCL-docs.git
synced 2025-11-05 04:24:26 +08:00
Compare commits
3 Commits
c0d1c09f2a
...
b67062aee9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b67062aee9 | ||
|
|
9820df0db0 | ||
|
|
18d7508cd9 |
@ -8,6 +8,8 @@ clone:
|
||||
steps:
|
||||
- name: build
|
||||
image: jekyll/jekyll:4.2.2
|
||||
environment:
|
||||
JEKYLL_ENV: production
|
||||
commands:
|
||||
- touch Gemfile.lock
|
||||
- chmod a+w Gemfile.lock
|
||||
|
||||
24
_config.yml
24
_config.yml
@ -20,6 +20,7 @@
|
||||
|
||||
remote_theme: "mmistakes/minimal-mistakes@4.26.2"
|
||||
minimal_mistakes_skin: "default" # "air", "aqua", "contrast", "dark", "dirt", "neon", "mint", "plum", "sunrise"
|
||||
minimal_mistakes_skin_dark: "dark" # "air", "aqua", "contrast", "dark", "dirt", "neon", "mint", "plum", "sunrise"
|
||||
locale: "zh-CN"
|
||||
|
||||
title: Hello Minecraft! Launcher 帮助文档
|
||||
@ -105,18 +106,11 @@ defaults:
|
||||
#
|
||||
# Excluded items can be processed by explicitly listing the directories or
|
||||
# their entries' file path in the `include:` list.
|
||||
#
|
||||
# exclude:
|
||||
# - .sass-cache/
|
||||
# - .jekyll-cache/
|
||||
# - gemfiles/
|
||||
# - Gemfile
|
||||
# - Gemfile.lock
|
||||
# - node_modules/
|
||||
# - vendor/bundle/
|
||||
# - vendor/cache/
|
||||
# - vendor/gems/
|
||||
# - vendor/ruby/
|
||||
|
||||
exclude:
|
||||
- scripts/
|
||||
- README.md
|
||||
- LICENSE
|
||||
|
||||
# Outputting
|
||||
permalink: /:categories/:title/
|
||||
@ -126,7 +120,13 @@ compress_html:
|
||||
ignore:
|
||||
envs: development
|
||||
|
||||
head_scripts:
|
||||
- /assets/js/theme.js
|
||||
|
||||
footer:
|
||||
links:
|
||||
- label: "Github"
|
||||
icon: "fab fa-fw fa-github"
|
||||
url: "https://github.com/HMCL-dev/HMCL"
|
||||
- label: "粤ICP备18071565号"
|
||||
url: "https://beian.miit.gov.cn"
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
|
||||
Billy Rick:
|
||||
name : "Billy Rick"
|
||||
bio : "What do you want, jewels? I am a very extravagant man."
|
||||
avatar : "/assets/images/bio-photo-2.jpg"
|
||||
links:
|
||||
- label: "Email"
|
||||
icon: "fas fa-fw fa-envelope-square"
|
||||
url: "mailto:billyrick@rick.com"
|
||||
- label: "Website"
|
||||
icon: "fas fa-fw fa-link"
|
||||
url: "https://thewhip.com"
|
||||
- label: "Twitter"
|
||||
icon: "fab fa-fw fa-twitter-square"
|
||||
url: "https://twitter.com/extravagantman"
|
||||
|
||||
Cornelius Fiddlebone:
|
||||
name : "Cornelius Fiddlebone"
|
||||
bio : "I ordered what?"
|
||||
avatar : "/assets/images/bio-photo.jpg"
|
||||
links:
|
||||
- label: "Email"
|
||||
icon: "fas fa-fw fa-envelope-square"
|
||||
url: "mailto:cornelius@thewhip.com"
|
||||
- label: "Twitter"
|
||||
icon: "fab fa-fw fa-twitter-square"
|
||||
url: "https://twitter.com/rhymeswithsackit"
|
||||
@ -1,8 +1,6 @@
|
||||
main:
|
||||
- title: 常见问题
|
||||
url: /faq.html
|
||||
- title: GitHub
|
||||
url: https://github.com/HMCL-dev/HMCL
|
||||
|
||||
docs:
|
||||
- title: 问题集合
|
||||
|
||||
2185
_data/ui-text.yml
Normal file
2185
_data/ui-text.yml
Normal file
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<link rel="shortcut icon" href="{{ '/favicon.ico' | relative_url }}">
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
---
|
||||
# Only the main Sass file needs front matter (the dashes are enough)
|
||||
search: false
|
||||
---
|
||||
|
||||
@charset "utf-8";
|
||||
|
||||
$sans-serif: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
|
||||
@import "minimal-mistakes/skins/{{ site.minimal_mistakes_skin | default: 'default' }}"; // skin
|
||||
@import "minimal-mistakes/skins/{{ site.minimal_mistakes_skin_dark | default: 'dark' }}"; // skin
|
||||
@import "minimal-mistakes"; // main partials
|
||||
45
assets/js/theme.js
Normal file
45
assets/js/theme.js
Normal file
@ -0,0 +1,45 @@
|
||||
---
|
||||
layout: null
|
||||
---
|
||||
var darkTheme = document.createElement("link");
|
||||
darkTheme.rel = "stylesheet alternate";
|
||||
darkTheme.href = "{{ '/assets/css/main.dark.css' | relative_url }}";
|
||||
document.head.appendChild(darkTheme);
|
||||
window.addEventListener("DOMContentLoaded", function () {
|
||||
var list = document.querySelector(".masthead .visible-links");
|
||||
if (!list) return;
|
||||
var mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
||||
function handler() {
|
||||
darkTheme.rel = mediaQuery.matches ? "stylesheet" : "stylesheet alternate";
|
||||
}
|
||||
var current = 0;
|
||||
var modes = ["light", "dark", "auto"];
|
||||
var modeNames = ["亮色", "暗色", "自动"];
|
||||
var switcher = document.createElement("a");
|
||||
switcher.className = "masthead__menu-item";
|
||||
switcher.innerText = modeNames[current];
|
||||
switcher.href = "javascript:;";
|
||||
switcher.onclick = function () {
|
||||
themeApply(current + 1);
|
||||
}
|
||||
list.appendChild(switcher);
|
||||
function themeApply(index) {
|
||||
index = (Number(index) || 0) % modes.length;
|
||||
if (index === current) return;
|
||||
if (modes[current] === "auto") mediaQuery.removeEventListener("change", handler);
|
||||
current = index;
|
||||
var mode = modes[current];
|
||||
switcher.innerText = modeNames[current];
|
||||
localStorage.setItem("theme", current);
|
||||
if (mode === "light") darkTheme.rel = "stylesheet alternate";
|
||||
else if (mode === "dark") darkTheme.rel = "stylesheet";
|
||||
else {
|
||||
mediaQuery.addEventListener("change", handler);
|
||||
handler();
|
||||
}
|
||||
}
|
||||
themeApply(localStorage.getItem("theme"));
|
||||
window.addEventListener("storage", function (event) {
|
||||
event.key === "theme" && themeApply(event.newValue);
|
||||
});
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user