-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
100 lines (82 loc) · 2.62 KB
/
index.html
File metadata and controls
100 lines (82 loc) · 2.62 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Juan Puelpan - Software Developer</title>
<link rel="stylesheet" href="/css/normalize.css">
<link rel="stylesheet" href="/css/fontawesome.min.css">
<link rel="stylesheet" href="/css/brands.min.css">
<link rel="stylesheet" href="/css/solid.min.css">
<link rel="stylesheet" href="/css/styles.css">
</head>
<body>
<section id="main-content">
<header>
<h1>Juan Puelpan</h1>
<span>Software Developer</span>
</header>
<ul class="social">
<li>
<a href="https://github.com/Jpuelpan" title="Github" target="_blank">
<span class="fa-brands fa-github-alt"></span>
</a>
</li>
<li>
<a href="https://instagram.com/estaihelaojuan" title="Linkedin" target="_blank">
<span class="fa-brands fa-instagram"></span>
</a>
</li>
<li>
<a href="https://open.spotify.com/user/12125975552" title="Spotify" target="_blank">
<span class="fa-brands fa-spotify"></span>
</a>
</li>
<li>
<a href="https://cl.linkedin.com/in/juanpuelpan" title="Linkedin" target="_blank">
<span class="fa-brands fa-linkedin"></span>
</a>
</li>
<li>
<a href="https://www.librarything.com/catalog/jpuelpan/currentlyreading" title="Github" target="_blank">
<span class="fa-solid fa-book"></span>
</a>
</li>
<li>
<a href="mailto:juan@puelpan.com" title="Linkedin" target="_blank">
<span class="fa-solid fa-envelope"></span>
</a>
</li>
</ul>
<div style="text-align: center;">
<p>Here is a random quote from a book that I've read. <br/> Click <a href="javascript: randomQuote();">here</a> to get another one, or <a href="/quotes">here</a> to see them all.</p>
</div>
<div id="quote">
</div>
</section>
<script>
let quotes = []
function randomQuote(){
const item = quotes[Math.floor(Math.random()*quotes.length)]
let quote = `"${item.body}"<br/><br/> ${item.author}`
if( item.originName ){
quote = `${quote}, ${item.originName}`
}
document.querySelector('#quote').innerHTML = quote
}
async function main(){
async function fetchQuotes(){
const res = await fetch('/quotes/quotes.json')
if(res.status === 200){
return res.json()
}else{
return []
}
}
quotes = await fetchQuotes()
randomQuote()
}
main()
</script>
</body>
</html>