-
Notifications
You must be signed in to change notification settings - Fork 0
/
perguntas.html
286 lines (243 loc) · 7.76 KB
/
perguntas.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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
<!DOCTYPE html>
<html>
<head>
<title>JardimCotoncio</title>
<link type="images/iconesite.png" sizes="16x16" rel="icon" href="images/iconesite.png">
<style>
body {
margin: 0;
padding: 0;
overflow: hidden;
font-family: 'Press Start 2P', cursive;
}
#animation-container {
width: 100%;
height: 100vh;
position: relative;
background-image: url('images/iniciolofi.gif');
background-repeat: no-repeat;
background-size: cover;
}
.intro-container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
color: #ffffff;
animation: fade-in 1s forwards;
}
.intro-text {
font-size: 36px;
margin-bottom: 20px;
animation: bounce-in 1s;
}
.intro-details {
font-size: 18px;
margin-bottom: 10px;
animation: slide-in 1s;
}
@keyframes fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes bounce-in {
from {
transform: scale(0.5);
}
to {
transform: scale(1);
}
}
@keyframes slide-in {
from {
transform: translateX(-200px);
}
to {
transform: translateX(0);
}
}
.question-container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
color: #ffffff;
}
.question-text {
font-size: 24px;
margin-bottom: 20px;
animation: slide-up 1s;
}
.answer-options {
display: flex;
justify-content: center;
animation: slide-up 1s;
}
.answer-option {
margin: 0 10px;
padding: 10px 20px;
background-color: #4caf50;
color: #ffffff;
border: none;
cursor: pointer;
border-radius: 5px;
font-family: 'Press Start 2P', cursive;
font-size: 18px;
transition: background-color 0.3s, transform 0.2s;
}
.answer-option:hover {
background-color: #45a049;
transform: scale(1.1);
}
/* Estilo para o botão skip */
.skip-button {
position: absolute;
top: 20px;
left: 20px;
background-color: #134b03;
color: white;
padding: 10px 20px;
cursor: pointer;
border-radius: 5px;
font-family: 'Press Start 2P', cursive;
font-size: 18px;
z-index: 1000;
animation: fade-in 1s;
}
/* Animação para o botão skip */
@keyframes fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
</style>
<link href="https://fonts.googleapis.com/css?family=Press+Start+2P" rel="stylesheet">
<link type="images/iconesite.png" sizes="16x16" rel="icon" href="images/iconesite.png">
</head>
<body>
<div id="animation-container"></div>
<!-- Botão Skip -->
<div id="skip-button" class="skip-button" onclick="skipQuestions()">SKIP</div>
<div id="animation-container"></div>
<!-- Áudio para tocar ao selecionar uma pergunta -->
<audio id="questionSound" src="musicas/plin.mp3"></audio>
<script>
// Array de perguntas e respostas
const questions = [
// Perguntas sobre preferências pessoais em relação às plantas
{
question: 'Qual é a sua planta favorita?',
options: ['Rosa', 'Lírio', 'Suculenta', 'Orquídea', 'Outra']
},
{
question: 'Você prefere plantas de interior ou de exterior?',
options: ['Plantas de interior', 'Plantas de exterior', 'Ambos']
},
{
question: 'Você gosta de cultivar suas próprias ervas e temperos?',
options: ['Sim, adoro cultivar minhas ervas', 'Não, prefiro comprar prontas']
},
{
question: 'Qual é a cor de flor que você mais gosta?',
options: ['Vermelho', 'Azul', 'Amarelo', 'Branco', 'Outra']
},
// Perguntas sobre experiências com jardinagem
{
question: 'Você já teve uma horta em casa?',
options: ['Sim, já tive', 'Não, nunca tive']
},
{
question: 'Qual é a sua maior conquista na jardinagem?',
options: ['Cultivar uma planta rara', 'Fazer uma planta florescer pela primeira vez', 'Outra']
},
{
question: 'Você costuma presentear pessoas com plantas?',
options: ['Sim, gosto de presentear com plantas', 'Não, prefiro outros presentes']
},
// Perguntas sobre cuidados com as plantas
{
question: 'Qual é o maior desafio que você enfrenta ao cuidar das suas plantas?',
options: ['Regar na medida certa', 'Controlar pragas e doenças', 'Propagar as plantas', 'Outro']
},
{
question: 'Você prefere utilizar fertilizantes orgânicos ou químicos em suas plantas?',
options: ['Fertilizantes orgânicos', 'Fertilizantes químicos', 'Ambos']
},
{
question: 'Como você se sente quando suas plantas florescem ou dão frutos?',
options: ['Feliz e orgulhoso', 'Motivado a cuidar melhor das plantas', 'Outro']
}
// Adicione mais perguntas aqui
];
// Variáveis para controle
let currentQuestion = 0;
const animationContainer = document.getElementById('animation-container');
// Função para exibir a frase inicial
function showIntro() {
const introContainer = document.createElement('div');
introContainer.className = 'intro-container';
const introText = document.createElement('div');
introText.className = 'intro-text';
introText.textContent = 'VAMOS CONHECER MAIS SOBRE VOCÊ?';
const introDetails = document.createElement('div');
introDetails.className = 'intro-details';
introDetails.textContent = 'Responda algumas perguntas sobre plantas';
introContainer.appendChild(introText);
introContainer.appendChild(introDetails);
animationContainer.innerHTML = '';
animationContainer.appendChild(introContainer);
setTimeout(() => {
showNextQuestion();
}, 3000); // Tempo de espera antes de mostrar as perguntas (em milissegundos)
}
// Função para exibir a próxima pergunta
function showNextQuestion() {
if (currentQuestion >= questions.length) {
// Todas as perguntas foram respondidas
// Redirecionar para o arquivo "conteudo.html"
window.location.href = 'conteudo.html';
return;
}
const question = questions[currentQuestion];
const questionContainer = document.createElement('div');
questionContainer.className = 'question-container';
const questionText = document.createElement('div');
questionText.className = 'question-text';
questionText.textContent = question.question;
const answerOptions = document.createElement('div');
answerOptions.className = 'answer-options';
question.options.forEach(option => {
const answerOption = document.createElement('button');
answerOption.className = 'answer-option';
answerOption.textContent = option;
answerOption.addEventListener('click', () => handleAnswer(option));
answerOptions.appendChild(answerOption);
});
questionContainer.appendChild(questionText);
questionContainer.appendChild(answerOptions);
animationContainer.innerHTML = '';
animationContainer.appendChild(questionContainer);
const questionSound = document.getElementById('questionSound');
questionSound.play();
}
function handleAnswer(answer) {
currentQuestion++;
showNextQuestion();
}
showIntro();
// Função para pular para a próxima página
function skipQuestions() {
window.location.href = 'conteudo.html';
}
</script>
</body>
</html>