Skip to content

Instantly share code, notes, and snippets.

@pinceladasdaweb
Last active December 31, 2015 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pinceladasdaweb/7988060 to your computer and use it in GitHub Desktop.
Save pinceladasdaweb/7988060 to your computer and use it in GitHub Desktop.
Hello World Firefox OS
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World Firefox OS (Primeira Aplicação)</title>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<article class="content">
<h1>Hello World <br>Firefox OS</h1>
<img id="smile" src="images/smile.png" alt="Smile" width="200" height="200">
</article>
<script src="js/main.js"></script>
</body>
</html>
* {
margin: 0;
padding: 0;
border: none;
list-style: none;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
body, html {height: 100%}
.content {
padding-top: 86px;
margin: 0 auto;
height: 100%;
background-color: #070072;
}
.content h1 {
font: 28px Tahoma, sans-serif;
text-align: center;
width: 250px;
margin: 0 auto 20px;
color: #FFF;
text-transform: uppercase;
}
#smile {
display: block;
margin: 0 auto;
cursor: pointer;
}
#smile.is-active {
-moz-animation: girar 0.5s;
animation: girar 0.5s;
}
@keyframes girar {
0% {
-moz-transform: rotate(0deg);
transform: rotate(0deg);
}
25% {
-moz-transform: rotate(30deg);
transform: rotate(30deg);
}
75% {
-moz-transform: rotate(-30deg);
transform: rotate(-30deg);
}
100% {
-moz-transform: rotate(0deg);
transform: rotate(0deg);
}
}
(function () {
'use strict';
var $smile = document.getElementById('smile');
$smile.onclick = function () {
if (this.className === '') {
this.className = 'is-active';
} else {
this.className = '';
setTimeout(function () {
$smile.className = 'is-active';
}, 100);
}
};
}());
{
"version": "1.0",
"name": "Hello World Firefox OS",
"launch_path": "index.html",
"description": "Simples Hello World Firefox OS",
"icons": {
"16": "/images/icons/16.png",
"32": "/images/icons/32.png",
"48": "/images/icons/48.png",
"64": "/images/icons/64.png",
"128": "/images/icons/128.png"
},
"developer": {
"name": "Marco Bruno",
"url": "http://www.pinceladasdaweb.com.br/blog/uploads/hello-world-firefox-os/"
},
"installs_allowed_from": ["*"],
"default_locale": "pt"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment