scinote-web/app/assets/stylesheets/shared/cards.scss

181 lines
3.4 KiB
SCSS
Raw Normal View History

// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
// scss-lint:disable SelectorFormat
.cards-wrapper {
--card-min-width: 200px;
--list-columns-number: 5;
align-items: center;
display: grid;
grid-auto-rows: 2em;
grid-column-gap: 1em;
grid-row-gap: 1em;
grid-template-columns: repeat(auto-fill, minmax(var(--card-min-width), 1fr));
width: 100%;
.table-header {
display: none;
}
2023-05-18 19:15:35 +08:00
&.no-data {
display: block;
}
&.no-results {
grid-template-rows: 1fr;
min-height: calc(100vh - var(--content-header-size) - var(--navbar-height));
.no-results-container {
align-self: center;
grid-column: 1 / -1;
grid-row: 1 / -1;
justify-self: center;
}
.no-results-img {
display: block;
margin: auto;
max-height: 230px;
}
.no-results-title {
@include font-h1;
margin-bottom: .25em;
margin-top: 1.25em;
text-align: center;
}
.no-results-description {
@include font-main;
color: $color-silver-chalice;
text-align: center;
}
}
.card {
background-color: $color-white;
color: $color-volcano;
display: flex;
flex-wrap: wrap;
grid-row: span 4;
height: 100%;
padding: .5em 1em;
position: relative;
width: 100%;
.checkbox-cell {
align-items: center;
display: flex;
height: 2em;
justify-content: left;
width: 1.5em;
}
}
&:not(.list) {
[list-render="true"] {
display: none !important;
}
}
&.list {
grid-auto-flow: dense;
2023-06-15 21:12:51 +08:00
grid-auto-rows: 4em 1px;
grid-column-gap: 0;
grid-row-gap: 0;
grid-template-columns: repeat(var(--list-columns-number), minmax(100px, auto));
[cards-render="true"] {
display: none !important;
}
&.no-results {
grid-template-rows: 2em 1fr;
min-height: calc(100vh - var(--content-header-size) - var(--navbar-height));
}
.no-results-container {
align-self: center;
grid-column: 1 / -1;
grid-row: 2 / -1;
justify-self: center;
}
.card {
display: contents;
// Border element
&::after {
background: $color-concrete;
content: "";
display: inline-block;
grid-column: 1/-1;
height: 1px;
}
.table-cell {
height: 100%;
padding: 0 .5em;
width: 100%;
}
.checkbox-cell {
grid-column: 1;
justify-content: center;
position: initial;
}
}
.table-header {
display: contents;
&::after {
content: "";
grid-column: 1/-1;
}
.table-header-cell {
align-items: center;
border: 1px solid $color-white;
display: flex;
height: 3em;
padding: 0 .5em;
position: sticky;
position: -webkit-sticky;
top: var(--content-header-size);
z-index: 2;
&.select-all-checkboxes {
justify-content: center;
}
}
& > * {
background-color: $color-concrete;
}
}
}
}
.content-pane.archived {
.cards-wrapper {
.card {
background: $color-concrete;
2021-02-08 02:04:30 +08:00
box-shadow: none !important;
}
&.list {
.card {
&::after {
background: $color-white;
}
.table-cell {
background: $color-concrete;
color: $color-volcano;
}
}
}
}
}