-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
37 lines (35 loc) · 1.18 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
let footer = document.getElementById('footer-text')
footer.innerHTML = 'Diego Enríquez<br/> Copyright© ' + new Date().getFullYear()
let events = (id, url) => {
let obj = document.getElementById(id)
obj.addEventListener('click', () => {
window.open(url)
})
}
events('degcodechannel', 'https://t.me/degcode')
events('twitterlink', 'https://www.x.com/astrodev0703')
events('devto', 'https://dev.to/astrodev07')
events('mygithub', 'https://github.com/astrodev07')
events('ytchannel', 'https://youtube.com/@astrodev07')
events('emailink', 'mailto:diegoaep07@proton.me')
events(
'instagram',
'https://www.instagram.com/diego.alejandroep'
)
let changeMode = document.getElementById('change-mode')
changeMode.addEventListener(
'click',
() => {
if (document.body.className == 'dark-mode') {
document.body.className = 'white-mode'
changeMode.innerHTML = 'Dark Mode'
}
else {
document.body.className = 'dark-mode'
changeMode.innerHTML = 'White Mode'
}
}
)
let motivQuotDiv = document.getElementById('motivationalQuote')
let quote = randomQuote(jsonQuotes)
motivQuotDiv.innerHTML = `<hr/><br/>"<b>${quote.quote}</b>"<br/>${quote.author}<br/><br/><hr/>`