diff --git a/assets/css/custom.css b/assets/css/custom.css index 259b441..e5991a5 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -255,53 +255,42 @@ html.dark #post-list .post-card:hover { color: #9ca3af; } -/* 宽屏:由 notes.js 接管,放进正文两侧的留白 */ +/* 宽屏:由 notes.js 接管,放进页面两侧的空白处(不占用正文布局) */ @media (min-width: 80rem) { - /* 去掉 TOC / 侧栏占位后,把正文栏收回原来的阅读宽度,两侧留给注释 */ - main.notes-page { - max-width: 52rem; - margin-left: auto; - margin-right: auto; - } - html.js .post-note { display: none; } - html.js main.notes-page.notes-active { + html.js main#content.notes-active { position: relative; } - html.js main.notes-page.notes-active .post-note.placed { + html.js main#content.notes-active .post-note.placed { display: block; position: absolute; - width: 12rem; margin: 0; padding: 0 0.75rem; border: 0 solid #e5e7eb; border-radius: 0; background: none; - font-size: 0.8125rem; - line-height: 1.65; + font-size: 0.875rem; + line-height: 1.7; color: #6b7280; } - html.dark.js main.notes-page.notes-active .post-note.placed { + html.dark.js main#content.notes-active .post-note.placed { color: #9ca3af; border-color: #333; } /* 注释靠在正文哪一侧,就在朝向正文的那边加一条细线 */ - html.js main.notes-page.notes-active .post-note.placed[data-side="right"] { - left: calc(100% + 1rem); - right: auto; + html.js main#content.notes-active .post-note.placed[data-side="right"] { border-left-width: 2px; } - html.js main.notes-page.notes-active .post-note.placed[data-side="left"] { - right: calc(100% + 1rem); - left: auto; + html.js main#content.notes-active .post-note.placed[data-side="left"] { border-right-width: 2px; + text-align: left; } } diff --git a/content/blog/prolog-pokemon.md b/content/blog/prolog-pokemon.md index 9a797ac..915c2c8 100644 --- a/content/blog/prolog-pokemon.md +++ b/content/blog/prolog-pokemon.md @@ -74,7 +74,7 @@ pokemon(wartortle). pokemon(blastoise). ``` -在 Prolog 中,我们声明"谓词"(Predicate)。谓词定义关系:`bulbasaur` 是一个 `pokemon`,`charmander` 是一个 `pokemon`,以此类推。我们称这个谓词为 `pokemon/1`,因为它有一个参数。{{< note >}}斜杠后面的数字是**元数**(arity),表示参数个数。`pokemon/1` 和 `pokemon/2` 在 Prolog 里是两个完全不同的谓词,可以同时存在。{{< /note >}} +在 Prolog 中,我们声明"谓词"(Predicate)。谓词定义关系:`bulbasaur` 是一个 `pokemon`,`charmander` 是一个 `pokemon`,以此类推。我们称这个谓词为 `pokemon/1`,因为它有一个参数。{{< note >}}斜杠后面的数字是**元数**([arity](https://en.wikipedia.org/wiki/Arity)),表示参数个数。`pokemon/1` 和 `pokemon/2` 在 Prolog 里是两个完全不同的谓词,可以同时存在。{{< /note >}} 这些事实被加载到一个交互式提示符——"顶层"(top-level)中。你输入一个语句到提示符,Prolog 试图找出所有使该语句为真的方式: diff --git a/layouts/blog/single.html b/layouts/blog/single.html index 9eeebe2..3314061 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -1,16 +1,13 @@ {{ define "main" }} -{{- /* 有边注的页面:宽屏两侧需要留白,因此去掉 TOC 与侧栏占位 */ -}} -{{- $hasNotes := .HasShortcode "note" }} -