-
Notifications
You must be signed in to change notification settings - Fork 0
/
fundamentos_web.html
289 lines (267 loc) · 10.5 KB
/
fundamentos_web.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="generator" content="pandoc">
<title></title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="../rsc/reveal.js/css/reveal.min.css"/>
<style type="text/css">code{white-space: pre;}</style>
<link rel="stylesheet" href="../rsc/reveal.js/css/theme/simple.css" id="theme">
<link rel="stylesheet" href="../rsc/style.css"/>
<link rel="stylesheet" media="print" href="../rsc/reveal.js/css/print/pdf.css" />
<!--[if lt IE 9]>
<script src="../rsc/reveal.js/lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<div class="slides">
<section><section id="fundamentos-de-la-web" class="titleslide slide level1"><h1>Fundamentos de la web</h1></section><section id="esquema-básico-web" class="slide level2">
<h1>Esquema básico web</h1>
<ul>
<li>Cliente/Servidor</li>
<li>Navegador y Servidor hablan http</li>
<li>Cliente pide una <strong>url</strong> y el servidor le devuelve el <strong>archivo</strong> correspondiente
<ul>
<li>html</li>
<li>css</li>
<li>js</li>
<li>json, xml</li>
<li>jpg, png, gif, pdf, mpeg … (lo que sea)</li>
</ul></li>
</ul>
</section><section class="slide level2">
<ul>
<li class="fragment">¿Dónde está php, java, python o ruby?</li>
<li class="fragment">¿Dónde se ejecuta javascript?</li>
</ul>
</section><section id="html" class="slide level2">
<h1>HTML</h1>
<pre><code><!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>Page Title</h1>
<p>This is a really interesting paragraph.</p>
</body>
</html></code></pre>
<p>Muchos <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element">Elementos</a></p>
<p>Estructura y contenido. <strong>NO estilo</strong></p>
</section><section class="slide level2">
<p>Atributos:</p>
<pre><code><a href="http://d3js.org/">The D3 website</a></code></pre>
<p>Clases:</p>
<pre><code><p class="importante"> Se termina la corrupción </p> </code></pre>
<p>Ids:</p>
<pre><code><div id="contenido"></div> </code></pre>
<p>Comentarios:</p>
<pre><code><!-- Esto está comentado --> </code></pre>
</section><section id="dom" class="slide level2">
<h1>DOM</h1>
<p>Jerarquía (o árbol) con padres, hijos, vecinos, ascendientes y descendientes.</p>
<pre><code><html>
<body>
<h1>Breaking News</h1>
<p></p>
</body>
</html></code></pre>
<p><strong>Abre la herramienta de desarrollo de tu navegador: F12</strong></p>
</section><section id="modelo-de-cajas" class="slide level2">
<h1>Modelo de cajas</h1>
<ul>
<li>Todo está en cajas.</li>
<li><p>Los principales: <strong>div</strong> y <strong>span</strong></p>
<pre><code>display:block, display:inline, display:none</code></pre></li>
<li><p>Margin, Border y Padding</p></li>
</ul>
</section><section id="css" class="slide level2">
<h1>CSS</h1>
<pre><code>body {
background-color: black;
color: white;
}</code></pre>
<p>Siempre esto:</p>
<pre><code>selector[, selector2, selector3, ...] {
propiedad: valor;
propiedad: valor;
propiedad: valor;
propiedad: valor;
}</code></pre>
</section><section id="selectores" class="slide level2">
<h1>Selectores</h1>
<p>Por etiqueta</p>
<pre><code>div /* Selecciona todos los divs */</code></pre>
<p>Por clase</p>
<pre><code>.importante /* Selecciona todo lo que tenga clase "importante" */
div.importante /* Sólo div con clase "importante" */
.uno.dos /* Con varias clases */</code></pre>
<p>Por ID</p>
<pre><code>#contenido /* El único elemento con id "contenido" */
#contenido.seleccionado /* Sólo cuando tiene esa clase */</code></pre>
</section><section id="estilos" class="slide level2">
<h1>Estilos</h1>
<ul>
<li><p>Una lista enorme de <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference">propiedades</a></p></li>
<li>Color:
<ul>
<li>Colores con nombre: orange</li>
<li>Hex: #3388aa o #38a</li>
<li>RGB: rgb(10, 150, 20)</li>
<li>RGB con alpha: rgba(10, 150, 20, 0.5)</li>
</ul></li>
<li>Medidas:
<ul>
<li>630px</li>
<li>23m</li>
<li>45%</li>
</ul></li>
</ul>
</section><section id="section" class="slide level2">
<h1></h1>
<iframe width="100%" height="800" src="http://jsbin.com/cuxuc/6/embed">
<figure>
<img src="../rsc/images/link.png" alt="http://jsbin.com/cuxuc/6/embed" /><figcaption><a href="http://jsbin.com/cuxuc/6/embed">http://jsbin.com/cuxuc/6/embed</a></figcaption>
</figure>
</iframe>
</section><section id="dónde-poner-los-estilos" class="slide level2">
<h1>¿Dónde poner los estilos?</h1>
<ul>
<li><p>Nunca:</p>
<pre><code><p style="color: blue; font-size: 48px;
font-style: italic;">No hacer</p></code></pre></li>
<li><p>Embebidos en el <strong>head</strong>:</p>
<pre><code><style type="text/css">
div {
background-color: red;
font-size: 24px;
font-weight: bold;
}
</style></code></pre></li>
</ul>
</section><section id="dónde-poner-los-estilos-1" class="slide level2">
<h1>¿Dónde poner los estilos?</h1>
<ul>
<li><p>Mejor en su archivo:</p>
<pre><code><head>
<link rel="stylesheet" href="style.css">
</head></code></pre></li>
<li><p>Se aplican en <strong>cascada</strong>:</p>
<pre><code><head>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="sobrescribe.css">
</head></code></pre></li>
</ul>
</section><section id="javascript" class="slide level2">
<h1>Javascript</h1>
<ul>
<li>Interpretado</li>
<li>Dinámico</li>
<li>NO tipado</li>
</ul>
<hr>
<ul>
<li>Mala fama… medio merecida</li>
<li>Súper optimizado</li>
</ul>
</section><section id="dónde-poner-el-código-javascript" class="slide level2">
<h1>¿Dónde poner el código javascript?</h1>
<ul>
<li><p>Embebido en el <strong>body</strong>:</p>
<pre><code><script type="text/javascript">
alert("Hello, world!");
</script></code></pre></li>
<li><p>Mejor en su archivo (head o body):</p>
<pre><code><script rel="text/javascript" href="micodgio.js">
</script></code></pre></li>
</ul>
</section><section id="tipos" class="slide level2">
<h1>Tipos</h1>
<ul>
<li class="fragment">Variables</li>
<li class="fragment">Strings</li>
<li class="fragment">Arrays</li>
<li class="fragment">Objectos</li>
<li class="fragment">Funciones
<ul>
<li class="fragment">lambdas y nombradas</li>
<li class="fragment">clousures</li>
<li class="fragment">callbacks</li>
</ul></li>
<li class="fragment">JSON</li>
</ul>
</section><section id="ojo-fallos-comunes" class="slide level2">
<h1>Ojo, fallos comunes</h1>
<ul>
<li class="fragment">No se define el tipo, una variable puede cambiar su tipo sin más</li>
<li class="fragment">Elevado de la declaración de variables</li>
<li class="fragment">El ámbito de las variables es la función</li>
<li class="fragment">Si no pones <em>var</em> se declara como varable <em>global</em>. En <em>window</em></li>
</ul>
</section><section id="section-1" class="slide level2">
<h1></h1>
<iframe width="100%" height="800" src="http://jsbin.com/nosuz/5/embed?js,console">
<figure>
<img src="../rsc/images/link.png" alt="http://jsbin.com/nosuz/5/embed?js,console" /><figcaption><a href="http://jsbin.com/nosuz/5/embed?js,console">http://jsbin.com/nosuz/5/embed?js,console</a></figcaption>
</figure>
</iframe>
</section><section id="svg" class="slide level2">
<h1>SVG</h1>
<ul>
<li>Imagen vectorial basada en texto</li>
<li><p><strong>Se puede embeber en el DOM</strong></p>
<pre><code><svg witdth="800px" height="600px"> </svg></code></pre></li>
<li>También afectado por CSS
<ul>
<li>fill</li>
<li>stroke</li>
<li>stroke-width</li>
<li>opacity</li>
</ul></li>
<li><p>Mucho material en este <a href="http://tutorials.jenkov.com/svg/index.html">manual</a></p></li>
</ul>
</section><section id="ejemplo-svg" class="slide level2">
<h1>Ejemplo SVG</h1>
<pre><code><svg width="800" height="500">
<circle cx="25" cy="25" r="22"
fill="blue" stroke="gray" stroke-width="2"/>
<line x1="0" y1="0" x2="500" y2="50" stroke="black"/>
</svg></code></pre>
</section><section id="section-2" class="slide level2">
<h1></h1>
<iframe width="100%" height="800" src="http://jsbin.com/meruf/4/embed?html,output">
<figure>
<img src="../rsc/images/link.png" alt="http://jsbin.com/meruf/4/embed?html,output" /><figcaption><a href="http://jsbin.com/meruf/4/embed?html,output">http://jsbin.com/meruf/4/embed?html,output</a></figcaption>
</figure>
</iframe>
</section></section>
</div>
</div>
<script src="../rsc/reveal.js/lib/js/head.min.js"></script>
<script src="../rsc/reveal.js/js/reveal.min.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: false,
theme: 'simple', // available themes are in /css/theme
transition: 'linear', // default/cube/page/concave/zoom/linear/fade/none
// Optional libraries used to extend on reveal.js
dependencies: [
{ src: '../rsc/reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: '../rsc/reveal.js/plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: '../rsc/reveal.js/plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: '../rsc/reveal.js/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
// { src: '../rsc/reveal.js/plugin/search/search.js', async: true, condition: function() { return !!document.body.classList; }, }
// { src: '../rsc/reveal.js/plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } }
]});
</script>
</body>
</html>