-
Notifications
You must be signed in to change notification settings - Fork 0
/
mural.html
145 lines (133 loc) · 6.67 KB
/
mural.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
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Karla:wght@400;700&family=Rubik:wght@400;500;700&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="./css/tailwind.min.css">
<link rel="stylesheet" href="./css/custom.css">
<script src="./js/alpine.min.js"></script>
<title>Mural de Recados</title>
</head>
<body x-data="modal()" class="text-gray-900 antialiased">
<div class="flex flex-col w-11/12 mx-auto min-h-screen">
<div id="navbar" class="flex items-center justify-between py-5">
<figure>
<img src="./img/logo.svg" alt="Logo">
</figure>
<nav class="flex space-x-16">
<a href="./index.html" class="text-gray-500 hover:text-gray-900">Home</a>
<a href="./mural.html" class="text-gray-500 hover:text-gray-900">Mural de Recados</a>
<a href="./sobre.html" class="text-gray-500 hover:text-gray-900">Sobre</a>
<a href="./portifolio.html" class="text-gray-500 hover:text-gray-900">Portfólio</a>
<a href="./contato.html" class="text-gray-500 hover:text-gray-900">Contato</a>
</nav>
<button
@click="abrirModal"
class="text-blue-600 text-sm border border-blue-600 py-2 px-4 rounded hover:text-white hover:bg-blue-600 hover:border-none transition duration-200 ease-linear">
Créditos
</button>
</div>
<div class="flex flex-col flex-grow">
<div class="flex items-center py-10">
<div class="mr-32">
<h1 class="font-medium text-4xl">Mural de Recados</h1>
</div>
<div class="text-left w-1/2 text-gray-500">
Sua opinião é importante!
Para nos ajudar a melhorar ainda mais a sua experiência com nosso site, preencha o formulário abaixo:
</div>
</div>
<div class="flex space-x-12" x-data="muralDeRecados()">
<form @submit.prevent="addRecado" class="w-1/2 py-6">
<div class="mb-3">
<label class="block mb-2 text-sm text-gray-600 dark:text-gray-400">Nome</label>
<input type="text" name="nome" x-model="nome" placeholder="Seu nome" class="w-full px-3 py-2 placeholder-gray-300 border border-gray-300 rounded-md focus:outline-none focus:ring focus:ring-indigo-100 focus:border-indigo-300 dark:bg-gray-700 dark:text-white dark:placeholder-gray-500 dark:border-gray-600 dark:focus:ring-gray-900 dark:focus:border-gray-500" />
</div>
<div class="mb-3">
<label class="block mb-2 text-sm text-gray-600 dark:text-gray-400">Mensagem</label>
<textarea rows="2" name="mensagem" x-model="mensagem" placeholder="Mensagem" class="w-full px-3 py-2 placeholder-gray-300 border border-gray-300 rounded-md focus:outline-none focus:ring focus:ring-indigo-100 focus:border-indigo-300 dark:bg-gray-700 dark:text-white dark:placeholder-gray-500 dark:border-gray-600 dark:focus:ring-gray-900 dark:focus:border-gray-500"></textarea>
</div>
<button
type="submit"
class="w-full text-sm text-white border bg-blue-600 hover:bg-white hover:border-blue-600 hover:text-blue-600 p-3 rounded transition duration-200 ease-linear">
Enviar Mensagem
</button>
</form>
<div class="w-1/2 py-6">
<template x-for="(recado, indice) in recados" :key="indice">
<div class="w-full relative mx-auto rounded bg-white shadow p-4 text-gray-800 font-light">
<div class="absolute top-0 right-0">
<button @click="apagarRecado(indice)" class="mt-2 mr-2 px-2 rounded bg-red-500 text-white text-sm">X</button>
</div>
<h6 x-text="recado.nome" class="font-bold text-sm uppercase mb-3"></h6>
<div class="w-full">
<p x-text="recado.mensagem" class="text-sm leading-tight text-gray-600"></p>
</div>
</div>
</template>
</div>
</div>
</div>
</div>
<div x-show="open" @click="open = false" class="min-w-screen h-screen fixed left-0 top-0 flex justify-center items-center inset-0 z-50 outline-none focus:outline-none"
style="background: rgba(0,0,0,.2);" id="modal">
<div class="w-full max-w-lg p-5 relative mx-auto my-auto rounded-xl shadow-lg bg-white ">
<div class="">
<div class="text-center p-5 flex-auto justify-center">
<h2 class="text-xl font-bold py-4 ">
Desenvolvimento de Software para WEB
</h3>
<p class="text-lg text-gray-500 px-8">
Bebeto Alves da Costa
<br>
Vinny Barros Paiva
</p>
</div>
<div class="p-3 mt-2 text-center space-x-4 md:block">
<button
@click="open = false"
class="rounded bg-red-500 text-white text-sm px-4 py-2 hover:bg-red-600 shadow">
Fechar
</button>
</div>
</div>
</div>
</div>
<script>
function muralDeRecados()
{
return {
nome: "",
mensagem: "",
recados: [],
addRecado() {
this.recados.push({
nome: this.nome,
mensagem: this.mensagem
});
this.nome = ""
this.mensagem = ""
},
apagarRecado(indice)
{
this.recados = this.recados.filter((recado, recadoIndice) => {
return indice !== recadoIndice
})
}
}
};
function modal()
{
return {
open: false,
abrirModal() {
this.open = ! this.open
}
}
};
</script>
</body>
</html>