-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
153 lines (134 loc) · 5.29 KB
/
index.html
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta name="google-site-verification" content="9EFkJwAO-K0-P1RQBq8a-cWkt6oAgjmR_Jkf4_2yzLE" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="30/31 dias para entender sabedoria divina que não se encontra na terra, mas é concedido pelo Espírito de YHWH.">
<meta name="keywords" content="Provérbios, Provérbios do dia, Salomão">
<meta name="author" content="Jeiel Miranda">
<meta property="og:title" content="Provérbios do dia">
<meta property="og:description" content="30/31 dias para entender sabedoria divina que não se encontra na terra, mas é concedido pelo Espírito de YHWH.">
<meta property="og:image" content="https://i.imgur.com/80WBR8i.png">
<meta property="og:url" content="https://proverb-day.pages.dev">
<meta property="og:site_name" content="Provérbios do dia">
<link rel="icon" href="bible-.png" type="image/png">
<link rel="apple-touch-icon" href="bible-.png">
<link rel="manifest" href="manifest.json">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@material/[email protected]/dist/material.min.css">
<script type="module" src="https://cdn.jsdelivr.net/npm/@material/[email protected]/dist/material.min.js"></script>
<title>Provérbios do Dia</title>
<style>
:root {
--md-sys-color-primary: #006495;
--md-sys-color-surface: #fafbff;
--md-sys-color-surface-container: #edf0f8;
}
body {
margin: 0;
padding: 16px;
background-color: var(--md-sys-color-surface);
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 16px;
}
h1 {
color: var(--md-sys-color-primary);
text-align: center;
font-size: 2rem;
margin-bottom: 24px;
}
.chapter-card {
background-color: var(--md-sys-color-surface-container);
border-radius: 16px;
padding: 24px;
margin-bottom: 24px;
box-shadow: var(--md-sys-elevation-level1);
}
#verses p {
margin: 16px 0;
line-height: 1.6;
font-size: 1.1rem;
padding: 12px;
border-radius: 8px;
background-color: var(--md-sys-color-surface-container);
}
md-dialog {
--md-dialog-container-color: var(--md-sys-color-surface);
border-radius: 28px;
padding: 24px;
}
@media (min-width: 768px) {
body {
padding: 24px;
}
h1 {
font-size: 3rem;
}
#verses p {
font-size: 1.2rem;
}
}
@media (min-width: 1024px) {
body {
padding: 32px;
}
.container {
padding: 32px;
}
#verses p {
font-size: 1.3rem;
}
}
</style>
</head>
<body>
<div class="container">
<h1>Provérbios do Dia</h1>
<div class="chapter-card">
<h2 style="text-align: center; margin: 0;">Capítulo de Hoje:</h2>
<p id="chapter-display" style="text-align: center; font-size: 1.5rem; margin: 8px 0 0 0;"></p>
</div>
<div id="verses"></div>
</div>
<md-dialog id="end-dialog">
<h1 slot="header"> Espírito edificado, volte amanhã fortificado!</h1>
</md-dialog>
<script>
const date = new Date();
date.setTime(date.getTime() + (3600000 * -3)); // Ajuste para UTC-3
const chapter = date.getDate();
document.getElementById('chapter-display').textContent = `Capítulo ${chapter}`;
fetch(`https://blue-bread-4e1d.jeiel-lima-miranda.workers.dev?chapter=${chapter}`)
.then(response => response.json())
.then(data => {
const versesContainer = document.getElementById('verses');
data.verses.forEach((verse, index) => {
const verseElement = document.createElement('p');
verseElement.textContent = `${verse.number} - ${verse.text}`;
versesContainer.appendChild(verseElement);
if (index === data.verses.length - 1) {
verseElement.setAttribute('id', 'last-verse');
}
});
observeLastVerse();
})
.catch(error => console.error('Erro ao buscar versículos:', error));
function observeLastVerse() {
const lastVerse = document.getElementById('last-verse');
const observer = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (entry.isIntersecting) {
document.getElementById('end-dialog').showModal();
}
});
});
observer.observe(lastVerse);
}
</script>
</body>
</html>