Socials page is dynamic now
This commit is contained in:
parent
c25ed37489
commit
83e836d4ba
2 changed files with 36 additions and 4 deletions
|
@ -100,8 +100,39 @@ function converter(html) {
|
|||
"WEATHER_MODIFIER": randomThemer.returnTheme(),
|
||||
"WEATHER_TEXT": "",
|
||||
"ANNOUNCEMENT": fs.readFileSync(path.join(__dirname, "config/announcement.html")),
|
||||
"ACTIVITIES": activityToHTML.activitiesToHTML(lanyardData)
|
||||
"ACTIVITIES": activityToHTML.activitiesToHTML(lanyardData),
|
||||
"SOCIALS": () => {
|
||||
var socials = lanyardData.socials
|
||||
var html = ""
|
||||
if (socials) {
|
||||
var socialsTable = Object.keys(socials)
|
||||
for (var i = 0; i < socialsTable.length; i++) {
|
||||
var category = socialsTable[i]
|
||||
var sites = socials[category]
|
||||
var sitesTable = Object.keys(sites)
|
||||
html += `<div class="grid-child"><div><h3>${category}</h3>`
|
||||
for (var x = 0; x < sitesTable.length; x++) {
|
||||
var siteName = sitesTable[x]
|
||||
var siteData = sites[siteName]
|
||||
if (siteData.url) {
|
||||
html += `<a class="chip" href="${siteData.url}">${siteName}: ${siteData.name}</a>`
|
||||
}
|
||||
}
|
||||
html += "</div></div>"
|
||||
}
|
||||
}
|
||||
return html
|
||||
}
|
||||
}
|
||||
|
||||
// <div class="grid-child">
|
||||
// <div>
|
||||
// <h3>Chat</h3>
|
||||
// <a class="chip" href="https://matrix.to/#/@bingus_violet:matrix.violets-purgatory.dev">Matrix: @bingus_violet:​matrix.violets-purgatory.dev</a>
|
||||
// <a class="chip">Discord: bingus_violet</a>
|
||||
// <a class="chip">Revolt: Bingus{Violet}#5573</a>
|
||||
// </div>
|
||||
// </div>
|
||||
|
||||
replacers.ALL_KEYWORDS = "{" + Object.keys(replacers).join("}{") + "} "
|
||||
|
||||
|
|
|
@ -31,12 +31,13 @@
|
|||
<main>
|
||||
<p>Here's most of the sites you can find me on-<br>if you needed that for some reason?</p>
|
||||
<div class="grid-container">
|
||||
<div class="grid-child">
|
||||
{SOCIALS}
|
||||
<!-- <div class="grid-child">
|
||||
<div>
|
||||
<h3>Social Media</h3>
|
||||
<a class="chip" href="https://floofy.city/@bingus_violet" rel="me">Fedi: bingus_violet​@floofy.city</a>
|
||||
<a class="chip" href="https://www.youtube.com/channel/UChcrBJNJLZucy3TPyGyAY2g">Youtube: {Violet}'s Fiasco</a>
|
||||
<!-- <a class="chip" href="https://ko-fi.com/bingus_violet">Ko-fi: Bingus_{Violet}</a> -->
|
||||
<a class="chip" href="https://ko-fi.com/bingus_violet">Ko-fi: Bingus_{Violet}</a>
|
||||
<a class="chip" href="https://en.liberapay.com/bingus_violet/">Liberapay: bingus_violet</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -63,7 +64,7 @@
|
|||
<a class="chip" href="https://steamcommunity.com/id/violet-The-Thigh-high-obtainer/">Steam: {Violet}</a>
|
||||
<a class="chip" href="https://www.roblox.com/users/28347789/profile">Roblox: @bingus_violet</a>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<br>
|
||||
</main>
|
||||
|
|
Loading…
Reference in a new issue