From 3a351af2a82c8aaafb5a6243ea022205aab42688 Mon Sep 17 00:00:00 2001 From: Devin Haska <2636402+wonderfulfrog@users.noreply.github.com> Date: Sat, 1 Feb 2025 22:50:46 -0800 Subject: [PATCH] feat: add spoiler warning --- src/_includes/layouts/book.html | 7 +++++++ src/_includes/layouts/game.html | 9 ++++++++- src/_includes/layouts/movie.html | 9 ++++++++- src/_includes/layouts/show.html | 7 +++++++ src/_includes/svgs/triangle-exclamation.svg | 3 +++ 5 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 src/_includes/svgs/triangle-exclamation.svg diff --git a/src/_includes/layouts/book.html b/src/_includes/layouts/book.html index eb7d5bd..f48f9d9 100644 --- a/src/_includes/layouts/book.html +++ b/src/_includes/layouts/book.html @@ -10,6 +10,13 @@ layout: "layouts/base"
{{ pullquote }}
{% endif %} +{% if hasSpoilers %} +{{ pullquote }}
+ {% if pullquote %}{{ pullquote }}
{% endif %}{{ pullquote }}
+{% if hasSpoilers %} +{% include "svgs/circle-info.svg" %} I've seen this movie {{ watchHistory.length }} {{ "time" | pluralize(watchHistory) }}!
{% endif %} -{% if favourite %} +{% if favourite or isFavourite %}{% include "svgs/star.svg" %} This is one of my favourite movies! diff --git a/src/_includes/layouts/show.html b/src/_includes/layouts/show.html index 6d1ac1d..e4410c9 100644 --- a/src/_includes/layouts/show.html +++ b/src/_includes/layouts/show.html @@ -10,6 +10,13 @@ layout: "layouts/base"
{{ pullquote }}
+{% if hasSpoilers %} +