Skip to content

Commit

Permalink
Port PenguinMod's library UI.
Browse files Browse the repository at this point in the history
  • Loading branch information
someCatInTheWorld committed Aug 24, 2024
1 parent 530bd31 commit 1f68025
Show file tree
Hide file tree
Showing 7 changed files with 589 additions and 108 deletions.
94 changes: 90 additions & 4 deletions src/components/library/library.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,62 @@
@import "../../css/units.css";
@import "../../css/colors.css";

.library-content-wrapper {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 100%;
height: calc(100% - ($library-header-height));
}
.library-filter-bar {
width: 342px;
height: calc(100%);
padding: 6px;
margin-left: 4px;
border-radius: 8px;
background: white;
overflow: auto;
border: 2px solid $ui-black-transparent;
}
[theme="dark"] .library-filter-bar {
background: $ui-primary;
}

.library-header {
display: flex;
flex-direction: row;
align-items: center;
margin-left: 6px;
}
.library-item-count {
opacity: 0.5;
margin-block: 0;
margin-left: 4px;
}
[theme="dark"] .library-header {
color: white;
}
[dir="rtl"] .library-header {
margin-left: initial;
margin-right: 6px;
}
[dir="rtl"] .library-item-count {
margin-left: initial;
margin-right: 4px;
}

.library-tag-count {
margin-right: 2.5%;
text-align: right;
}
[dir="rtl"] .library-tag-count {
margin-right: initial;
margin-left: 2.5%;
text-align: left;
}

.library-scroll-grid {
width: calc(100% - 346px);
display: flex;
justify-content: flex-start;
align-content: flex-start;
Expand All @@ -12,7 +67,7 @@
overflow-y: auto;
height: auto;
padding: 0.5rem;
height: calc(100% - $library-header-height);
height: calc(100%);
}

.library-scroll-grid.withFilterBar {
Expand All @@ -31,7 +86,7 @@
}

.filter-bar-item {
margin-right: .75rem;
border: 1px solid $ui-black-transparent;
}

.filter {
Expand All @@ -48,9 +103,40 @@
width: 18.75rem;
}

.tag-checkbox-wrapper {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
[theme="dark"] .tag-checkbox-wrapper {
color: white;
}

[theme="dark"] .white-text-in-dark-mode {
color: white;
}

.library-filter-collapse {
width: 35px;
height: 40px;
transform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A8L2c+Cjwvc3ZnPgo=');
background-repeat: no-repeat;
background-position: center;
background-size: contain;
}
[theme="dark"] .library-filter-collapse {
filter: brightness(50);
}

.divider {
transform: scaleY(1.39);
height: $library-filter-bar-height;
width: 100%;
border: 0;
border-bottom: 1px dashed $ui-black-transparent;
margin: 6px 0;
}

.tag-wrapper {
Expand Down
Loading

0 comments on commit 1f68025

Please sign in to comment.