From a02daa38428e764c0d6717fc16c4c310f5732694 Mon Sep 17 00:00:00 2001 From: Kalitsune Date: Sun, 12 May 2024 12:33:53 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=91=BB=20Made=20the=20socials=20on=20?= =?UTF-8?q?the=20landing=20page=20auto=20hide?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The socials will now automatically hide if no link is provided --- app/assets/lang/_custom.toml | 6 +- app/landing.ejs | 131 +++++++++++++++++++---------------- 2 files changed, 75 insertions(+), 62 deletions(-) diff --git a/app/assets/lang/_custom.toml b/app/assets/lang/_custom.toml index da17faf9..c9d3526b 100644 --- a/app/assets/lang/_custom.toml +++ b/app/assets/lang/_custom.toml @@ -5,9 +5,9 @@ title = "Helios Launcher" [ejs.landing] mediaGitHubURL = "https://github.com/dscalzi/HeliosLauncher" -mediaTwitterURL = "#" -mediaInstagramURL = "#" -mediaYouTubeURL = "#" +mediaTwitterURL = "" +mediaInstagramURL = "" +mediaYouTubeURL = "" mediaDiscordURL = "https://discord.gg/zNWUXdt" [ejs.settings] diff --git a/app/landing.ejs b/app/landing.ejs index 5ac72a15..3e1e72b2 100644 --- a/app/landing.ejs +++ b/app/landing.ejs @@ -27,66 +27,79 @@ -
-
-
- - - - - - - - + <% if (lang('landing.mediaGitHubURL') + lang('landing.mediaTwitterURL') + lang('landing.mediaInstagramURL') + lang('landing.mediaYouTubeURL') + lang('landing.mediaDiscordURL') != "") { %> +
+
+ <% if (lang('landing.mediaGitHubURL') != "") { %> + + <% } %> + <% if (lang('landing.mediaTwitterURL') != "") { %> + + <% } %> + <% if (lang('landing.mediaInstagramURL') != "") { %> + + <% } %> + <% if (lang('landing.mediaYouTubeURL') != "") { %> + + <% } %> + + <% if (lang('landing.mediaDiscordURL') != "") { %> + + <% } %>
- - - - -
+ <% } %>
From 75de1148583ffc18bd79a49787e508a8db5dd55c Mon Sep 17 00:00:00 2001 From: Kalitsune Date: Sun, 12 May 2024 12:54:47 +0200 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=94=97=20Made=20the=20news=20button?= =?UTF-8?q?=20disappear=20if=20no=20rss=20feed=20is=20provided?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the rss feed is empty or missing, the news button will simply not appear for those who don't want to use this feature --- app/assets/js/scripts/landing.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/js/scripts/landing.js b/app/assets/js/scripts/landing.js index 1a1c1768..06438100 100644 --- a/app/assets/js/scripts/landing.js +++ b/app/assets/js/scripts/landing.js @@ -961,6 +961,10 @@ async function loadNews(){ const distroData = await DistroAPI.getDistribution() if(!distroData.rawDistribution.rss) { loggerLanding.debug('No RSS feed provided.') + + // remove the news button + await $('#newsButton').fadeOut(250).promise() + return null }