new status thiongy
This commit is contained in:
parent
7d5b33db51
commit
fca7e5d794
3 changed files with 17 additions and 4 deletions
18
index.js
18
index.js
|
@ -22,7 +22,6 @@ app.listen(PORT, () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
function pageUpdate() {
|
function pageUpdate() {
|
||||||
console.log("Updating...")
|
|
||||||
var statuses = {
|
var statuses = {
|
||||||
"online": {
|
"online": {
|
||||||
"text": "Online",
|
"text": "Online",
|
||||||
|
@ -57,6 +56,21 @@ function pageUpdate() {
|
||||||
|
|
||||||
addedHTML = ""
|
addedHTML = ""
|
||||||
|
|
||||||
|
var currentTime = new Date(Date.now())
|
||||||
|
var currentHour = currentTime.getHours()
|
||||||
|
|
||||||
|
if (currentHour >= 8 && currentHour <= 16 && !(currentTime.getDay() == 6 || currentTime.getDay() == 7)) {
|
||||||
|
addedHTML = `<span style="color: yellow">at school</span>`
|
||||||
|
} else if (currentHour <= 10 && currentHour > 0) {
|
||||||
|
addedHTML = `<span style="color: rgb(200, 150, 255)">eeping</span>`
|
||||||
|
} else {
|
||||||
|
addedHTML = `<span style="color: limegreen">active?</span>`
|
||||||
|
}
|
||||||
|
|
||||||
|
html = html.replace("{ACTIVE_STATUS}", addedHTML)
|
||||||
|
|
||||||
|
addedHTML = ""
|
||||||
|
|
||||||
if (lanyardData && lanyardData.activities.length > 0) {
|
if (lanyardData && lanyardData.activities.length > 0) {
|
||||||
if (lanyardData.activities[0].type == 4) {
|
if (lanyardData.activities[0].type == 4) {
|
||||||
addedHTML += `<hr><p><em><span style="color: lightgray">"${lanyardData.activities[0].state}"</span> - ${lanyardData.discord_user.display_name} ${new Date(Date.now()).getFullYear()}</em></p>`
|
addedHTML += `<hr><p><em><span style="color: lightgray">"${lanyardData.activities[0].state}"</span> - ${lanyardData.discord_user.display_name} ${new Date(Date.now()).getFullYear()}</em></p>`
|
||||||
|
@ -173,8 +187,6 @@ function pageUpdate() {
|
||||||
html = html.replace("{SOCIALS}", addedHTML)
|
html = html.replace("{SOCIALS}", addedHTML)
|
||||||
|
|
||||||
fs.writeFileSync(path.join(__dirname, 'static/index.html'), html)
|
fs.writeFileSync(path.join(__dirname, 'static/index.html'), html)
|
||||||
|
|
||||||
console.log("Updated!")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lanyard Stuffs
|
// Lanyard Stuffs
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
<p class="chip"><a href="./socials">Socials</a></p>
|
<p class="chip"><a href="./socials">Socials</a></p>
|
||||||
<p class="chip"><a href="./pronouns">Pronouns</a></p>
|
<p class="chip"><a href="./pronouns">Pronouns</a></p>
|
||||||
{LANYARD_QUOTE}
|
{LANYARD_QUOTE}
|
||||||
|
<p>Status: Probably {ACTIVE_STATUS}...</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p><em>The world's worst developer</em></p>
|
<p><em>The world's worst developer</em></p>
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
<hr>
|
<hr>
|
||||||
<h2>Social media:</h2>
|
<h2>Social media:</h2>
|
||||||
<p class="chip" style="color: rgb(200, 175, 255);">Fedi: <a
|
<p class="chip" style="color: rgb(200, 175, 255);">Fedi: <a
|
||||||
href="https://tech.lgbt/@Bingus_Violet">@Bingus_Violet@tech.lgbt</a></p>
|
href="https://tech.lgbt/@Bingus_Violet" rel="me">@Bingus_Violet@tech.lgbt</a></p>
|
||||||
<p class="chip" style="color: rgb(255, 80, 80)">Youtube: <a
|
<p class="chip" style="color: rgb(255, 80, 80)">Youtube: <a
|
||||||
href="https://www.youtube.com/channel/UChcrBJNJLZucy3TPyGyAY2g">Violet's Fiasco</a></p>
|
href="https://www.youtube.com/channel/UChcrBJNJLZucy3TPyGyAY2g">Violet's Fiasco</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue