gallery/style/shiny/gallery.css

252 lines
4.1 KiB
CSS
Raw Normal View History

2020-07-20 16:40:34 -04:00
@import url(base.css);
2020-10-06 16:07:39 -04:00
@import url(nsfw-warning.css);
2020-07-20 16:40:34 -04:00
:root {
--image-size: 200px;
2023-06-21 13:58:01 -04:00
--badge-size: calc(1/4 * var(--image-size));
--gap: 0em;
2020-07-20 16:40:34 -04:00
}
@media (min-width: 1000px) {
.page { max-width: 80%; }
2020-07-23 13:59:07 -04:00
}
2023-06-21 13:58:01 -04:00
.page {
padding: 2em calc(1/4 * var(--image-size));
}
2022-12-29 21:19:33 -05:00
#filters {
margin: 1em 0 2em 0;
}
2020-08-03 17:10:52 -04:00
#filters div {
display: grid;
grid-template-columns: 15% auto;
align-items: baseline;
2024-07-07 16:00:44 -04:00
grid-gap: 0.75em;
2020-08-03 17:10:52 -04:00
}
2022-11-12 06:13:44 -05:00
#filters h3 {
2020-08-03 17:10:52 -04:00
margin: 0;
}
2022-11-12 06:13:44 -05:00
#filters h3 {
2020-08-03 17:10:52 -04:00
text-align: right;
grid-area: auto / 1;
2020-08-03 17:10:52 -04:00
}
2022-12-29 21:19:33 -05:00
.filterlist {
display: flex;
flex-flow: row wrap;
padding: 0;
2022-12-29 21:19:33 -05:00
font-weight: 500;
2020-08-03 17:10:52 -04:00
font-size: 90%;
2024-07-07 16:00:44 -04:00
grid-column-gap: 0.5em;
2020-08-03 17:10:52 -04:00
}
2022-12-29 21:19:33 -05:00
.filterlist input {
/* i can't believe it's not appearance: none */
clip: rect(0 0 0 0);
clip-path: inset(100%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
2020-08-03 17:10:52 -04:00
}
2024-07-07 16:12:44 -04:00
.filterlist li {
list-style: none;
2020-08-03 17:10:52 -04:00
}
2022-12-29 21:19:33 -05:00
.filterlist li:focus-within {
2020-08-03 17:10:52 -04:00
color: var(--focus-text);
}
2022-12-29 21:19:33 -05:00
.filterlist label {
2023-06-21 13:58:01 -04:00
cursor: pointer;
padding: 0.15em 0.4em;
border-radius: 1000px;
border: 1px solid transparent;
2020-08-03 17:10:52 -04:00
}
2022-12-29 21:19:33 -05:00
.filterlist label::before {
content: url('/style/unchecked.svg');
display: inline-block;
height: 1em;
width: 1em;
vertical-align: -15%;
padding-right: 0.25em;
text-shadow: none;
}
.filterlist :checked + label::before { content: url('/style/checked.svg'); }
.filterlist :checked + label {
background: var(--button-bg);
border: var(--button-border);
}
2022-12-29 21:19:33 -05:00
.filterlist label:not([data-count="1"])::after {
content: attr(data-count);
2020-09-17 13:12:48 -04:00
font-size: 80%;
2022-12-29 21:19:33 -05:00
font-weight: 400;
padding: 0 0.5em;
}
.filterlist [data-count="1"] {
font-size: 85%;
padding-right: 0.8em;
}
.filterlist input {
margin: 0;
2020-09-17 13:12:48 -04:00
}
2020-08-03 17:10:52 -04:00
2022-11-12 06:13:44 -05:00
#filterstuff {
2022-12-29 21:19:33 -05:00
padding: 0;
2022-11-12 06:13:44 -05:00
grid-area: auto / span 2;
display: flex;
justify-content: center;
margin-top: 0;
2024-07-07 16:00:44 -04:00
grid-gap: 2em;
2022-11-12 06:13:44 -05:00
}
#filterstuff li {
list-style: none;
2022-12-29 21:19:33 -05:00
display: inline-block;
padding: var(--button-pad);
border-radius: var(--button-radius);
background: var(--button-bg);
border: var(--button-border);
}
#filterstuff a {
font-weight: 500;
text-decoration: none;
}
2023-08-06 00:50:07 -04:00
#filters-details:not([open])::after {
content: attr(data-filters);
margin-left: 2em;
font-size: 90%;
}
2022-12-29 21:19:33 -05:00
@media (max-width: 50rem) {
2022-12-29 21:19:33 -05:00
#filters div {
grid-template-columns: auto;
}
#filters h3 {
text-align: left;
grid-area: unset;
}
#filterstuff {
grid-area: unset;
flex-flow: column;
2024-07-07 16:00:44 -04:00
grid-column-gap: 0.2em;
2022-12-29 21:19:33 -05:00
}
#filterstuff li {
border-radius: 1em;
}
2022-11-12 06:13:44 -05:00
}
2020-07-20 16:40:34 -04:00
.grid {
padding: 0;
display: grid;
2023-08-06 00:12:10 -04:00
grid: auto-flow / repeat(auto-fit, var(--image-size));
2024-07-07 16:00:44 -04:00
grid-gap: var(--gap);
2020-07-20 16:40:34 -04:00
justify-content: center;
}
.item {
--border-thickness: 2px;
list-style: none;
width: var(--image-size);
height: var(--image-size);
overflow: hidden;
position: relative;
}
.item:not(.year-marker) {
2023-06-21 13:58:01 -04:00
background: hsl(0, 0%, 0%, 50%);
clip-path: polygon(5% 0, 95% 10%, 95% 100%, 5% 90%);
}
.item img {
clip-path: polygon(7% 2%, 93% 12%, 93% 98%, 7% 88%);
2020-07-20 16:40:34 -04:00
}
2020-08-03 17:06:19 -04:00
.item:focus-within {
box-shadow: var(--focus-box);
}
2020-07-20 16:40:34 -04:00
.year-marker {
2021-05-28 22:49:11 -04:00
/* uncomment to reenable line breaks before year markers */
/* grid-area: auto / 1; */
2020-07-20 16:40:34 -04:00
padding: var(--border-thickness);
}
.year-text {
--gap: 0.2em;
display: grid;
grid-template-columns: repeat(2, calc(50% - 3 * var(--gap)));
2024-07-07 16:00:44 -04:00
grid-gap: var(--gap);
2020-07-20 16:40:34 -04:00
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
}
.year-marker .y {
display: block;
text-align: center;
font-size: calc(var(--image-size) * 0.6);
line-height: 0;
2020-08-28 19:54:30 -04:00
font-weight: 800;
2020-07-20 16:40:34 -04:00
transform: scaleX(110%);
}
2020-09-19 01:51:52 -04:00
.item.nsfw::before, .item[data-updated="true"]::after {
2023-06-21 13:58:01 -04:00
height: var(--badge-size);
width: var(--badge-size);
2020-07-20 16:40:34 -04:00
display: inline-block;
position: absolute;
2020-09-19 01:51:52 -04:00
2022-05-02 10:31:40 -04:00
mix-blend-mode: hard-light;
2024-07-07 16:06:44 -04:00
pointer-events: none;
2020-09-19 01:51:52 -04:00
}
.item.nsfw::before {
2023-06-21 13:58:01 -04:00
transform: rotate(15deg);
2020-09-19 01:51:52 -04:00
content: url(../18_plus_white.svg);
2023-06-21 13:58:01 -04:00
top: 11%;
right: 7%;
z-index: 100;
2020-09-19 01:51:52 -04:00
}
.item[data-updated="true"]::after {
2023-06-21 13:58:01 -04:00
transform: rotate(-8deg);
2020-09-19 01:51:52 -04:00
content: url(../sparkles.svg);
2023-06-21 13:58:01 -04:00
bottom: 4%;
right: 7%;
2020-07-20 16:40:34 -04:00
}
footer {
font-size: 90%;
text-align: center;
margin-top: 1em;
}
@media (pointer: coarse) {
#filters label {
font-size: 150%;
}
}