From 3765c94e62885060a9250ef90af4512d3a83d75f Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 12 Aug 2023 13:30:25 +0200 Subject: [PATCH] allow using embeds instead of images --- web/_data/community-content.json | 10 +++++++- web/_data/community-sections.json | 18 +++++++++----- web/_includes/about.html | 2 +- web/community.html | 41 +++++++++++++++++-------------- web/style.css | 6 ++--- 5 files changed, 47 insertions(+), 30 deletions(-) diff --git a/web/_data/community-content.json b/web/_data/community-content.json index 02b5a17..2f67285 100644 --- a/web/_data/community-content.json +++ b/web/_data/community-content.json @@ -1,6 +1,6 @@ [ { - "name": "Itty for Tiny Life", + "name": "TEMP!! Itty for Tiny Life", "slug": "itty", "desc": "Itty adds a social media site (called Itty) that allows your Tinies to interact digitally!", "author": "ssblur", @@ -9,5 +9,13 @@ "Steam": "https://steamcommunity.com/sharedfiles/filedetails/?id=2965803577", "YouTube": "https://www.youtube.com/channel/UC87-8FM-U9OSUYCzIqlhztA" } + }, + { + "name": "TEMP!! Designing the Modern Home", + "slug": "modern-home", + "desc": "Truly a modern home.", + "author": "ssblur", + "section": "media", + "embed": "https://www.youtube.com/embed/Uomvvpd138M" } ] diff --git a/web/_data/community-sections.json b/web/_data/community-sections.json index 1d842d4..a04405f 100644 --- a/web/_data/community-sections.json +++ b/web/_data/community-sections.json @@ -2,31 +2,37 @@ { "name": "🔨 Mods", "slug": "mods", - "desc": "Mods allow Tiny Life to be built upon through the addition of new actions, build mode items, personalities, and more. For more info on how to install mods, check out the Getting Custom Content article. If you want to make your own mod, the Modding Basics article will help you get started." + "desc": "Mods allow Tiny Life to be built upon through the addition of new actions, build mode items, personalities, and more. For more info on how to install mods, check out the Getting Custom Content article. If you want to make your own mod, the Modding Basics article will help you get started.", + "images": true }, { "name": "🫂 Households", "slug": "households", - "desc": "When playing Tiny Life, you can export and share households from within the characater creator. After getting households from the community, you can add them to your saves from the household selection. For more info on how to get custom households, check out the Getting Custom Content article." + "desc": "When playing Tiny Life, you can export and share households from within the characater creator. After getting households from the community, you can add them to your saves from the household selection. For more info on how to get custom households, check out the Getting Custom Content article.", + "images": true }, { "name": "🏪 Lots", "slug": "lots", - "desc": "When playing Tiny Life, you can export and share lots you've built from build mode. After getting lots from the community, you can add them to your saves in build mode as well. For more info on how to get custom lots, check out the Getting Custom Content article." + "desc": "When playing Tiny Life, you can export and share lots you've built from build mode. After getting lots from the community, you can add them to your saves in build mode as well. For more info on how to get custom lots, check out the Getting Custom Content article.", + "images": true }, { "name": "🌍 Worlds", "slug": "worlds", - "desc": "When playing Tiny Life, you can add custom worlds to your game and add as many as you want to each of your saves. To get started with creating your own custom worlds, check out the Creating Custom Maps article. For more info on how to get custom maps, check out the Getting Custom Content article." + "desc": "When playing Tiny Life, you can add custom worlds to your game and add as many as you want to each of your saves. To get started with creating your own custom worlds, check out the Creating Custom Maps article. For more info on how to get custom maps, check out the Getting Custom Content article.", + "images": true }, { "name": "📽️ Media", "slug": "media", - "desc": "Have you created a Let's Play, gameplay video or review of Tiny Life? This is the perfect place to share it! If you have VODs of livestreams where you played Tiny Life, they can also be shared here." + "desc": "Have you created a Let's Play, gameplay video or review of Tiny Life? This is the perfect place to share it! If you have VODs of livestreams where you played Tiny Life, they can also be shared here.", + "embeds": true }, { "name": "🎨 Art", "slug": "fanart", - "desc": "Recently, people have started creating fan art for Tiny Life, usually involving some of the game's pre-made Tinies. These artists are incredibly talented, so please make sure to check out their other work as well!" + "desc": "Recently, people have started creating fan art for Tiny Life, usually involving some of the game's pre-made Tinies. These artists are incredibly talented, so please make sure to check out their other work as well!", + "images": true } ] diff --git a/web/_includes/about.html b/web/_includes/about.html index 45980cf..2ce255a 100644 --- a/web/_includes/about.html +++ b/web/_includes/about.html @@ -20,7 +20,7 @@ {% endfor %}

Watch the Trailer

-
+
diff --git a/web/community.html b/web/community.html index 2d1a441..1795acd 100644 --- a/web/community.html +++ b/web/community.html @@ -16,30 +16,33 @@ summary: A fun simulation game where you mess with people's lives {% for section in site.data.community-sections %}

{{ section.name }}

-

- {{ section.desc }} -
The slug for this section is {{ section.slug }}. -

+

{{ section.desc }}

{% assign any = false %} {% for content in site.data.community-content %} {% if content.section == section.slug %} -
-
-
-

{{ content.name }}

-
Created by {{ content.author }}
-
{{ content.desc }}
-
- {% for link in content.links %} - {{ link[0] }} - {% unless forloop.last %} - – - {% endunless %} - {% endfor %} -
+
+ {% if section.images %} + An image showing off {{ content.name }} + {% endif %} + {% if section.embeds %} +
+ +
+ {% endif %} + +
+

{{ content.name }}

+
Created by {{ content.author }}
+
{{ content.desc }}
+
+ {% for link in content.links %} + {{ link[0] }} + {% unless forloop.last %} + – + {% endunless %} + {% endfor %}
- An image showing off {{ content.name }}
{% assign any = true %} diff --git a/web/style.css b/web/style.css index 0737615..c8048a2 100644 --- a/web/style.css +++ b/web/style.css @@ -109,7 +109,7 @@ pre.highlight { white-space: initial; } -.community-content { +.community-content-box { margin-top: 15px; margin-bottom: 15px; } @@ -155,14 +155,14 @@ pre.highlight { margin-bottom: 0; } -.trailer { +.video-embed { position: relative; width: 100%; height: 0; padding-bottom: 56.25%; } -.trailer iframe { +.video-embed iframe { position: absolute; top: 0; left: 0;