Compare commits

...

3 Commits

Author SHA1 Message Date
Kalitsune
7275f80e0c
Merge 75de114858 into 03dac9ed6d 2024-10-25 18:17:14 +02:00
Kalitsune
75de114858 🔗 Made the news button disappear if no rss feed is provided
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
2024-05-12 12:54:47 +02:00
Kalitsune
a02daa3842 👻 Made the socials on the landing page auto hide
The socials will now automatically hide if no link is provided
2024-05-12 12:33:53 +02:00
3 changed files with 79 additions and 62 deletions

View File

@ -961,6 +961,10 @@ async function loadNews(){
const distroData = await DistroAPI.getDistribution() const distroData = await DistroAPI.getDistribution()
if(!distroData.rawDistribution.rss) { if(!distroData.rawDistribution.rss) {
loggerLanding.debug('No RSS feed provided.') loggerLanding.debug('No RSS feed provided.')
// remove the news button
await $('#newsButton').fadeOut(250).promise()
return null return null
} }

View File

@ -5,9 +5,9 @@ title = "Helios Launcher"
[ejs.landing] [ejs.landing]
mediaGitHubURL = "https://github.com/dscalzi/HeliosLauncher" mediaGitHubURL = "https://github.com/dscalzi/HeliosLauncher"
mediaTwitterURL = "#" mediaTwitterURL = ""
mediaInstagramURL = "#" mediaInstagramURL = ""
mediaYouTubeURL = "#" mediaYouTubeURL = ""
mediaDiscordURL = "https://discord.gg/zNWUXdt" mediaDiscordURL = "https://discord.gg/zNWUXdt"
[ejs.settings] [ejs.settings]

View File

@ -27,8 +27,10 @@
</button> </button>
</div> </div>
</div> </div>
<% if (lang('landing.mediaGitHubURL') + lang('landing.mediaTwitterURL') + lang('landing.mediaInstagramURL') + lang('landing.mediaYouTubeURL') + lang('landing.mediaDiscordURL') != "") { %>
<div class="mediaDivider"></div> <div class="mediaDivider"></div>
<div id="externalMedia"> <div id="externalMedia">
<% if (lang('landing.mediaGitHubURL') != "") { %>
<div class="mediaContainer"> <div class="mediaContainer">
<a href="<%- lang('landing.mediaGitHubURL') %>" class="mediaURL" id="linkURL"> <a href="<%- lang('landing.mediaGitHubURL') %>" class="mediaURL" id="linkURL">
<svg id="linkSVG" class="mediaSVG" viewBox="35.34 34.3575 70.68 68.71500"> <svg id="linkSVG" class="mediaSVG" viewBox="35.34 34.3575 70.68 68.71500">
@ -39,6 +41,8 @@
</svg> </svg>
</a> </a>
</div> </div>
<% } %>
<% if (lang('landing.mediaTwitterURL') != "") { %>
<div class="mediaContainer"> <div class="mediaContainer">
<a href="<%- lang('landing.mediaTwitterURL') %>" class="mediaURL" id="twitterURL"> <a href="<%- lang('landing.mediaTwitterURL') %>" class="mediaURL" id="twitterURL">
<svg id="twitterSVG" class="mediaSVG" viewBox="0 0 5000 4060" preserveAspectRatio="xMidYMid meet"> <svg id="twitterSVG" class="mediaSVG" viewBox="0 0 5000 4060" preserveAspectRatio="xMidYMid meet">
@ -48,6 +52,8 @@
</svg> </svg>
</a> </a>
</div> </div>
<% } %>
<% if (lang('landing.mediaInstagramURL') != "") { %>
<div class="mediaContainer"> <div class="mediaContainer">
<a href="<%- lang('landing.mediaInstagramURL') %>" class="mediaURL" id="instagramURL"> <a href="<%- lang('landing.mediaInstagramURL') %>" class="mediaURL" id="instagramURL">
<svg id="instagramSVG" class="mediaSVG" viewBox="0 0 5040 5040"> <svg id="instagramSVG" class="mediaSVG" viewBox="0 0 5040 5040">
@ -68,6 +74,8 @@
</svg> </svg>
</a> </a>
</div> </div>
<% } %>
<% if (lang('landing.mediaYouTubeURL') != "") { %>
<div class="mediaContainer"> <div class="mediaContainer">
<a href="<%- lang('landing.mediaYouTubeURL') %>" class="mediaURL" id="youtubeURL"> <a href="<%- lang('landing.mediaYouTubeURL') %>" class="mediaURL" id="youtubeURL">
<svg id="youtubeSVG" class="mediaSVG" viewBox="35.34 34.3575 70.68 68.71500"> <svg id="youtubeSVG" class="mediaSVG" viewBox="35.34 34.3575 70.68 68.71500">
@ -77,6 +85,9 @@
</svg> </svg>
</a> </a>
</div> </div>
<% } %>
<% if (lang('landing.mediaDiscordURL') != "") { %>
<div class="mediaContainer"> <div class="mediaContainer">
<a href="<%- lang('landing.mediaDiscordURL') %>" class="mediaURL" id="discordURL"> <a href="<%- lang('landing.mediaDiscordURL') %>" class="mediaURL" id="discordURL">
<svg id="discordSVG" class="mediaSVG" viewBox="35.34 34.3575 70.68 68.71500"> <svg id="discordSVG" class="mediaSVG" viewBox="35.34 34.3575 70.68 68.71500">
@ -86,7 +97,9 @@
</svg> </svg>
</a> </a>
</div> </div>
<% } %>
</div> </div>
<% } %>
</div> </div>
</div> </div>
</div> </div>