-
Notifications
You must be signed in to change notification settings - Fork 0
/
administrador.html
300 lines (245 loc) · 7.84 KB
/
administrador.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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Centro Integrado de FP</title>
<style>
* {
margin: 0;
padding: 0;
}
/*Para el grid
*/
html,
body {
height: 100%;
}
/* button{
background-image: url("bars-solid.svg");
background-repeat: no-repeat;
background-position-x: center;
background-position-y: center;
background-size: 80%;
height: 50px;
width: 50px;
border-radius: 1em;
}*/
/*Quitar los puntos*/
a {
text-decoration: none;
}
/*Quitar los puntos*/
header ul {
font-size: 30px;
/*1.5em*/
font-family: "Arial";
list-style-type: none;
display: flex;
flex-direction: column;
}
header li a {
display: flex;
/*poner el color segun*/
background-color: azure;
height: 40px;
/*para centrar el menu*/
align-items: center;
justify-content: center;
}
body {
display: grid;
grid-template-areas: "header"
"login"
"info"
"footer";
/*filas*/
grid-template-rows: auto 1fr 3fr auto;
grid-template-columns: 1fr;
}
header li a:hover {
background-color: blue;
color: azure;
}
/*header li a:visited {
background-color: rgb(255, 0, 234);
color: azure;
}*/
/*Estilo icono de menu*/
.menu {
background-image: url("bars-solid.svg");
background-repeat: no-repeat;
background-position-x: center;
background-position-y: center;
background-size: 80%;
height: 50px;
width: 50px;
border-radius: 1em;
display: inline-block;
}
/*Vista movil*/
span {
display: flex;
justify-content: space-between;
/*si las imagenes son del mismo tamaño , mejor poner align-items: center*/
align-items: baseline;
}
img {
width: 60px;
}
header {
background-color: palevioletred;
grid-area: header;
}
footer {
grid-area: footer;
background-color: palevioletred;
text-align: center;
}
@media (max-width:600px) {
.mostrar {
display: flex;
}
.ocultar {
display: none;
}
}
section:nth-of-type(1) {
grid-area: login;
background-color: cornflowerblue;
}
section:nth-of-type(2) {
grid-area: info;
background-color: azure;
}
/**/
@media(min-width:600px) {
body {
display: grid;
grid-template-areas: "header header"
" info login"
"footer footer";
/*filas*/
grid-template-rows: auto 1fr auto;
grid-template-columns: 3fr 1fr;
}
.menu {
display: none;
}
header ul {
flex-direction: row;
justify-content: space-evenly;
/*si ponemos, en la li(flex-grow: 1),esta propiedad sobraría co*/
}
#sun {
width: 100%;
}
li {
/*-flex-grow: 1;*/
width: 20%;
/*Con este, hay que poner al ul justify content: space-evenly*/
}
nav {
display: flex;
}
ul {
flex-grow: 1;
align-items: center;
}
footer {
justify-content: center;
}
}
</style>
</head>
<body>
<header>
<nav>
<span>
<a href="#">
<img src="logoEby.png" alt="logoEby">
</a>
<button class="menu" id="menu"></button>
</span>
<ul class="ocultar" id="lista">
<li><a href="index.html">Inicio</a></li>
<li><a href="administrador.html">Administrador</a></li>
<li><a href="#">El Centro</a></li>
<li><a href="#">Contacto</a></li>
<li><a href="#">Oferta</a></li>
<li><a href="#">Alumnado</a></li>
</ul>
</nav>
</header>
<section>
<h2>Administrador</h2>
<img src="sunflower.jpg" alt="sunflower" id="sun">
</section>
<section>
<h2>Rellene los datos</h2>
<form action="#" method="post" id="formulario">
<fieldset id="alumno">
<legend>Login</legend>
<label>Nombre: <input type="text"></label><br><br>
<label>Apellido: <input type="text"></label><br><br>
<label>Curso: <input type="text"></label><br><br>
<label>Correo: <input type="email"></label><br><br>
<label>Contraseña: <input type="password"></label><br><br>
<input type="radio" id="profe" name="elegir" value="profe">
<label for="male">Profesor</label>
<input type="radio" id="alumno" name="elegir" value="alumno">
<label for="female">Alumno</label>
<br><br><br>
<input type="submit" value="Enviar" name="enviar">
</fieldset>
</form>
</section>
<footer>
<small>©Juan de Colonia</small>
</footer>
<!--13/04/2021-->
<script>
/*
let mq = window.matchMedia("(min-width:600px)");
function screenTest(e){
let lista = document.querySelector("ul");
if(e.matches){
lista.className="mostrar";
}else{
lista.className="ocultar";
}
}
mq.addListener(screenTest);
*/
/* document.getElementById("menu").addEventListener("click", menu);
function menu(e) {
e.preventDefault();
let lista = document.getElementById("lista");
if (lista.className == "ocultar") {
lista.className = "mostrar";
} else {
lista.className = "ocultar";
}
}*/
document.getElementById("menu").addEventListener("click", menu);
document.getElementsByTagName("h2")[0].addEventListener("click", escoge);
function menu(e) {
e.preventDefault();
let lista = document.getElementById("lista");
if (lista.className == "ocultar") {
lista.className = "mostrar";
} else {
lista.className = "ocultar";
}
}
function escoge(e) {
e.preventDefault();
let caja = document.getElementById("alumno");
if (caja.id == "prefesor") {
caja.id("alumno");
}
}
</script>
</body>
</html>