Skip to content

Instantly share code, notes, and snippets.

View glaucia86's full-sized avatar
💭
Are you coding?! Yep! Always!

Glaucia Lemos glaucia86

💭
Are you coding?! Yep! Always!
View GitHub Profile
<!DOCTYPE html>
<html lang="pt-br">
<head>
<title>Tutorial - Code4Coders</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport" />
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
@import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700);
body {
margin: 0;
background: #000;
overflow: hidden;
}
.intro {
position: absolute;
@import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700);
body {
margin: 0;
background: #000;
overflow: hidden;
}
.intro {
position: absolute;
var width = window.innerWidth;
var height = window.innerHeight;
var intro = document.getElementsByClassName("intro")[0];
intro.style.fontSize = width / 30 + "px";
window.addEventListener("resize", function() {
width = canvas.width = window.innerWidth;
height = canvas.height = window.innerHeight;
var width = window.innerWidth;
var height = window.innerHeight;
var intro = document.getElementsByClassName("intro")[0];
var historia = document.getElementsByClassName("historia")[0];
var paragrafos = document.getElementsByClassName("paragrafos")[0];
intro.style.fontSize = width / 30 + "px";
historia.style.fontSize = width / 20 + "px";
paragrafos.style.height = height + "px";
var width = window.innerWidth;
var height = window.innerHeight;
var intro = document.getElementsByClassName("intro")[0];
var historia = document.getElementsByClassName("historia")[0];
var paragrafos = document.getElementsByClassName("paragrafos")[0];
var som = document.getElementById("som");
intro.style.fontSize = width / 30 + "px";
historia.style.fontSize = width / 20 + "px";
var width = window.innerWidth;
var height = window.innerHeight;
var intro = document.getElementsByClassName("intro")[0];
var historia = document.getElementsByClassName("historia")[0];
var paragrafos = document.getElementsByClassName("paragrafos")[0];
var som = document.getElementById("som");
intro.style.fontSize = width / 30 + "px";
historia.style.fontSize = width / 20 + "px";
@glaucia86
glaucia86 / index.html
Created March 27, 2017 03:52
ngIf with else
<div *ngIf="produtos.length > 0; else empty"><h2>Produtos</h2></div>
<ng-template #empty><h2>Não tem produtos.</h2></ng-template>
@glaucia86
glaucia86 / index.html
Created March 27, 2017 03:59
as keyword
<div *ngFor="let dog of dogs | slice:0:2 as total; index as = i">
{{i+1}}/{{total.length}}: {{dog.name}}
</div>
@glaucia86
glaucia86 / index.html
Created March 27, 2017 04:02
good way as
<div *ngIf="produto | async as produtoModel">
<h2>{{ produtoModel.nome }}</h2>
<small>{{ produtoModel.data }}</small>
</div>