-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotion-widget-dark.html
More file actions
220 lines (195 loc) · 7.24 KB
/
notion-widget-dark.html
File metadata and controls
220 lines (195 loc) · 7.24 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
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Buddhist Teachings Widget (Dark Mode)</title>
<style>
body,
html {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.container {
height: 100%;
width: 100%;
background-color: #191919;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
overflow: hidden;
}
.content {
text-align: center;
padding: 2rem;
max-width: 800px;
flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: center;
}
h1 {
font-size: 1.8rem;
font-weight: 600;
margin-bottom: 1rem;
color: #e0e0e0;
opacity: 0;
animation: fadeIn 1s ease-out forwards;
}
ul {
list-style-type: none;
padding: 0;
text-align: left;
}
li {
font-size: 1rem;
margin-bottom: 1rem;
color: #b0b0b0;
opacity: 0;
animation: slideIn 0.5s ease-out forwards;
}
.teaching-title {
font-weight: 600;
color: #61dafb;
}
.controls {
display: flex;
justify-content: center;
gap: 1rem;
margin-top: 2rem;
margin-bottom: 2rem;
}
button {
background-color: #3a3a3a;
border: none;
color: #e0e0e0;
width: 40px;
height: 40px;
font-size: 1rem;
cursor: pointer;
border-radius: 50%;
transition: background-color 0.3s;
display: flex;
align-items: center;
justify-content: center;
}
button:hover {
background-color: #4a4a4a;
}
button svg {
width: 24px;
height: 24px;
fill: currentColor;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
</style>
</head>
<body>
<div class="container">
<div id="content" class="content"></div>
<div class="controls">
<button id="prevBtn" aria-label="Previous teaching">
<svg viewBox="0 0 24 24">
<path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z" />
</svg>
</button>
<button id="pauseBtn" aria-label="Pause/Resume">
<svg id="pauseIcon" viewBox="0 0 24 24">
<path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z" />
</svg>
<svg id="playIcon" viewBox="0 0 24 24" style="display: none;">
<path d="M8 5v14l11-7z" />
</svg>
</button>
<button id="nextBtn" aria-label="Next teaching">
<svg viewBox="0 0 24 24">
<path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" />
</svg>
</button>
</div>
</div>
<script>
const teachings = [
{ title: "May I be filled with love and kindness. May I be free from suffering. May I be at peace." },
{ title: "My heart is expansive, and it radiates love for myself and others." },
{ title: "I am a living, breathing embodiment of love and compassion." },
{ title: "Every breath I take fills me with calm and self-acceptance." },
{ title: "I release the chains of self-doubt and step fully into my worth." },
{ title: "I am both the source and the recipient of my love and care." },
{ title: "The love I seek from others is already within me, waiting to be embraced." },
{ title: "I am my own sanctuary, a safe and nurturing space." },
{ title: "As I show kindness to myself, it ripples outward to everyone I meet." },
{ title: "I forgive myself for past missteps and honor my journey." },
{ title: "With every sunrise, I choose to love myself a little more." },
{ title: "I am love. I am light. I am whole." },
{ title: "I trust myself to make decisions that align with my highest good." },
{ title: "Every small step I take builds my confidence and strengthens my trust in myself." },
{ title: "I am learning to trust the process of my life and my ability to handle it." },
{ title: "My inner wisdom guides me, and I trust it fully." },
{ title: "With each challenge I overcome, my confidence grows stronger." },
{ title: "I release the fear of making mistakes and embrace learning and growth." },
{ title: "I am capable, resilient, and trust myself to navigate life’s challenges." },
{ title: "Building confidence is a journey, and I honor every step I take along the way." },
{ title: "I trust myself to show up for my dreams and follow through with my intentions." }
];
let currentTeachingIndex = 0;
let intervalId;
let isPaused = false;
function updateTeaching() {
const teaching = teachings[currentTeachingIndex];
const content = document.getElementById('content');
content.innerHTML = `
<h1>${teaching.title}</h1>
`;
}
function nextTeaching() {
currentTeachingIndex = (currentTeachingIndex + 1) % teachings.length;
updateTeaching();
}
function prevTeaching() {
currentTeachingIndex = (currentTeachingIndex - 1 + teachings.length) % teachings.length;
updateTeaching();
}
function togglePause() {
isPaused = !isPaused;
const pauseIcon = document.getElementById('pauseIcon');
const playIcon = document.getElementById('playIcon');
if (isPaused) {
clearInterval(intervalId);
pauseIcon.style.display = 'none';
playIcon.style.display = 'block';
} else {
intervalId = setInterval(nextTeaching, 30000);
pauseIcon.style.display = 'block';
playIcon.style.display = 'none';
}
}
document.getElementById('nextBtn').addEventListener('click', nextTeaching);
document.getElementById('prevBtn').addEventListener('click', prevTeaching);
document.getElementById('pauseBtn').addEventListener('click', togglePause);
updateTeaching();
intervalId = setInterval(nextTeaching, 60000);
</script>
</body>
</html>