diff --git a/src/components/ref-img.webc b/src/components/ref-img.webc
index e9c97d5..a994b3c 100644
--- a/src/components/ref-img.webc
+++ b/src/components/ref-img.webc
@@ -7,6 +7,15 @@
:width="width"
sizes="1000px"
>
+
©
@@ -18,19 +27,35 @@
:host {
display: grid;
grid-template-rows: [image-start] 1fr [image-end caption-start] auto [caption-end];
+ grid-template-columns: [image-start] 1fr [image-end];
place-content: center;
row-gap: 1rem;
margin-block: 0;
margin-inline: auto;
+ .nsfw &:has(.image.nsfw) {
+ & .image {
+ display: none;
+ }
+
+ & .image.nsfw {
+ display: block;
+ }
+ }
+
+ .nsfw &:not(:has(.image.nsfw)) {
+ & .image {
+ display: block;
+ }
+ }
}
- :host :first-child {
+ :host :where(picture, img) {
grid-area: image;
}
- :host img {
+ :host .image {
display: block;
width: 100%;
height: 100%;
@@ -39,12 +64,16 @@
border-radius: 1em;
}
+ :host .image.nsfw {
+ display: none;
+ }
+
:host .dropshadow {
filter: drop-shadow(0.5em 0.25em 0.375em oklch(0 0 0 / 0.5));
}
:host .caption {
- grid-area: caption;
+ grid-area: caption / image;
text-align: center;
}