-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
202 lines (188 loc) · 8.99 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pastor Insights</title>
<link href="index.css" rel="stylesheet"/>
<script>
document.addEventListener("DOMContentLoaded", function(event) {
var form = document.getElementById('form');
form.addEventListener('submit', function(e){
e.preventDefault();
register(new FormData(form));
});
});
function register(formData) {
document.getElementById('submit').disabled = true;
document.getElementById('submit').innerHTML = "Please wait ...";
form_json = Object.fromEntries(formData);
// form_json['user_id'] = 0;
console.log("formData is:");
console.log(JSON.stringify(form_json));
fetch('https://flows.pastorinsights.ai/webhook/ahg0lRP83barIc5if7N4/register', {
method: 'POST',
credentials: "include",
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(form_json),
}).then(function(response) {
return response.json();
}).then(function(data) {
console.log(data);
if (data['status']) {
document.getElementById("form").style.display = "none";
document.getElementById("successMsg").style.display = "block";
} else {
var em = document.getElementById("errorMsg");
em.innerHTML = data['message'];
em.style.display = "block";
}
}).catch(error => {
console.error('Error:', error);
var em = document.getElementById("errorMsg");
em.style.display = "block";
});
}
</script>
</head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-T3YP6PHS4N"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-T3YP6PHS4N');
</script>
<body>
<!-- Hero Section -->
<div class="hero">
<div class="hero-content">
<h1>Spiritual insights just for you</h1>
<div class="message-box" id="successMsg" style="display:none">
Thank you for subscribing! Please <span style="color: #FFA500; font-size: 120%;">check your email</span> to confirm subscription.
</div>
<div class="message-box" id="errorMsg" style="display:none">
Sorry, there is a problem with your registration.
</div>
<form id="form">
<p>Join the newsletter to receive Bible-based insights of news events.</p>
<div class="subscribe-box">
<div style="margin-bottom: 0.8rem;white-space: nowrap;display: flex;font-size: 1.3rem;justify-content: center;">
<div style="padding: 0.2rem 0;">I am a</div>
<!-- <select style="background-color:rgba(255,255,255,0.1);color: #ffffff;border: 0;font-weight: bold;font-size: 1.1rem;padding:0.2rem;" name="profile" id="profile">-->
<!-- <option value="traditional">traditional Christian, and prefer strict Bible interpretations.</option>-->
<!-- <option value="progressive">progressive Christian, and believe that beliefs evolve to reflect some cultural changes.</option>-->
<!-- </select>-->
<div style="position: relative;margin-left: 0.3rem;">
<div id="selectBody" onclick="openOptionList()" style="border-radius: 0.2rem;background-color: rgba(255,255,255,0.1);color: #ffffff;font-weight: bold;padding:0.2rem 0.6rem 0.2rem 0.2rem;display: flex;align-items: center;cursor: pointer;">
<span id="profile-text" style="text-align: start;">traditional Christian, and prefer strict Bible interpretations.</span>
<img src="select.svg" style="height: 1.1rem;margin-left: 0.5rem;">
</div>
<div id="optionList" style="display: none;white-space: normal;text-shadow: 1px 1px rgba(51,51,51,0.45);width: 100%;top: 100%;left: 0;background-color: rgb(102,177,201);position: absolute;z-index: 99;color: #ffffff;text-align: start;">
<div style="padding: 0.7rem 0.2rem 0.4rem; cursor: pointer;" id="traditional" class="option" onclick="selectOption(event)">traditional Christian, and prefer strict Bible interpretations.</div>
<div style="padding: 0.4rem 0.2rem 0.7rem; cursor: pointer;border-radius: 0 0 0.2rem 0.2rem" id="progressive" class="option" onclick="selectOption(event)">progressive Christian, and believe that beliefs evolve to reflect some cultural changes.</div>
</div>
</div>
<input style="display: none;" type="text" value="traditional" name="profile" id="profile">
</div>
<div class="email-and-subscribe">
<input type="email" id="email" name="email" placeholder="Enter your email">
<button type="submit" id="submit">Subscribe for free</button>
</div>
</div>
<p>Already subscribed? You can <a href="request_update.html">Update your personal profile</a></p>
</form>
</div>
</div>
<!-- Main Content Section -->
<div class="container">
<!-- Chat Section -->
<div class="chat-section">
<h2>Daily spiritual insights on Telegram</h2>
<p>follow-up conversations to discuss the news or anything else in life!</p>
<p>
<a href="https://t.me/flows_english_assistant_bot" class="chat-button">
<img src="telegram-icon.png" alt="Telegram Icon">
Open Telegram
</a>
</p>
<div class="qr-codes">
<img src="telegram-qr-code.png" alt="QR Code for Telegram Chat">
</div>
Or, <a href="https://pastor.gaia.domains/chatbot-ui/index.html">Chat on the web</a>
<!--
<div class="chat-options">
<a href="https://pastor.gaianet.network/chatbot-ui/index.html" class="chat-button">
<img src="web-icon.png" alt="Web Icon">
Chat via a browser
</a>
<a href="https://t.me/flows_english_assistant_bot" class="chat-button">
<img src="telegram-icon.png" alt="Telegram Icon">
Chat via Telegram
</a>
</div>
<div class="qr-codes">
<img src="web-qr-code.png" alt="QR Code for Web Chat">
<img src="telegram-qr-code.png" alt="QR Code for Telegram Chat">
</div>
-->
</div>
<!-- Email Example Section -->
<div class="email-example-section">
<h2>Example emails you will receive</h2>
<p>Better understand world events and get inspired!</p>
<div class="email-example" onclick="window.location.href='sample_01.html';">
<div class="email-title">The Courageous Trek of the Unnamed</div>
<div class="email-content">
What can we learn from Rayne Beau's 900-mile journey back home? Discover how perseverance and faith led this small cat back to his family...
</div>
</div>
<div class="email-example" onclick="window.location.href='sample_02.html';">
<div class="email-title">Rate Cut Fails to Revitalize Slowing Economy</div>
<div class="email-content">
As we consider the potential impact of the rate cut on economic growth and inflation, let us remember what the Bible says in Matthew 6:31-34 ...
</div>
</div>
<div class="email-example" onclick="window.location.href='sample_03.html';">
<div class="email-title">Space exploitation vs. earthly concerns</div>
<div class="email-content">
Jared Isaacman and his team, are willing to venture into space in pursuit of scientific discovery and technological advancement, yet often neglect or overlook the needs and well-being of those who are right here on Earth ...
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer>
© 2024 Gaia. All rights reserved.
</footer>
<script>
const profile = document.getElementById("profile")
const profileText = document.getElementById("profile-text")
const selectBody = document.getElementById("selectBody")
const optionList = document.getElementById("optionList")
const selectOption = (e) => {
closeOptionList()
profile.value = e.target.id
profileText.innerText = e.target.innerText
}
const openOptionList = () => {
selectBody.style.backgroundColor = "#66B1C9";
selectBody.style.borderRadius="0.2rem 0.2rem 0 0";
optionList.style.display="block";
optionList.style.borderRadius="0 0 0.2rem 0.2rem";
}
const closeOptionList = () => {
selectBody.style.backgroundColor = "rgba(255,255,255,0.1)";
selectBody.style.borderRadius="0.2rem";
optionList.style.display="none";
}
document.addEventListener('click', function (event) {
if (!event.target.closest('#selectBody')) {
closeOptionList()
}
})
</script>
</body>
</html>