Skip to content

Commit 1063d9b

Browse files
package.jsonとpackage-lock.jsonにremark-gfmを追加し、記事ページのスタイルを改善。記事ボタン生成関数を追加し、CSSファイルを整理。不要なCSSファイルを削除。
1 parent 146d782 commit 1063d9b

File tree

7 files changed

+375
-65
lines changed

7 files changed

+375
-65
lines changed

package-lock.json

Lines changed: 279 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"rehype-pretty-code": "^0.14.1",
2626
"rehype-stringify": "^10.0.1",
2727
"remark": "^15.0.1",
28+
"remark-gfm": "^4.0.1",
2829
"remark-parse": "^11.0.0",
2930
"remark-rehype": "^11.1.2",
3031
"shiki": "^3.3.0",

src/app/[article_year]/[month]/[aid]/page.css

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ html {
4545

4646
.toc a {
4747
text-decoration: none;
48-
color: var(--link-color);
48+
color: var(--foreground);
4949
cursor: pointer;
5050
}
5151

@@ -246,6 +246,7 @@ html {
246246
.other-articles {
247247
margin-top: 40px;
248248
top: 20px;
249+
max-width: 250px;
249250
/* スクロール時に追従 */
250251
}
251252

@@ -299,6 +300,7 @@ html {
299300
.other-articles {
300301
position: relative;
301302
/* stickyを無効化 */
303+
max-width: none;
302304
top: auto;
303305
margin-top: 20px;
304306
/* 記事の下部に配置 */
@@ -318,4 +320,29 @@ html {
318320
font-size: 0.9rem;
319321
/* 必要に応じてフォントサイズを調整 */
320322
}
323+
}
324+
325+
/* 目次の見出しの右余白を調整 */
326+
.toc ul li a.index-h1 {
327+
margin-right: 0px;
328+
}
329+
330+
.toc ul li a.index-h2 {
331+
margin-right: 10px;
332+
}
333+
334+
.toc ul li a.index-h3 {
335+
margin-right: 20px;
336+
}
337+
338+
.toc ul li a.index-h4 {
339+
margin-right: 30px;
340+
}
341+
342+
.toc ul li a.index-h5 {
343+
margin-right: 40px;
344+
}
345+
346+
.toc ul li a.index-h6 {
347+
margin-right: 50px;
321348
}

0 commit comments

Comments
 (0)