diff options
| author | Eltrac <hi@guhub.cn> | 2025-03-27 14:14:15 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-03-27 14:14:15 +0800 |
| commit | 8a355d8a7066b95eeb5356c79957a2df8f160c57 (patch) | |
| tree | 79a645b8136efb11fa174f17b5dc2f75b693cb4e /assets | |
| parent | f4b81beea390c89029b2f5c2a32511100589cec8 (diff) | |
feat: distinguish book books and bad books with styles
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/css/components/_library.scss | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/assets/css/components/_library.scss b/assets/css/components/_library.scss index 3b913214..a7b35dae 100644 --- a/assets/css/components/_library.scss +++ b/assets/css/components/_library.scss @@ -1,12 +1,39 @@ #library { #library-content { + --gap: 1rem; display: flex; align-items: center; - gap: 1rem; + gap: var(--gap); margin: 1rem 0; + flex-wrap: wrap; .book { - width: 25%; + width: calc(100% / 6 - var(--gap)); + position: relative; + &.badbook { + opacity: 0.5; + z-index: 0; + &::before { + position: absolute; + z-index: 1; + content: ""; + top: 25%; + left: 25%; + height: 50%; + width: 50%; + + background-image: url('/img/thumbs-down.png'); + background-size: 100%; + background-position: center; + background-repeat: no-repeat; + } + } + &.goodbook { + .book-cover { + border-color: gold; + box-shadow: 0 0.1rem 0.75rem goldenrod; + } + } } } } |
