mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-16 03:32:51 +02:00
chore: update <hr> styles, fix unexpected comments in rss feed, update theme guides
This commit is contained in:
parent
155202adeb
commit
d10d90a8ef
20 changed files with 253 additions and 182 deletions
|
@ -93,13 +93,13 @@ const filteredHeadings = headings.filter(heading =>
|
|||
<!-- Override heti default styles >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -->
|
||||
<style>
|
||||
.toc-title {
|
||||
--at-apply: 'font-semibold ml-4 2xl:hidden';
|
||||
--at-apply: 'ml-4 font-semibold 2xl:hidden';
|
||||
}
|
||||
.toc-list {
|
||||
--at-apply: 'mb-4 mt-1 list-none pl-0 space-y-2 2xl:(pb-3.3 space-y-1.2)';
|
||||
--at-apply: 'mb-4 mt-1 list-none pl-0 space-y-2 2xl:space-y-1.2';
|
||||
}
|
||||
.toc-link-h2, .toc-link-h3, .toc-link-h4 {
|
||||
--at-apply: 'text-sm no-underline font-normal text-balance 2xl:(text-3.2 c-secondary/60 transition-colors transition-font-weight duration-300 ease-out hover:(c-secondary font-medium))';
|
||||
--at-apply: 'text-balance text-sm font-normal no-underline 2xl:(text-3.2 c-secondary/60 transition-colors transition-font-weight duration-300 ease-out hover:c-secondary hover:font-medium)';
|
||||
}
|
||||
|
||||
/* Initial collapsed state with zero height grid row */
|
||||
|
|
|
@ -136,7 +136,7 @@ export const themeConfig: ThemeConfig = {
|
|||
links: [
|
||||
{
|
||||
name: 'RSS',
|
||||
url: '/rss.xml', // rss.xml, atom.xml
|
||||
url: '/atom.xml', // or /rss.xml
|
||||
},
|
||||
{
|
||||
name: 'GitHub',
|
||||
|
|
|
@ -112,7 +112,7 @@ To create a blockquote, add a `>` in front of a paragraph. To create a blockquot
|
|||
|
||||
## Tables
|
||||
|
||||
To add a table, use three or more hyphens `---` to create each column’s header, and use pipes `|` to separate each column.
|
||||
To add a table, use three or more hyphens `---` to create each column's header, and use pipes `|` to separate each column.
|
||||
|
||||
### Syntax
|
||||
|
||||
|
@ -226,7 +226,7 @@ To create a code block, add three backticks ```` ``` ```` at the start and end o
|
|||
|
||||
## Other Elements
|
||||
|
||||
Including `<sup>` superscript, `<sub>` subscript, `<abbr>` abbreviation, `<del>` strikethrough, `<u>` wavy underline, `<kbd>` keyboard input, and `<mark>` highlight.
|
||||
Including `<sup>` superscript, `<sub>` subscript, `<abbr>` abbreviation, `<del>` strikethrough, `<u>` wavy underline, `<kbd>` keyboard input, `<mark>` highlight, and `<hr>` horizontal rule.
|
||||
|
||||
### Syntax
|
||||
|
||||
|
@ -244,6 +244,10 @@ Press <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>Delete</kbd> to end the session.
|
|||
There is <del>nothing</del> no code either good or bad, but running it makes it so.
|
||||
|
||||
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
|
||||
|
||||
Use three hyphens `---` or the `<hr>` tag to create a horizontal rule as shown below.
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
### Output
|
||||
|
@ -260,4 +264,8 @@ Press <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>Delete</kbd> to end the session.
|
|||
|
||||
There is <del>nothing</del> no code either good or bad, but running it makes it so.
|
||||
|
||||
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
|
||||
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
|
||||
|
||||
Use three hyphens `---` or the `<hr>` tag to create a horizontal rule as shown below.
|
||||
|
||||
---
|
||||
|
|
|
@ -226,7 +226,7 @@ Para crear un bloque de código, agregue tres acentos graves ```` ``` ```` al in
|
|||
|
||||
## Otros Elementos
|
||||
|
||||
Incluyendo superíndice `<sup>`, subíndice `<sub>`, abreviatura `<abbr>`, tachado `<del>`, subrayado ondulado `<u>`, entrada de teclado `<kbd>` y resaltado `<mark>`.
|
||||
Incluyendo superíndice `<sup>`, subíndice `<sub>`, abreviatura `<abbr>`, tachado `<del>`, subrayado ondulado `<u>`, entrada de teclado `<kbd>`, resaltado `<mark>` y línea horizontal `<hr>`.
|
||||
|
||||
### Sintaxis
|
||||
|
||||
|
@ -244,6 +244,10 @@ Presione <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>Suprimir</kbd> para finalizar l
|
|||
No hay <del>nada</del> ningún código que sea bueno o malo, pero ejecutarlo lo hace así.
|
||||
|
||||
La mayoría de las <mark>salamandras</mark> son nocturnas y cazan insectos, gusanos y otras criaturas pequeñas.
|
||||
|
||||
Use tres guiones `---` o la etiqueta `<hr>` para crear una línea horizontal como se muestra a continuación.
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
### Resultado
|
||||
|
@ -261,3 +265,7 @@ Presione <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>Suprimir</kbd> para finalizar l
|
|||
No hay <del>nada</del> ningún código que sea bueno o malo, pero ejecutarlo lo hace así.
|
||||
|
||||
La mayoría de las <mark>salamandras</mark> son nocturnas y cazan insectos, gusanos y otras criaturas pequeñas.
|
||||
|
||||
Use tres guiones `---` o la etiqueta `<hr>` para crear una línea horizontal como se muestra a continuación.
|
||||
|
||||
---
|
||||
|
|
|
@ -226,7 +226,7 @@ abbrlink: markdown-style-guide
|
|||
|
||||
## その他の要素
|
||||
|
||||
`<sup>` 上付き文字、`<sub>` 下付き文字、`<abbr>` 略語、`<del>` 取り消し線、`<u>` 波線、`<kbd>` キーボード入力、`<mark>` ハイライトなどが含まれます。
|
||||
`<sup>` 上付き文字、`<sub>` 下付き文字、`<abbr>` 略語、`<del>` 取り消し線、`<u>` 波線、`<kbd>` キーボード入力、`<mark>` ハイライト、`<hr>` 水平線などが含まれます。
|
||||
|
||||
### 構文
|
||||
|
||||
|
@ -244,6 +244,10 @@ X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
|||
<kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Delete</kbd> を押してセッションを終了します。
|
||||
|
||||
ほとんどの<mark>サンショウウオ</mark>は夜行性で、昆虫や虫などの小さな生き物を捕食します。
|
||||
|
||||
3つのハイフン `---` または `<hr>` タグを使用して、以下のような水平線を作成できます。
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
### 効果
|
||||
|
@ -261,3 +265,7 @@ X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
|||
<kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Delete</kbd> を押してセッションを終了します。
|
||||
|
||||
ほとんどの<mark>サンショウウオ</mark>は夜行性で、昆虫や虫などの小さな生き物を捕食します。
|
||||
|
||||
3つのハイフン `---` または `<hr>` タグを使用して、以下のような水平線を作成できます。
|
||||
|
||||
---
|
||||
|
|
|
@ -226,7 +226,7 @@ Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sap
|
|||
|
||||
## Другие элементы
|
||||
|
||||
Включая верхний индекс `<sup>`, нижний индекс `<sub>`, аббревиатуру `<abbr>`, зачёркнутый текст `<del>`, волнистое подчёркивание `<u>`, ввод с клавиатуры `<kbd>` и выделение `<mark>`.
|
||||
Включая верхний индекс `<sup>`, нижний индекс `<sub>`, аббревиатуру `<abbr>`, зачёркнутый текст `<del>`, волнистое подчёркивание `<u>`, ввод с клавиатуры `<kbd>`, выделение `<mark>` и горизонтальную линию `<hr>`.
|
||||
|
||||
### Синтаксис
|
||||
|
||||
|
@ -244,6 +244,10 @@ X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
|||
Нет <del>ничего</del> ни хорошего, ни плохого кода, но запуск делает его таковым.
|
||||
|
||||
Большинство <mark>саламандр</mark> ведут ночной образ жизни и охотятся на насекомых, червей и других мелких существ.
|
||||
|
||||
Используйте три дефиса `---` или тег `<hr>` для создания горизонтальной линии, как показано ниже.
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
### Результат
|
||||
|
@ -261,3 +265,7 @@ X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
|||
Нет <del>ничего</del> ни хорошего, ни плохого кода, но запуск делает его таковым.
|
||||
|
||||
Большинство <mark>саламандр</mark> ведут ночной образ жизни и охотятся на насекомых, червей и других мелких существ.
|
||||
|
||||
Используйте три дефиса `---` или тег `<hr>` для создания горизонтальной линии, как показано ниже.
|
||||
|
||||
---
|
||||
|
|
|
@ -226,7 +226,7 @@ abbrlink: markdown-style-guide
|
|||
|
||||
## 其他元素
|
||||
|
||||
包括 `<sup>` 上標,`<sub>` 下標,`<abbr>` 縮寫,`<del>` 刪除線,`<u>` 波浪線,`<kbd>` 鍵盤輸入,`<mark>` 高亮。
|
||||
包括 `<sup>` 上標,`<sub>` 下標,`<abbr>` 縮寫,`<del>` 刪除線,`<u>` 波浪線,`<kbd>` 鍵盤輸入,`<mark>` 高亮,`<hr>` 分隔線。
|
||||
|
||||
### 語法
|
||||
|
||||
|
@ -244,6 +244,10 @@ X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
|||
按下 <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Delete</kbd> 以結束會話。
|
||||
|
||||
大多數<mark>蠑螈</mark>晝伏夜出,以昆蟲、蠕蟲等小生物為食。
|
||||
|
||||
使用三個連字符 `---` 或 `<hr>` 標籤,即可創建如下分隔線。
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
### 效果
|
||||
|
@ -261,3 +265,7 @@ X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
|||
按下 <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Delete</kbd> 以結束會話。
|
||||
|
||||
大多數<mark>蠑螈</mark>晝伏夜出,以昆蟲、蠕蟲等小生物為食。
|
||||
|
||||
使用三個連字符 `---` 或 `<hr>` 標籤,即可創建如下分隔線。
|
||||
|
||||
---
|
||||
|
|
|
@ -226,7 +226,7 @@ abbrlink: markdown-style-guide
|
|||
|
||||
## 其他元素
|
||||
|
||||
包括 `<sup>` 上标,`<sub>` 下标,`<abbr>` 缩写,`<del>` 删除线,`<u>` 波浪线,`<kbd>` 键盘输入,`<mark>` 高亮。
|
||||
包括 `<sup>` 上标,`<sub>` 下标,`<abbr>` 缩写,`<del>` 删除线,`<u>` 波浪线,`<kbd>` 键盘输入,`<mark>` 高亮,`<hr>` 分隔线。
|
||||
|
||||
### 语法
|
||||
|
||||
|
@ -244,6 +244,10 @@ X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
|||
按下 <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Delete</kbd> 以结束会话。
|
||||
|
||||
大多数<mark>蝾螈</mark>昼伏夜出,以昆虫、蠕虫等小生物为食。
|
||||
|
||||
使用三个连字符 `---` 或 `<hr>` 标签,即可创建如下分隔线。
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
### 效果
|
||||
|
@ -261,3 +265,7 @@ X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
|
|||
按下 <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Delete</kbd> 以结束会话。
|
||||
|
||||
大多数<mark>蝾螈</mark>昼伏夜出,以昆虫、蠕虫等小生物为食。
|
||||
|
||||
使用三个连字符 `---` 或 `<hr>` 标签,即可创建如下分隔线。
|
||||
|
||||
---
|
||||
|
|
|
@ -160,7 +160,7 @@ footer: {
|
|||
links: [
|
||||
{
|
||||
name: 'RSS',
|
||||
url: '/rss.xml', // rss.xml, atom.xml
|
||||
url: '/atom.xml', // or /rss.xml
|
||||
},
|
||||
{
|
||||
name: 'GitHub',
|
||||
|
|
|
@ -160,7 +160,7 @@ footer: {
|
|||
links: [
|
||||
{
|
||||
name: 'RSS',
|
||||
url: '/rss.xml', // rss.xml, atom.xml
|
||||
url: '/atom.xml', // o /rss.xml
|
||||
},
|
||||
{
|
||||
name: 'GitHub',
|
||||
|
|
|
@ -160,7 +160,7 @@ footer: {
|
|||
links: [
|
||||
{
|
||||
name: 'RSS',
|
||||
url: '/rss.xml', // rss.xml, atom.xml
|
||||
url: '/atom.xml', // または /rss.xml
|
||||
},
|
||||
{
|
||||
name: 'GitHub',
|
||||
|
|
|
@ -160,7 +160,7 @@ footer: {
|
|||
links: [
|
||||
{
|
||||
name: 'RSS',
|
||||
url: '/rss.xml', // rss.xml, atom.xml
|
||||
url: '/atom.xml', // или /rss.xml
|
||||
},
|
||||
{
|
||||
name: 'GitHub',
|
||||
|
|
|
@ -160,7 +160,7 @@ footer: {
|
|||
links: [
|
||||
{
|
||||
name: 'RSS',
|
||||
url: '/rss.xml', // rss.xml, atom.xml
|
||||
url: '/atom.xml', // 或 /rss.xml
|
||||
},
|
||||
{
|
||||
name: 'GitHub',
|
||||
|
|
|
@ -160,7 +160,7 @@ footer: {
|
|||
links: [
|
||||
{
|
||||
name: 'RSS',
|
||||
url: '/rss.xml', // rss.xml, atom.xml
|
||||
url: '/atom.xml', // 或 /rss.xml
|
||||
},
|
||||
{
|
||||
name: 'GitHub',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GitHub Card */
|
||||
.gc-container {
|
||||
--at-apply: 'block my-6 px-5 py-4 overflow-x-auto uno-round-border bg-secondary/5';
|
||||
--at-apply: 'transition-colors ease-out lg:(px-6 py-5) hover:(bg-secondary/10 c-primary)';
|
||||
--at-apply: 'my-6 block overflow-x-auto uno-round-border bg-secondary/5 px-5 py-4';
|
||||
--at-apply: 'transition-colors ease-out hover:(bg-secondary/10 c-primary) lg:(px-6 py-5)';
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: oklch(var(--un-preset-theme-colors-secondary) / 0.15) transparent;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
|||
--at-apply: 'flex items-center gap-2.5 lg:gap-3';
|
||||
}
|
||||
.gc-owner-avatar {
|
||||
--at-apply: 'flex-shrink-0 w-5.5 aspect-square rounded-full bg-secondary/20';
|
||||
--at-apply: 'aspect-square w-5.5 flex-shrink-0 rounded-full bg-secondary/20';
|
||||
}
|
||||
.gc-repo-title {
|
||||
--at-apply: 'flex items-center leading-normal lg:text-lg';
|
||||
|
@ -26,12 +26,12 @@
|
|||
--at-apply: 'mx-1 op-40 lg:mx-1.2';
|
||||
}
|
||||
.gc-github-icon {
|
||||
--at-apply: 'flex-shrink-0 ml-auto w-5.5 lg:w-6';
|
||||
--at-apply: 'ml-auto w-5.5 flex-shrink-0 lg:w-6';
|
||||
}
|
||||
|
||||
/* Repo Description */
|
||||
.gc-repo-description.gc-repo-description {
|
||||
--at-apply: 'mt-2.45 mb-3.5 text-sm text-start lg:(mt-2.8 mb-4 text-base)';
|
||||
--at-apply: 'mb-3.5 mt-2.45 text-start text-sm lg:(mb-4 mt-2.8 text-base)';
|
||||
}
|
||||
|
||||
/* Info Bar */
|
||||
|
@ -53,10 +53,11 @@
|
|||
|
||||
/* Admonition >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> */
|
||||
.admonition-title {
|
||||
--at-apply: 'flex items-center mb-4 font-semibold';
|
||||
--at-apply: 'mb-4 flex items-center font-semibold';
|
||||
}
|
||||
.admonition-title::before {
|
||||
--at-apply: 'inline-block mr-2 aspect-square w-4 align-text-bottom content-[""]';
|
||||
content: '';
|
||||
--at-apply: 'mr-2 inline-block aspect-square w-4 align-text-bottom';
|
||||
}
|
||||
|
||||
/* Note */
|
||||
|
|
|
@ -21,7 +21,7 @@ body::selection {
|
|||
|
||||
/* Fix KaTeX Overflow with Hidden Scrollbar */
|
||||
.katex-display {
|
||||
--at-apply: 'overflow-x-auto overflow-y-hidden scrollbar-hidden';
|
||||
--at-apply: 'my-6 overflow-x-auto overflow-y-hidden scrollbar-hidden';
|
||||
}
|
||||
.katex-display::-webkit-scrollbar {
|
||||
display: none;
|
||||
|
@ -54,7 +54,8 @@ h4:hover .heading-anchor-link svg:hover {
|
|||
}
|
||||
.highlight-static::after,
|
||||
.highlight-hover::after {
|
||||
--at-apply: 'content-[""] absolute left-0 z--1 h-0.5em w-full bg-highlight';
|
||||
content: '';
|
||||
--at-apply: 'absolute left-0 z--1 h-0.5em w-full bg-highlight';
|
||||
}
|
||||
.highlight-static::after,
|
||||
.highlight-hover:hover::after {
|
||||
|
|
|
@ -17,25 +17,25 @@
|
|||
|
||||
/* Headings */
|
||||
.heti :where(h1, h2, h3, h4, h5, h6) {
|
||||
--at-apply: 'mb-4 font-semibold';
|
||||
--at-apply: 'mb-4 mt-1.5em font-semibold';
|
||||
}
|
||||
.heti :where(h1) {
|
||||
--at-apply: 'mt-9.6 text-7 text-primary';
|
||||
--at-apply: 'text-7 text-primary';
|
||||
}
|
||||
.heti :where(h2) {
|
||||
--at-apply: 'mt-9.6 text-6 text-primary';
|
||||
--at-apply: 'text-6 text-primary';
|
||||
}
|
||||
.heti :where(h3) {
|
||||
--at-apply: 'mt-7.5 text-5';
|
||||
--at-apply: 'text-5';
|
||||
}
|
||||
.heti :where(h4) {
|
||||
--at-apply: 'mt-6.75 text-4.5';
|
||||
--at-apply: 'text-4.5';
|
||||
}
|
||||
.heti :where(h5) {
|
||||
--at-apply: 'mt-6 text-4';
|
||||
--at-apply: 'text-4';
|
||||
}
|
||||
.heti :where(h6) {
|
||||
--at-apply: 'mt-6 font-normal';
|
||||
--at-apply: 'font-normal';
|
||||
}
|
||||
.heti :where(h1, h2, h3) {
|
||||
--at-apply: 'text-balance leading-1.33em cjk:text-pretty cjk:tracking-0.05em';
|
||||
|
@ -66,7 +66,7 @@
|
|||
--at-apply: 'mx-auto my-6';
|
||||
}
|
||||
.heti :where(figcaption) {
|
||||
--at-apply: 'mt-3 text-center text-sm text-secondary/80';
|
||||
--at-apply: 'mt-2.5 text-center text-sm text-secondary/80';
|
||||
}
|
||||
.heti :is(h1, h2, h3, h4, h5, h6, img, figure) + :is(img, figure) {
|
||||
--at-apply: 'mt-4';
|
||||
|
@ -246,7 +246,10 @@ html.dark .heti :where(u) {
|
|||
|
||||
/* Horizontal Rules */
|
||||
.heti :where(hr) {
|
||||
--at-apply: 'my-9.6 border-t-2 border-secondary/5';
|
||||
--at-apply: 'mb-8 mt-12 h-auto border-none text-center text-6 c-secondary/25 tracking-0.8em lg:(mb-10 mt-14)';
|
||||
}
|
||||
.heti :where(hr)::before {
|
||||
content: "***";
|
||||
}
|
||||
|
||||
/* Bold */
|
||||
|
|
|
@ -158,8 +158,15 @@ export async function generateFeed({ lang }: GenerateFeedOptions = {}) {
|
|||
// Optimize content processing
|
||||
const postContent = post.body
|
||||
? sanitizeHtml(
|
||||
await fixRelativeImagePaths(markdownParser.render(post.body), url),
|
||||
{ allowedTags: sanitizeHtml.defaults.allowedTags.concat(['img']) },
|
||||
await fixRelativeImagePaths(
|
||||
// Remove HTML comments before rendering markdown
|
||||
markdownParser.render(post.body.replace(/<!--[\s\S]*?-->/g, '')),
|
||||
url,
|
||||
),
|
||||
{
|
||||
// Allow <img> tags in feed content
|
||||
allowedTags: sanitizeHtml.defaults.allowedTags.concat(['img']),
|
||||
},
|
||||
)
|
||||
: ''
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue