gallery/style/shiny/gallery.css

312 lines
5.4 KiB
CSS
Raw Permalink 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;
2021-04-16 12:02:32 -04:00
--gap: 1em;
2020-07-20 16:40:34 -04:00
}
@media (min-width: 1000px) {
.page { max-width: 80%; }
2020-07-23 13:59:07 -04:00
}
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;
2022-12-29 21:19:33 -05: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;
/* justify-content: space-between; */
padding: 0;
2022-12-29 21:19:33 -05:00
font-weight: 500;
2020-08-03 17:10:52 -04:00
font-size: 90%;
2022-12-29 21:19:33 -05:00
grid-gap: 0.5em 1em;
2020-08-03 17:10:52 -04:00
}
2022-12-29 21:19:33 -05:00
.filterlist input {
appearance: none;
2020-08-03 17:10:52 -04:00
}
2022-12-29 21:19:33 -05:00
.filterlist li:not([hidden]) {
display: block;
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 {
padding: 0.15em 0.4em;
border-radius: var(--button-radius);
background: var(--button-bg);
border: var(--button-border);
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 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;
2022-12-29 21:19:33 -05: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;
}
@media (max-width: 80rem) {
#filters div {
grid-template-columns: auto;
}
#filters h3 {
text-align: left;
grid-area: unset;
}
#filterstuff {
grid-area: unset;
flex-flow: column;
grid-gap: 0.2em;
}
#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;
grid-template-columns: repeat(auto-fill, var(--image-size));
2020-07-23 13:59:07 -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) {
box-shadow: var(--text-shadow);
2022-12-29 21:19:33 -05:00
border: var(--border-thickness) solid var(--border-col);
2020-07-20 16:40:34 -04:00
border-radius: 0.5em;
2020-07-24 08:23:12 -04:00
background: hsl(340, 45%, 65%);
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
figure {
margin: 0;
padding: 0;
}
2020-09-19 01:51:52 -04:00
figcaption .date, figcaption .title {
2020-07-20 16:40:34 -04:00
position: absolute;
2020-08-01 09:57:17 -04:00
width: 100%;
2022-12-29 21:19:33 -05:00
border: 1px solid var(--border-col);
2020-07-20 16:40:34 -04:00
display: block;
text-align: center;
background: hsl(0, 0%, 0%, 75%);
2020-09-19 01:51:52 -04:00
text-shadow: none;
2020-07-20 16:40:34 -04:00
}
2020-09-19 01:51:52 -04:00
figcaption .date { top: -1px; left: -1px; }
figcaption .title { bottom: -1px; left: -1px; }
2020-07-20 16:40:34 -04:00
2020-09-25 17:08:44 -04:00
.date { text-transform: lowercase; }
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)));
grid-gap: var(--gap);
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 {
2020-07-20 16:40:34 -04:00
height: var(--size);
width: var(--size);
2020-09-19 16:01:15 -04:00
transform: var(--base-transform);
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;
2020-09-19 01:51:52 -04:00
}
.item.nsfw::before {
--size: calc(1/4 * var(--image-size));
--base-transform: rotate(var(--nsfw-sticker-rotate));
content: url(../18_plus_white.svg);
2020-09-03 16:32:54 -04:00
top: calc(1em + 3px);
2020-07-20 16:40:34 -04:00
right: 3px;
2020-09-19 01:51:52 -04:00
}
.item[data-updated="true"]::after {
--size: calc(1/4 * var(--image-size));
2020-09-19 16:01:15 -04:00
--base-transform: rotate(-8deg);
2020-09-19 01:51:52 -04:00
content: url(../sparkles.svg);
bottom: calc(1em + 3px);
right: 3px;
2020-07-20 16:40:34 -04:00
}
footer {
font-size: 90%;
text-align: center;
margin-top: 1em;
}
2020-10-06 16:41:26 -04:00
@media (hover) and (pointer: fine) {
2020-09-19 01:51:52 -04:00
.item:hover .date, .item:hover .title,
.item:hover::before, .item:hover::after {
2020-08-30 12:45:13 -04:00
filter: opacity(20%);
2020-07-20 16:40:34 -04:00
}
@media (prefers-reduced-motion: no-preference) {
2020-09-19 01:51:52 -04:00
figcaption .date, figcaption .title, .item::before, .item::after {
2020-08-30 12:45:13 -04:00
transition-property: filter, transform;
2020-09-19 01:51:52 -04:00
transition-duration: 0.15s;
2020-07-20 16:40:34 -04:00
transition-timing-function: ease-in-out;
}
2020-09-19 01:51:52 -04:00
.item:hover .title {
2020-07-20 16:40:34 -04:00
transform: translate(-20%, 80%) rotateZ(7deg);
}
2020-09-03 16:32:54 -04:00
2020-09-19 01:51:52 -04:00
.item:hover .date {
2020-09-03 16:32:54 -04:00
transform: translate(20%, -80%) rotateZ(7deg);
}
2020-09-19 01:51:52 -04:00
.item:hover::before {
transform: translate(1.5em, -1.5em) var(--base-transform);
}
.item:hover::after {
2020-09-19 16:01:15 -04:00
transform: translate(1.5em, 1.5em) var(--base-transform);
2020-09-19 01:51:52 -04:00
}
2020-07-20 16:40:34 -04:00
}
}
2020-10-06 16:41:26 -04:00
@media (not hover), (pointer: coarse) {
.item:not(.year-marker) {
height: min-content;
}
2020-09-19 01:51:52 -04:00
figcaption .date, figcaption .title {
position: initial;
}
2020-10-06 16:41:26 -04:00
figcaption .date {
border-bottom: none;
}
figcaption .title {
border-top: none;
}
2020-09-19 01:51:52 -04:00
figcaption .date::after {
content: ':';
}
.item a {
display: block;
height: var(--image-size);
}
.item img {
margin-bottom: 0;
}
}
@media (pointer: coarse) {
#filters label {
font-size: 150%;
}
}