mirror of
https://gitee.com/huanghongxun/HMCL-docs.git
synced 2026-09-15 08:31:11 +08:00
This commit is contained in:
@@ -5,10 +5,11 @@ layout: single
|
||||
{{ content }}
|
||||
|
||||
{% if page.author or page.contributors or jekyll.environment == 'production' and page.hits %}
|
||||
<script src="{{ '/assets/js/meta.js' | relative_url }}"></script>
|
||||
<script>
|
||||
{%- if page.author %}appendMeta("{{ page.author }}", "fas fa-user-pen");{% endif -%}
|
||||
{%- for contributor in page.contributors %}appendMeta("{{ contributor }}", "fas fa-user-pen");{% endfor -%}
|
||||
{%- if jekyll.environment == 'production' and page.hits %}hits({{ page.url | absolute_url | jsonify }});{% endif -%}
|
||||
window.addEventListener("load", () => {
|
||||
{%- if page.author %}appendMeta("{{ page.author }}", "fas fa-user-pen");{% endif -%}
|
||||
{%- for contributor in page.contributors %}appendMeta("{{ contributor }}", "fas fa-user-pen");{% endfor -%}
|
||||
{%- if jekyll.environment == 'production' and page.hits %}hits({{ page.url | absolute_url | jsonify }});{% endif -%}
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
@@ -46,10 +46,12 @@ layout: single
|
||||
{% endfor %}
|
||||
|
||||
<script>
|
||||
for (const settingItem of document.getElementsByClassName("setting-item")) {
|
||||
settingItem.addEventListener("change", ({ target }) => settings.set(target.name, target.value));
|
||||
settings.onChange(settingItem.name, (value) => settingItem.type === "radio" && (settingItem.checked = settingItem.value === value));
|
||||
}
|
||||
window.addEventListener("load", () => {
|
||||
for (const settingItem of document.getElementsByClassName("setting-item")) {
|
||||
settingItem.addEventListener("change", ({ target }) => settings.set(target.name, target.value));
|
||||
settings.onChange(settingItem.name, (value) => settingItem.type === "radio" && (settingItem.checked = settingItem.value === value));
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>.notice label input { display: inline }</style>
|
||||
|
||||
Reference in New Issue
Block a user