Skip to content

Commit

Permalink
fix js
Browse files Browse the repository at this point in the history
  • Loading branch information
garrying committed Apr 23, 2024
1 parent 5f1b98c commit ba9fde5
Showing 1 changed file with 33 additions and 30 deletions.
63 changes: 33 additions & 30 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,33 +126,36 @@ document.querySelector('.logo').addEventListener('focus', function(){
})

const element = document.querySelector('.screen');
AsciiMorph(element, {x: 0,y: 0});

const asciis = [[
"|NETWORK ISβ–‘β–‘β–‘|",
"|OPTIONALβ–‘β–‘β–‘β–‘β–‘|"
],[
"|β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘|",
"|β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘|"
],[
"|DOES NOTβ–‘β–‘β–‘β–‘β–‘|",
"|CLOUD COMPUTE|",
]
,[
"|β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘|",
"|β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘|"
]]

AsciiMorph.render(asciis[0])

var currentIndex = 1

setTimeout(() => {
AsciiMorph.morph(asciis[1])
}, 7000)

setInterval(() => {
AsciiMorph.morph(asciis[currentIndex])
currentIndex++
currentIndex%= asciis.length
}, 7000)

if (element) {
AsciiMorph(element, {x: 0,y: 0});

const asciis = [[
"|NETWORK ISβ–‘β–‘β–‘|",
"|OPTIONALβ–‘β–‘β–‘β–‘β–‘|"
],[
"|β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘|",
"|β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘|"
],[
"|DOES NOTβ–‘β–‘β–‘β–‘β–‘|",
"|CLOUD COMPUTE|",
]
,[
"|β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘|",
"|β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘|"
]]

AsciiMorph.render(asciis[0])

var currentIndex = 1

setTimeout(() => {
AsciiMorph.morph(asciis[1])
}, 7000)

setInterval(() => {
AsciiMorph.morph(asciis[currentIndex])
currentIndex++
currentIndex%= asciis.length
}, 7000)
}

0 comments on commit ba9fde5

Please sign in to comment.