Skip to content

Instantly share code, notes, and snippets.

@nazrdogan
Last active December 29, 2015 03:09
Show Gist options
  • Save nazrdogan/7605761 to your computer and use it in GitHub Desktop.
Save nazrdogan/7605761 to your computer and use it in GitHub Desktop.
Firefox index.html
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Merhaba dünya</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;
-webkit-box-sizing: border-box;
-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 {
-webkit-animation: girar 0.5s;
-moz-animation: girar 0.5s;
-ms-animation: girar 0.5s;
-o-animation: girar 0.5s;
animation: girar 0.5s;
}
@keyframes girar {
0% {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
25% {
-webkit-transform: rotate(30deg);
-moz-transform: rotate(30deg);
-o-transform: rotate(30deg);
-ms-transform: rotate(30deg);
transform: rotate(30deg);
}
75% {
-webkit-transform: rotate(-30deg);
-moz-transform: rotate(-30deg);
-o-transform: rotate(-30deg);
-ms-transform: rotate(-30deg);
transform: rotate(-30deg);
}
100% {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
}
( function() {
/*global jQuery: false*/
'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);
};
};
})();//(function()
{
"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": "Nazir DOGAN",
"url": "http://gereksizcoder.wordpress.com/"
},
"installs_allowed_from": ["*"],
"default_locale": "pt"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment