code n' tell 17/02/2014
DESCRIPTION
Um movimento para compartilhar trocar e experiênciasTRANSCRIPT
![Page 1: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/1.jpg)
![Page 2: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/2.jpg)
ORGANIZAÇÃO
Realização e Apoio
Donini
Guilherme
Guto
![Page 3: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/3.jpg)
CODE N’ TELL?
Um movimento para compartilhar trocar e experiências
Learn, teach & network
![Page 4: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/4.jpg)
RECADOS GERAIS
• O evento está sendo gravado e será publicado na próxima semana
• Os códigos dos exemplos apresentados estarão disponíveis no Github
• Criamos um Grupo no FB - facebook.com/groups/codentell
![Page 5: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/5.jpg)
AGENDA
• HTML5 e CSS3 (45 min.) • Intervalo (20 min.) BREAK!!! • GRUNT e SASS (45 min.) • Encerramento
![Page 6: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/6.jpg)
HTML5
Semântica
![Page 7: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/7.jpg)
HTML5
HTML4- tradicional
vs HTML5 semânticio
![Page 8: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/8.jpg)
ABSTRAÇÃO
![Page 9: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/9.jpg)
HTML5
![Page 10: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/10.jpg)
![Page 11: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/11.jpg)
<header>
• O elemento <header> é usado para definir o cabeçalho de uma página ou sessão;
• Dentro do <header> podemos inserir o elemento <hgroup>
<header> <hgroup> <h1>Entendo a estrutura e semântica do HTML5</h1> <h2>Conhecendo o HTML5</h2> </hgroup> </header>
![Page 12: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/12.jpg)
<nav>
• O elemento <nav> serve para agrupar uma lista de links para outras partes do site, seja essa lista de navegação local ou global.
<nav> <ul class="menu"> <li><a href="inicio.html">Home</a></li> <li><a href="sobre.html">Sobre</a></li> <li><a href="agenda.html">Agenda</a></li> <li><a href="contato.html">Contato</a></li> </ul> </nav>
![Page 13: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/13.jpg)
<section>
• O elemento <section> é o menos especifico entre as novas tags do HTML5. A diferença do <section> para um <div>
<section> <article> (...) </article> </section>
![Page 14: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/14.jpg)
<article>
• O elemento <article> serve para identificar um conteúdo independente e de maior relevância dentro da página, que pode ser distribuido via feed, como um post, artigo ou bloco de comentários. <article> <header> <h1>Título...</h1> </header> conteúdo... <footer> dados de rodapé... </footer> </article>
![Page 15: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/15.jpg)
<aside>
• O elemento <aside> serve para mostrar conteúdos que fazem referência ao conteúdo principal à sua volta, como informações, blocos de navegação ou até mesmo publicidade.
<aside> <figure> <figcaption>Participe</figcaption> <img src=“promocao.png” alt=“Promoção X” /> </figure> </aside>
![Page 16: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/16.jpg)
<footer>
• O elemento <footer> representa o rodapé de um documento ou de uma sessão específica do mesmo, podendo conter informações relacionadas ao autor e ao copyright, blocos de navegação ou links relacionados. <footer> <nav> <ul> <li><a href="inicio.html">Home</a></li>
(...) </ul> </nav> <small>Todos os direitos reservados</small> </footer>
![Page 17: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/17.jpg)
OUTROS ELEMENTOS
<time datetime="2017-02-17”>17/02/2014</time>
<video controls>
<source src=code-n-tell.webm type=video/webm>
</video>
<progress value="22" max="100”></progress>
![Page 18: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/18.jpg)
h#p://html5doctor.com/downloads/h5d-‐sec6oning-‐flowchart.pdf
![Page 19: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/19.jpg)
CSS
Elementos de estilo
![Page 20: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/20.jpg)
BOAS PRÁTICAS
• Quando utilizo class e quando utilizo id
• Combinar elementos • Uso de múltiplas classes • Use comentários Utilize nomes condizentes
• Utilize text-transform • Utilize múltiplos arquivos
![Page 21: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/21.jpg)
It’s time to break and…
Learn, teach & network
![Page 22: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/22.jpg)
SASS
![Page 23: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/23.jpg)
3 meses se passaram e..
• Precisa mudar as cores principais do site
• Um comportamento geral mudou • O arquivo de css é gigante e você precisa mexer em alguns módulos
![Page 24: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/24.jpg)
![Page 25: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/25.jpg)
![Page 26: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/26.jpg)
SASS
• Pre-processador de css • Uso de variáveis • Mixins • Importação de arquivos
![Page 27: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/27.jpg)
Escrita em SASS
Compilação para CSS
Geração do arquivo
CSS
SASS - Processo
![Page 28: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/28.jpg)
SASS - Variáveis
• Permite o reuso de atributos $corDoSite = #c6c6c6; (...) .titulo{ background-color: $corDoSite; } (...) footer{ color: $corDoSite }
![Page 29: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/29.jpg)
SASS - Mixins
• Permite o reuso de declarações @mixin vendor-prefix($name, $argument) { -webkit-#{$name}: #{$argument}; -ms-#{$name}: #{$argument}; -moz-#{$name}: #{$argument}; -o-#{$name}: #{$argument}; #{$name}: #{$argument}; } p { @include vendor-prefix(hyphens, auto) }
![Page 30: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/30.jpg)
SASS - Partials
• Permite a quebra em múltiplos arquivos /*_botoes.scss*/
.btn-large{ background-color: green; width: 50px; height: 50px; }
/*main.scss*/ @import botoes; footer{ font-size: 15px; }
![Page 31: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/31.jpg)
<OFF-TOPIC>
![Page 32: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/32.jpg)
![Page 33: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/33.jpg)
![Page 34: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/34.jpg)
![Page 35: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/35.jpg)
</OFF-TOPIC>
![Page 36: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/36.jpg)
Tarefas de um web-developer
• Compilar arquivos SASS • Concatenar arquivos JS • Minificar CSS e JS • Otimizar imagens • Gerar images sprites (não o refri)
• Publicar no FTP • [INSERT OTHERS HERE]
![Page 37: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/37.jpg)
GRUNT
JS Task Runner
![Page 38: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/38.jpg)
ALERTA: Ele usa linha de comando!
![Page 39: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/39.jpg)
Passo à passo
• Instalar NodeJS • Instalar grunt-cli
• Instalar packages desejadas npm install –g grunt-cli
npm install grunt-contrib-sass –-save-dev
![Page 40: CODE N' TELL 17/02/2014](https://reader031.vdocuments.mx/reader031/viewer/2022020307/559894b61a28abd9348b4590/html5/thumbnails/40.jpg)
PRÓXIMO EVENTO PRECISAMOS DE VOCÊ!