Added dark and SFW modes.

This commit is contained in:
2020-03-23 01:43:49 +01:00
parent fdb2b132f6
commit 58ead7b426
288 changed files with 1316 additions and 156 deletions

View File

@@ -4,14 +4,14 @@
<li>
<a
v-if="tag.poster"
:href="`/img/${tag.poster.path}`"
:title="tag.poster.comment"
:href="`/img/${poster.path}`"
:title="poster.comment"
target="_blank"
rel="noopener noreferrer"
class="photo-link"
>
<img
:src="`/img/${tag.poster.thumbnail}`"
:src="`/img/${poster.thumbnail}`"
:alt="tag.poster.comment"
class="poster"
>
@@ -19,7 +19,7 @@
</li>
<li
v-for="photo in tag.photos"
v-for="photo in photos"
:key="`photo-${photo.id}`"
>
<a
@@ -41,6 +41,22 @@
</template>
<script>
function poster() {
if (this.$store.state.ui.sfw) {
return this.tag.poster.sfw;
}
return this.tag.poster;
}
function photos() {
if (this.$store.state.ui.sfw) {
return this.tag.photos.map(photo => photo.sfw);
}
return this.tag.photos;
}
export default {
props: {
tag: {
@@ -48,6 +64,10 @@ export default {
default: null,
},
},
computed: {
poster,
photos,
},
};
</script>