Update templates/apology.html
Browse files- templates/apology.html +431 -58
templates/apology.html
CHANGED
|
@@ -1,74 +1,447 @@
|
|
| 1 |
-
!-- templates/apology.html -->
|
| 2 |
<!DOCTYPE html>
|
| 3 |
<html lang="en">
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
-
<title>Apology Generator</title>
|
| 8 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
</head>
|
| 10 |
<body>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
<div class="container">
|
| 12 |
-
<
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
<
|
| 19 |
-
<
|
| 20 |
-
<
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
<
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
<
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
</form>
|
|
|
|
| 34 |
{% if apology %}
|
| 35 |
-
<
|
| 36 |
-
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
<script>
|
| 39 |
function speakApology() {
|
| 40 |
-
|
| 41 |
-
|
| 42 |
utterance.lang = 'en-US';
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
recognition.lang = 'en-US';
|
| 55 |
-
recognition.start();
|
| 56 |
-
|
| 57 |
-
recognition.onresult = function(event) {
|
| 58 |
-
const result = event.results[0][0].transcript.toLowerCase();
|
| 59 |
-
document.querySelectorAll(`input[name="${fieldName}"]`).forEach(radio => {
|
| 60 |
-
if (radio.value.toLowerCase() === result) {
|
| 61 |
-
radio.checked = true;
|
| 62 |
}
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
}
|
| 66 |
-
</script>
|
| 67 |
-
|
| 68 |
-
</body>
|
| 69 |
-
</html>
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>π’ Guilt-Tripping Apology Generator</title>
|
| 7 |
+
<style>
|
| 8 |
+
* {
|
| 9 |
+
margin: 0;
|
| 10 |
+
padding: 0;
|
| 11 |
+
box-sizing: border-box;
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
body {
|
| 15 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 16 |
+
background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 50%, #ff8e8e 100%);
|
| 17 |
+
min-height: 100vh;
|
| 18 |
+
color: #333;
|
| 19 |
+
line-height: 1.6;
|
| 20 |
+
padding: 20px 0;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
.container {
|
| 24 |
+
max-width: 900px;
|
| 25 |
+
margin: 0 auto;
|
| 26 |
+
padding: 20px;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
.header {
|
| 30 |
+
text-align: center;
|
| 31 |
+
margin-bottom: 40px;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
h1 {
|
| 35 |
+
color: #fff;
|
| 36 |
+
font-size: 3rem;
|
| 37 |
+
margin-bottom: 15px;
|
| 38 |
+
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
|
| 39 |
+
font-weight: 700;
|
| 40 |
+
letter-spacing: -1px;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.status-badge {
|
| 44 |
+
display: inline-block;
|
| 45 |
+
background: rgba(255, 255, 255, 0.2);
|
| 46 |
+
backdrop-filter: blur(10px);
|
| 47 |
+
color: #fff;
|
| 48 |
+
padding: 8px 20px;
|
| 49 |
+
border-radius: 25px;
|
| 50 |
+
font-size: 1rem;
|
| 51 |
+
font-weight: 600;
|
| 52 |
+
border: 1px solid rgba(255, 255, 255, 0.3);
|
| 53 |
+
margin-bottom: 20px;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
.main-form {
|
| 57 |
+
background: rgba(255, 255, 255, 0.95);
|
| 58 |
+
backdrop-filter: blur(15px);
|
| 59 |
+
padding: 40px;
|
| 60 |
+
border-radius: 20px;
|
| 61 |
+
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
|
| 62 |
+
margin-bottom: 30px;
|
| 63 |
+
border: 1px solid rgba(255,255,255,0.3);
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
.form-section {
|
| 67 |
+
margin-bottom: 30px;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.form-section:last-child {
|
| 71 |
+
margin-bottom: 0;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
label {
|
| 75 |
+
display: block;
|
| 76 |
+
font-weight: 700;
|
| 77 |
+
font-size: 1.2rem;
|
| 78 |
+
color: #2c3e50;
|
| 79 |
+
margin-bottom: 15px;
|
| 80 |
+
position: relative;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
label::after {
|
| 84 |
+
content: '';
|
| 85 |
+
position: absolute;
|
| 86 |
+
bottom: -5px;
|
| 87 |
+
left: 0;
|
| 88 |
+
width: 50px;
|
| 89 |
+
height: 3px;
|
| 90 |
+
background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
|
| 91 |
+
border-radius: 2px;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
select {
|
| 95 |
+
width: 100%;
|
| 96 |
+
padding: 15px 20px;
|
| 97 |
+
border: 2px solid #e0e0e0;
|
| 98 |
+
border-radius: 12px;
|
| 99 |
+
font-size: 1.1rem;
|
| 100 |
+
background-color: #fff;
|
| 101 |
+
color: #333;
|
| 102 |
+
transition: all 0.3s ease;
|
| 103 |
+
appearance: none;
|
| 104 |
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23666' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
|
| 105 |
+
background-position: right 15px center;
|
| 106 |
+
background-repeat: no-repeat;
|
| 107 |
+
background-size: 20px;
|
| 108 |
+
padding-right: 50px;
|
| 109 |
+
cursor: pointer;
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
select:focus {
|
| 113 |
+
outline: none;
|
| 114 |
+
border-color: #ff6b6b;
|
| 115 |
+
box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
|
| 116 |
+
transform: translateY(-2px);
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
select:hover {
|
| 120 |
+
border-color: #ff8e8e;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
.generate-btn {
|
| 124 |
+
width: 100%;
|
| 125 |
+
background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
|
| 126 |
+
color: white;
|
| 127 |
+
padding: 18px 30px;
|
| 128 |
+
border: none;
|
| 129 |
+
border-radius: 12px;
|
| 130 |
+
cursor: pointer;
|
| 131 |
+
font-size: 1.3rem;
|
| 132 |
+
font-weight: 700;
|
| 133 |
+
text-transform: uppercase;
|
| 134 |
+
letter-spacing: 1px;
|
| 135 |
+
transition: all 0.3s ease;
|
| 136 |
+
box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
|
| 137 |
+
position: relative;
|
| 138 |
+
overflow: hidden;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.generate-btn::before {
|
| 142 |
+
content: '';
|
| 143 |
+
position: absolute;
|
| 144 |
+
top: 0;
|
| 145 |
+
left: -100%;
|
| 146 |
+
width: 100%;
|
| 147 |
+
height: 100%;
|
| 148 |
+
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
|
| 149 |
+
transition: left 0.5s;
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
.generate-btn:hover::before {
|
| 153 |
+
left: 100%;
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
.generate-btn:hover {
|
| 157 |
+
background: linear-gradient(135deg, #ee5a6f, #ff6b6b);
|
| 158 |
+
transform: translateY(-3px);
|
| 159 |
+
box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
.generate-btn:active {
|
| 163 |
+
transform: translateY(-1px);
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
.result-section {
|
| 167 |
+
background: rgba(255, 255, 255, 0.95);
|
| 168 |
+
backdrop-filter: blur(15px);
|
| 169 |
+
padding: 30px;
|
| 170 |
+
border-radius: 20px;
|
| 171 |
+
box-shadow: 0 15px 35px rgba(0,0,0,0.1);
|
| 172 |
+
margin-bottom: 30px;
|
| 173 |
+
border: 1px solid rgba(255,255,255,0.3);
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
.result-section h2 {
|
| 177 |
+
color: #2c3e50;
|
| 178 |
+
font-size: 2rem;
|
| 179 |
+
margin-bottom: 20px;
|
| 180 |
+
text-align: center;
|
| 181 |
+
position: relative;
|
| 182 |
+
padding-bottom: 15px;
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
.result-section h2::after {
|
| 186 |
+
content: '';
|
| 187 |
+
position: absolute;
|
| 188 |
+
bottom: 0;
|
| 189 |
+
left: 50%;
|
| 190 |
+
transform: translateX(-50%);
|
| 191 |
+
width: 80px;
|
| 192 |
+
height: 4px;
|
| 193 |
+
background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
|
| 194 |
+
border-radius: 2px;
|
| 195 |
+
}
|
| 196 |
+
|
| 197 |
+
.apology-text {
|
| 198 |
+
background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
|
| 199 |
+
padding: 25px;
|
| 200 |
+
border-radius: 15px;
|
| 201 |
+
border-left: 5px solid #ff6b6b;
|
| 202 |
+
font-size: 1.2rem;
|
| 203 |
+
line-height: 1.8;
|
| 204 |
+
margin-bottom: 20px;
|
| 205 |
+
color: #2c3e50;
|
| 206 |
+
box-shadow: 0 5px 15px rgba(253, 203, 110, 0.3);
|
| 207 |
+
position: relative;
|
| 208 |
+
overflow: hidden;
|
| 209 |
+
}
|
| 210 |
+
|
| 211 |
+
.apology-text::before {
|
| 212 |
+
content: '"';
|
| 213 |
+
position: absolute;
|
| 214 |
+
top: -10px;
|
| 215 |
+
left: 15px;
|
| 216 |
+
font-size: 4rem;
|
| 217 |
+
color: rgba(255, 107, 107, 0.3);
|
| 218 |
+
font-family: serif;
|
| 219 |
+
}
|
| 220 |
+
|
| 221 |
+
.apology-text::after {
|
| 222 |
+
content: '"';
|
| 223 |
+
position: absolute;
|
| 224 |
+
bottom: -30px;
|
| 225 |
+
right: 15px;
|
| 226 |
+
font-size: 4rem;
|
| 227 |
+
color: rgba(255, 107, 107, 0.3);
|
| 228 |
+
font-family: serif;
|
| 229 |
+
}
|
| 230 |
+
|
| 231 |
+
.play-btn {
|
| 232 |
+
background: linear-gradient(135deg, #00b894, #00a085);
|
| 233 |
+
color: white;
|
| 234 |
+
padding: 15px 30px;
|
| 235 |
+
border: none;
|
| 236 |
+
border-radius: 50px;
|
| 237 |
+
cursor: pointer;
|
| 238 |
+
font-size: 1.1rem;
|
| 239 |
+
font-weight: 600;
|
| 240 |
+
transition: all 0.3s ease;
|
| 241 |
+
box-shadow: 0 5px 15px rgba(0, 184, 148, 0.3);
|
| 242 |
+
display: inline-flex;
|
| 243 |
+
align-items: center;
|
| 244 |
+
gap: 10px;
|
| 245 |
+
text-transform: uppercase;
|
| 246 |
+
letter-spacing: 0.5px;
|
| 247 |
+
}
|
| 248 |
+
|
| 249 |
+
.play-btn:hover {
|
| 250 |
+
background: linear-gradient(135deg, #00a085, #00b894);
|
| 251 |
+
transform: translateY(-2px);
|
| 252 |
+
box-shadow: 0 8px 25px rgba(0, 184, 148, 0.4);
|
| 253 |
+
}
|
| 254 |
+
|
| 255 |
+
.play-btn:active {
|
| 256 |
+
transform: translateY(0);
|
| 257 |
+
}
|
| 258 |
+
|
| 259 |
+
.navigation {
|
| 260 |
+
text-align: center;
|
| 261 |
+
margin-top: 40px;
|
| 262 |
+
}
|
| 263 |
+
|
| 264 |
+
.nav-link {
|
| 265 |
+
display: inline-block;
|
| 266 |
+
background: rgba(255, 255, 255, 0.2);
|
| 267 |
+
backdrop-filter: blur(10px);
|
| 268 |
+
color: #fff;
|
| 269 |
+
text-decoration: none;
|
| 270 |
+
padding: 15px 30px;
|
| 271 |
+
border-radius: 50px;
|
| 272 |
+
font-weight: 600;
|
| 273 |
+
font-size: 1.1rem;
|
| 274 |
+
transition: all 0.3s ease;
|
| 275 |
+
border: 2px solid rgba(255, 255, 255, 0.3);
|
| 276 |
+
text-transform: uppercase;
|
| 277 |
+
letter-spacing: 0.5px;
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
.nav-link:hover {
|
| 281 |
+
background: rgba(255, 255, 255, 0.3);
|
| 282 |
+
transform: translateY(-3px);
|
| 283 |
+
box-shadow: 0 8px 25px rgba(0,0,0,0.2);
|
| 284 |
+
border-color: rgba(255, 255, 255, 0.5);
|
| 285 |
+
}
|
| 286 |
+
|
| 287 |
+
.floating-emoji {
|
| 288 |
+
position: fixed;
|
| 289 |
+
font-size: 2rem;
|
| 290 |
+
pointer-events: none;
|
| 291 |
+
z-index: -1;
|
| 292 |
+
opacity: 0.1;
|
| 293 |
+
animation: float 6s ease-in-out infinite;
|
| 294 |
+
}
|
| 295 |
+
|
| 296 |
+
.floating-emoji:nth-child(1) {
|
| 297 |
+
top: 20%;
|
| 298 |
+
left: 10%;
|
| 299 |
+
animation-delay: 0s;
|
| 300 |
+
}
|
| 301 |
+
|
| 302 |
+
.floating-emoji:nth-child(2) {
|
| 303 |
+
top: 60%;
|
| 304 |
+
right: 10%;
|
| 305 |
+
animation-delay: 2s;
|
| 306 |
+
}
|
| 307 |
+
|
| 308 |
+
.floating-emoji:nth-child(3) {
|
| 309 |
+
bottom: 20%;
|
| 310 |
+
left: 20%;
|
| 311 |
+
animation-delay: 4s;
|
| 312 |
+
}
|
| 313 |
+
|
| 314 |
+
@keyframes float {
|
| 315 |
+
0%, 100% { transform: translateY(0px) rotate(0deg); }
|
| 316 |
+
33% { transform: translateY(-20px) rotate(5deg); }
|
| 317 |
+
66% { transform: translateY(10px) rotate(-5deg); }
|
| 318 |
+
}
|
| 319 |
+
|
| 320 |
+
@media (max-width: 768px) {
|
| 321 |
+
.container {
|
| 322 |
+
padding: 15px;
|
| 323 |
+
}
|
| 324 |
+
|
| 325 |
+
h1 {
|
| 326 |
+
font-size: 2.5rem;
|
| 327 |
+
}
|
| 328 |
+
|
| 329 |
+
.main-form {
|
| 330 |
+
padding: 25px;
|
| 331 |
+
}
|
| 332 |
+
|
| 333 |
+
.result-section {
|
| 334 |
+
padding: 20px;
|
| 335 |
+
}
|
| 336 |
+
|
| 337 |
+
.apology-text {
|
| 338 |
+
font-size: 1.1rem;
|
| 339 |
+
padding: 20px;
|
| 340 |
+
}
|
| 341 |
+
|
| 342 |
+
.generate-btn {
|
| 343 |
+
font-size: 1.1rem;
|
| 344 |
+
padding: 15px 25px;
|
| 345 |
+
}
|
| 346 |
+
}
|
| 347 |
+
|
| 348 |
+
@media (max-width: 480px) {
|
| 349 |
+
h1 {
|
| 350 |
+
font-size: 2rem;
|
| 351 |
+
}
|
| 352 |
+
|
| 353 |
+
.main-form {
|
| 354 |
+
padding: 20px;
|
| 355 |
+
}
|
| 356 |
+
|
| 357 |
+
label {
|
| 358 |
+
font-size: 1.1rem;
|
| 359 |
+
}
|
| 360 |
+
|
| 361 |
+
select {
|
| 362 |
+
padding: 12px 15px;
|
| 363 |
+
font-size: 1rem;
|
| 364 |
+
}
|
| 365 |
+
}
|
| 366 |
+
</style>
|
| 367 |
</head>
|
| 368 |
<body>
|
| 369 |
+
<!-- Floating decorative elements -->
|
| 370 |
+
<div class="floating-emoji">π’</div>
|
| 371 |
+
<div class="floating-emoji">π</div>
|
| 372 |
+
<div class="floating-emoji">π</div>
|
| 373 |
+
|
| 374 |
<div class="container">
|
| 375 |
+
<div class="header">
|
| 376 |
+
<h1>π’ Guilt-Tripping Apology Generator</h1>
|
| 377 |
+
<div class="status-badge">Template loaded β
</div>
|
| 378 |
+
</div>
|
| 379 |
+
|
| 380 |
+
<form class="main-form" method="post">
|
| 381 |
+
<div class="form-section">
|
| 382 |
+
<label for="scenario">Choose a scenario:</label>
|
| 383 |
+
<select name="scenario" id="scenario">
|
| 384 |
+
<option value="Work" {% if request.form.get('scenario') == 'Work' %}selected{% endif %}>Work</option>
|
| 385 |
+
<option value="School" {% if request.form.get('scenario') == 'School' %}selected{% endif %}>School</option>
|
| 386 |
+
<option value="Social" {% if request.form.get('scenario') == 'Social' %}selected{% endif %}>Social</option>
|
| 387 |
+
<option value="Family" {% if request.form.get('scenario') == 'Family' %}selected{% endif %}>Family</option>
|
| 388 |
+
</select>
|
| 389 |
+
</div>
|
| 390 |
+
|
| 391 |
+
<div class="form-section">
|
| 392 |
+
<label for="tone">Pick a tone (optional):</label>
|
| 393 |
+
<select name="tone" id="tone">
|
| 394 |
+
<option value="" {% if not request.form.get('tone') %}selected{% endif %}>Choose a tone...</option>
|
| 395 |
+
<option value="Sincere" {% if request.form.get('tone') == 'Sincere' %}selected{% endif %}>Sincere</option>
|
| 396 |
+
<option value="Emotional" {% if request.form.get('tone') == 'Emotional' %}selected{% endif %}>Emotional</option>
|
| 397 |
+
<option value="Dramatic" {% if request.form.get('tone') == 'Dramatic' %}selected{% endif %}>Dramatic</option>
|
| 398 |
+
</select>
|
| 399 |
+
</div>
|
| 400 |
+
|
| 401 |
+
<button type="submit" class="generate-btn">Generate Apology</button>
|
| 402 |
</form>
|
| 403 |
+
|
| 404 |
{% if apology %}
|
| 405 |
+
<div class="result-section">
|
| 406 |
+
<h2>Your Apology:</h2>
|
| 407 |
+
<div class="apology-text" id="apologyText">{{ apology }}</div>
|
| 408 |
+
<button class="play-btn" onclick="speakApology()">
|
| 409 |
+
π Play Apology
|
| 410 |
+
</button>
|
| 411 |
+
</div>
|
| 412 |
+
|
| 413 |
<script>
|
| 414 |
function speakApology() {
|
| 415 |
+
const text = document.getElementById('apologyText').innerText;
|
| 416 |
+
const utterance = new SpeechSynthesisUtterance(text);
|
| 417 |
utterance.lang = 'en-US';
|
| 418 |
+
utterance.rate = 0.9;
|
| 419 |
+
utterance.pitch = 0.8;
|
| 420 |
+
|
| 421 |
+
function loadAndSpeak() {
|
| 422 |
+
const voices = window.speechSynthesis.getVoices();
|
| 423 |
+
const preferredVoice = voices.find(voice =>
|
| 424 |
+
voice.lang === 'en-US' && voice.name.includes('Female')
|
| 425 |
+
) || voices.find(voice => voice.lang === 'en-US');
|
| 426 |
+
|
| 427 |
+
if (preferredVoice) {
|
| 428 |
+
utterance.voice = preferredVoice;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 429 |
}
|
| 430 |
+
window.speechSynthesis.speak(utterance);
|
| 431 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 432 |
|
| 433 |
+
if (window.speechSynthesis.getVoices().length === 0) {
|
| 434 |
+
window.speechSynthesis.onvoiceschanged = loadAndSpeak;
|
| 435 |
+
} else {
|
| 436 |
+
loadAndSpeak();
|
| 437 |
+
}
|
| 438 |
+
}
|
| 439 |
+
</script>
|
| 440 |
+
{% endif %}
|
| 441 |
|
| 442 |
+
<div class="navigation">
|
| 443 |
+
<a href="{{ url_for('index') }}" class="nav-link">Back to Excuse Generator</a>
|
| 444 |
+
</div>
|
| 445 |
+
</div>
|
| 446 |
+
</body>
|
| 447 |
+
</html>
|