mirror of
https://github.com/Dichgrem/Blog.git
synced 2026-02-05 09:31:55 -05:00
Compare commits
14 Commits
c6e6bf3450
...
202d32c8d6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
202d32c8d6 | ||
|
|
30e48b01c1 | ||
|
|
3331e2f3b1 | ||
|
|
02c5b6722d | ||
|
|
782ff23f87 | ||
|
|
2507f3a381 | ||
|
|
663989a328 | ||
|
|
bd91722e17 | ||
|
|
39ec7848aa | ||
|
|
1f827723c0 | ||
|
|
742abf8a37 | ||
|
|
e055808ffe | ||
|
|
fc411e21d8 | ||
|
|
e6869053fe |
16
config.toml
16
config.toml
@@ -22,22 +22,6 @@ taxonomies = [
|
|||||||
[markdown]
|
[markdown]
|
||||||
highlight_code = true
|
highlight_code = true
|
||||||
highlight_theme = "boron"
|
highlight_theme = "boron"
|
||||||
render_emoji = false
|
|
||||||
external_links_target_blank = true
|
|
||||||
external_links_no_follow = true
|
|
||||||
external_links_no_referrer = true
|
|
||||||
smart_punctuation = false
|
|
||||||
bottom_footnotes = true
|
|
||||||
table_of_contents = { start_level = 2, end_level = 4 }
|
|
||||||
|
|
||||||
[markdown.highlight_themes]
|
|
||||||
light = "boron"
|
|
||||||
dark = "dracula"
|
|
||||||
|
|
||||||
[slugify]
|
|
||||||
paths = "on"
|
|
||||||
taxonomies = "on"
|
|
||||||
anchors = "on"
|
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
|
|
||||||
|
|||||||
@@ -578,17 +578,6 @@ nft list table ip mangle
|
|||||||
- 关闭防火墙的禁止转发规则,全部允许;
|
- 关闭防火墙的禁止转发规则,全部允许;
|
||||||
- 将X86主路由的网线插到AP的任意一个LAN口。
|
- 将X86主路由的网线插到AP的任意一个LAN口。
|
||||||
|
|
||||||
## 更新所有包
|
|
||||||
|
|
||||||
```
|
|
||||||
opkg update
|
|
||||||
|
|
||||||
opkg list-upgradable \
|
|
||||||
| awk '{print $1}' \
|
|
||||||
| grep -vE '^(base-files|busybox|libc|libgcc|libstdc\+\+|procd|netifd|ubus|uci|kernel|kmod-|fstools|mtd|fwtool)$' \
|
|
||||||
| xargs -r opkg upgrade
|
|
||||||
```
|
|
||||||
|
|
||||||
## 🔗
|
## 🔗
|
||||||
|
|
||||||
- [Openwrt wiki](https://openwrt.org/zh/docs/start)
|
- [Openwrt wiki](https://openwrt.org/zh/docs/start)
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ tags = ["Windows"]
|
|||||||
- **抓包**: [Wireshark](https://www.wireshark.org/download.html)
|
- **抓包**: [Wireshark](https://www.wireshark.org/download.html)
|
||||||
- **启动器**: [Flow.Launcher](https://github.com/Flow-Launcher/Flow.Launcher)
|
- **启动器**: [Flow.Launcher](https://github.com/Flow-Launcher/Flow.Launcher)
|
||||||
- **输入法**: [Rime](https://rime.im/download/)
|
- **输入法**: [Rime](https://rime.im/download/)
|
||||||
- **浏览器**: [Floorp](https://github.com/Floorp-Projects/Floorp) / [Chrome](https://dl.google.com/tag/s/installdataindex/update2/installers/ChromeStandaloneSetup64.exe)
|
- **浏览器**: [Floorp](https://github.com/Floorp-Projects/Floorp) / [Chrome](https://www.google.com/chrome/)
|
||||||
- **编辑器**: [VSCodium](https://github.com/VSCodium/vscodium)
|
- **编辑器**: [VSCodium](https://github.com/VSCodium/vscodium)
|
||||||
- **虚拟机**: Hyper‑V
|
- **虚拟机**: Hyper‑V
|
||||||
- **科学上网**: [GFS](https://github.com/GUI-for-Cores/GUI.for.SingBox)
|
- **科学上网**: [GFS](https://github.com/GUI-for-Cores/GUI.for.SingBox)
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
.copy-button {
|
|
||||||
position: absolute;
|
|
||||||
top: 8px;
|
|
||||||
right: 8px;
|
|
||||||
padding: 4px 10px;
|
|
||||||
font-size: 0.8rem;
|
|
||||||
font-family: DejaVu Sans Mono, Monaco, Consolas, Ubuntu Mono, monospace;
|
|
||||||
background: var(--accent);
|
|
||||||
color: var(--background);
|
|
||||||
border: none;
|
|
||||||
border-radius: 3px;
|
|
||||||
cursor: pointer;
|
|
||||||
opacity: 0;
|
|
||||||
transition: opacity 0.2s ease;
|
|
||||||
z-index: 1;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.copied {
|
|
||||||
background: #4caf50;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pre:hover .copy-button {
|
|
||||||
opacity: 0.8;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre:hover .copy-button:hover {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
@@ -133,7 +133,6 @@ pre {
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
border-top: 1px solid rgba(255, 255, 255, .1);
|
border-top: 1px solid rgba(255, 255, 255, .1);
|
||||||
border-bottom: 1px solid rgba(255, 255, 255, .1);
|
border-bottom: 1px solid rgba(255, 255, 255, .1);
|
||||||
position: relative;
|
|
||||||
|
|
||||||
@media (max-width: $phone-max-width) {
|
@media (max-width: $phone-max-width) {
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
|
|||||||
@@ -4,7 +4,5 @@
|
|||||||
@import 'logo';
|
@import 'logo';
|
||||||
@import 'main';
|
@import 'main';
|
||||||
@import 'post';
|
@import 'post';
|
||||||
@import 'toc';
|
|
||||||
@import 'copy';
|
|
||||||
@import 'pagination';
|
@import 'pagination';
|
||||||
@import 'footer';
|
@import 'footer';
|
||||||
|
|||||||
@@ -1,88 +0,0 @@
|
|||||||
html {
|
|
||||||
scroll-behavior: smooth;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc-container {
|
|
||||||
position: fixed;
|
|
||||||
right: 150px;
|
|
||||||
top: 180px;
|
|
||||||
width: 250px;
|
|
||||||
max-height: calc(100vh - 200px);
|
|
||||||
overflow-y: auto;
|
|
||||||
z-index: 10;
|
|
||||||
display: none;
|
|
||||||
|
|
||||||
@media (min-width: 1400px) {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc {
|
|
||||||
padding: 15px 0;
|
|
||||||
|
|
||||||
&-title {
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 1.1rem;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
color: var(--color);
|
|
||||||
}
|
|
||||||
|
|
||||||
ul {
|
|
||||||
list-style: none;
|
|
||||||
padding-left: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
li {
|
|
||||||
margin: 4px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul ul {
|
|
||||||
padding-left: 20px;
|
|
||||||
margin-top: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
display: block;
|
|
||||||
text-decoration: none;
|
|
||||||
color: var(--color);
|
|
||||||
font-size: 0.9rem;
|
|
||||||
padding: 2px 0;
|
|
||||||
transition: color 0.2s ease;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: var(--accent);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:target {
|
|
||||||
color: var(--accent);
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc-level-1 {
|
|
||||||
font-size: 0.95rem;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc-level-2 {
|
|
||||||
font-size: 0.9rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc-level-3 {
|
|
||||||
font-size: 0.85rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc-level-4,
|
|
||||||
.toc-level-5,
|
|
||||||
.toc-level-6 {
|
|
||||||
font-size: 0.8rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-content {
|
|
||||||
scroll-margin-top: 80px;
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
(function() {
|
|
||||||
document.querySelectorAll('pre code').forEach((codeBlock) => {
|
|
||||||
const pre = codeBlock.parentElement;
|
|
||||||
|
|
||||||
if (pre.querySelector('.copy-button')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const copyButton = document.createElement('button');
|
|
||||||
copyButton.className = 'copy-button';
|
|
||||||
copyButton.textContent = '复制';
|
|
||||||
copyButton.setAttribute('aria-label', '复制代码');
|
|
||||||
copyButton.setAttribute('type', 'button');
|
|
||||||
|
|
||||||
copyButton.addEventListener('click', () => {
|
|
||||||
navigator.clipboard.writeText(codeBlock.textContent.trimEnd()).then(() => {
|
|
||||||
copyButton.textContent = '已复制!';
|
|
||||||
copyButton.classList.add('copied');
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
copyButton.textContent = '复制';
|
|
||||||
copyButton.classList.remove('copied');
|
|
||||||
}, 2000);
|
|
||||||
}).catch((err) => {
|
|
||||||
copyButton.textContent = '失败';
|
|
||||||
setTimeout(() => {
|
|
||||||
copyButton.textContent = '复制';
|
|
||||||
}, 2000);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
pre.appendChild(copyButton);
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
@@ -10,41 +10,5 @@
|
|||||||
{{ post_macros::content(page=page, summary=false, show_only_description=false) }}
|
{{ post_macros::content(page=page, summary=false, show_only_description=false) }}
|
||||||
{{ post_macros::earlier_later(page=page) }}
|
{{ post_macros::earlier_later(page=page) }}
|
||||||
</div>
|
</div>
|
||||||
{% if page.toc %}
|
|
||||||
<div class="toc-container">
|
|
||||||
<div class="toc">
|
|
||||||
<div class="toc-title">目录</div>
|
|
||||||
<ul>
|
|
||||||
{% for h in page.toc %}
|
|
||||||
<li class="toc-level-{{ h.level }}">
|
|
||||||
<a href="#{{ h.id | safe }}">{{ h.title }}</a>
|
|
||||||
{% if h.children %}
|
|
||||||
<ul>
|
|
||||||
{% for h2 in h.children %}
|
|
||||||
<li class="toc-level-{{ h2.level }}">
|
|
||||||
<a href="#{{ h2.id | safe }}">{{ h2.title }}</a>
|
|
||||||
{% if h2.children %}
|
|
||||||
<ul>
|
|
||||||
{% for h3 in h2.children %}
|
|
||||||
<li class="toc-level-{{ h3.level }}">
|
|
||||||
<a href="#{{ h3.id | safe }}">{{ h3.title }}</a>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
||||||
{% block extra_body %}
|
|
||||||
<script src="{{ get_url(path='copy.js', trailing_slash=false) | safe }}"></script>
|
|
||||||
{% endblock extra_body %}
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user