diff options
| author | Reorx <novoreorx@gmail.com> | 2022-04-12 21:50:44 +0800 |
|---|---|---|
| committer | Reorx <novoreorx@gmail.com> | 2022-04-12 21:50:44 +0800 |
| commit | ff2dc3c45d11c5aad74931df686f9eb3cb72cedc (patch) | |
| tree | 05b44c13692eb2d86abbdd7485dda14bfc14d6f2 /assets/css/common | |
| parent | c5d31c778b572c3952c35e918765901cb223c045 (diff) | |
| parent | 9678b1cb6fe7c999c673ba8261c00e7cce7a7533 (diff) | |
Merge branch 'side-toc'
* side-toc:
adjust head tags order
always render SEO templates
update readme
replace instantpage with instantclick
menu consistant font weight
fork: update footer
add some simple icons with `-simple` suffix
add EnableInstantPage param
tweak toc style
use setTimeout to reduce scroll callback frequency
add param DisableSmoothScroll
enhance toc scroll algorithm
active toc link while scrolling
add side class for toc if TocSide is true
allow customize post page width
Diffstat (limited to 'assets/css/common')
| -rw-r--r-- | assets/css/common/footer.css | 5 | ||||
| -rw-r--r-- | assets/css/common/header.css | 4 | ||||
| -rw-r--r-- | assets/css/common/main.css | 5 | ||||
| -rw-r--r-- | assets/css/common/post-single.css | 25 |
4 files changed, 31 insertions, 8 deletions
diff --git a/assets/css/common/footer.css b/assets/css/common/footer.css index 5addb1e..b0dc264 100644 --- a/assets/css/common/footer.css +++ b/assets/css/common/footer.css @@ -58,3 +58,8 @@ #theme-toggle:focus { outline: 0; } + +/* InstantClick css */ +#instantclick-bar { + background: var(--tertiary); +} diff --git a/assets/css/common/header.css b/assets/css/common/header.css index 3cd070e..4c8de8f 100644 --- a/assets/css/common/header.css +++ b/assets/css/common/header.css @@ -67,10 +67,12 @@ body:not(.dark) #sun { #menu a { font-size: 16px; + font-weight: 500; + color: var(--secondary); } #menu .active { - font-weight: 500; + color: var(--primary); border-bottom: 2px solid currentColor; } diff --git a/assets/css/common/main.css b/assets/css/common/main.css index 50022ac..22dc39c 100644 --- a/assets/css/common/main.css +++ b/assets/css/common/main.css @@ -1,3 +1,4 @@ +/* for home and other pages */ .main { position: relative; min-height: calc(100vh - var(--header-height) - var(--footer-height)); @@ -5,6 +6,10 @@ margin: auto; padding: var(--gap); } +/* for post page */ +.main.post { + max-width: calc(var(--post-width) + var(--gap) * 2); +} .page-header h1 { font-size: 40px; diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css index b9b9709..8730e88 100644 --- a/assets/css/common/post-single.css +++ b/assets/css/common/post-single.css @@ -69,8 +69,7 @@ font-size: 12px; } -.post-content a, -.toc a:hover { +.post-content a { box-shadow: 0 1px 0; } @@ -263,20 +262,26 @@ border-radius: var(--radius); padding: 0.4em; } +@media screen and (min-width: 1000px) { + .toc.side { + position: fixed; + right: 30px; + top: 100px; + width: 300px; + font-size: .9em; + z-index: 1; + } +} .dark .toc { background: var(--entry); } .toc details summary { - cursor: zoom-in; + cursor: pointer; margin-inline-start: 20px; } -.toc details[open] summary { - cursor: zoom-out; -} - .toc .details { display: inline; font-weight: 500; @@ -290,6 +295,12 @@ .toc li ul { margin-inline-start: var(--gap); } +.toc li a.active { + box-shadow: 0 2px 0 var(--secondary); +} +.toc a:hover { + text-decoration: underline; +} .toc summary:focus { outline: 0; |
