Initialisation de la structure + fichiers 'reset'
This commit is contained in:
parent
e5544a9643
commit
c8530d100b
|
@ -0,0 +1,5 @@
|
|||
body {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=data:application/json;base64,ewoJInZlcnNpb24iOiAzLAoJImZpbGUiOiAibGF5b3V0LmNzcyIsCgkic291cmNlcyI6IFsKCQkiLi4vbGF5b3V0LnNjc3MiCgldLAoJInNvdXJjZXNDb250ZW50IjogWwoJCSJib2R5e1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAjY2NjO1xufVxuIgoJXSwKCSJtYXBwaW5ncyI6ICJBQUFBLEFBQUEsSUFBSSxDQUFBO0VBQ0gsZ0JBQWdCLEVBQUUsSUFBSztDQUN2QiIsCgkibmFtZXMiOiBbXQp9 */
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"version": 3,
|
||||
"file": "layout.css",
|
||||
"sources": [
|
||||
"../layout.scss"
|
||||
],
|
||||
"sourcesContent": [
|
||||
"body{\n\tbackground-color: #ccc;\n}\n"
|
||||
],
|
||||
"mappings": "AAAA,AAAA,IAAI,CAAA;EACH,gBAAgB,EAAE,IAAK;CACvB",
|
||||
"names": []
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,3 @@
|
|||
body{
|
||||
background-color: #ccc;
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
body{background-color:#ccc}
|
||||
|
||||
/*# sourceMappingURL=data:application/json;base64,ewoJInZlcnNpb24iOiAzLAoJImZpbGUiOiAibGF5b3V0LmNzcyIsCgkic291cmNlcyI6IFsKCQkiLi4vbGF5b3V0LnNjc3MiCgldLAoJInNvdXJjZXNDb250ZW50IjogWwoJCSJib2R5e1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAjY2NjO1xufVxuIgoJXSwKCSJtYXBwaW5ncyI6ICJBQUFBLEFBQUEsSUFBSSxBQUFBLENBQ0gsZ0JBQWdCLENBQUUsSUFBSyxDQUN2QiIsCgkibmFtZXMiOiBbXQp9 */
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"version": 3,
|
||||
"file": "layout.css",
|
||||
"sources": [
|
||||
"../layout.scss"
|
||||
],
|
||||
"sourcesContent": [
|
||||
"body{\n\tbackground-color: #ccc;\n}\n"
|
||||
],
|
||||
"mappings": "AAAA,AAAA,IAAI,AAAA,CACH,gBAAgB,CAAE,IAAK,CACvB",
|
||||
"names": []
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,434 @@
|
|||
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
/**
|
||||
* 1. Set default font family to sans-serif.
|
||||
* 2. Prevent iOS and IE text size adjust after device orientation change,
|
||||
* without disabling user zoom.
|
||||
*/
|
||||
|
||||
html {
|
||||
font-family: sans-serif; /* 1 */
|
||||
-ms-text-size-adjust: 100%; /* 2 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove default margin.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
// font-size: 12px;
|
||||
}
|
||||
|
||||
/* HTML5 display definitions
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Correct `block` display not defined for any HTML5 element in IE 8/9.
|
||||
* Correct `block` display not defined for `details` or `summary` in IE 10/11
|
||||
* and Firefox.
|
||||
* Correct `block` display not defined for `main` in IE 11.
|
||||
*/
|
||||
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
main,
|
||||
menu,
|
||||
nav,
|
||||
section,
|
||||
summary {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct `inline-block` display not defined in IE 8/9.
|
||||
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
audio,
|
||||
canvas,
|
||||
progress,
|
||||
video {
|
||||
display: inline-block; /* 1 */
|
||||
vertical-align: baseline; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent modern browsers from displaying `audio` without controls.
|
||||
* Remove excess height in iOS 5 devices.
|
||||
*/
|
||||
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address `[hidden]` styling not present in IE 8/9/10.
|
||||
* Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
|
||||
*/
|
||||
|
||||
[hidden],
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Links
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the gray background color from active links in IE 10.
|
||||
*/
|
||||
|
||||
a {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Improve readability of focused elements when they are also in an
|
||||
* active/hover state.
|
||||
*/
|
||||
|
||||
a:active,
|
||||
a:hover {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Address inconsistent styling of `abbr[title]`.
|
||||
* 1. Correct styling in Firefox 39 and Opera 12.
|
||||
* 2. Correct missing styling in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none; /* 1 */
|
||||
text-decoration: underline; /* 2 */
|
||||
text-decoration: underline dotted; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Address inconsistent styling of b and strong.
|
||||
* 1. Correct duplicate application of `bolder` in Safari 6.0.2.
|
||||
* 2. Correct style set to `bold` in Edge 12+, Safari 6.2+, and Chrome 18+.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: inherit; /* 1 */
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in Safari and Chrome.
|
||||
*/
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address variable `h1` font-size and margin within `section` and `article`
|
||||
* contexts in Firefox 4+, Safari, and Chrome.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in IE 8/9.
|
||||
*/
|
||||
|
||||
mark {
|
||||
background-color: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address inconsistent and variable font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove border when inside `a` element in IE 8/9/10.
|
||||
*/
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct overflow not hidden in IE 9/10/11.
|
||||
*/
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Address margin not present in IE 8/9 and Safari.
|
||||
*/
|
||||
|
||||
figure {
|
||||
margin: 1em 40px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address inconsistent styling of `hr`.
|
||||
* 1. Correct `box-sizing` set to `border-box` in Firefox.
|
||||
* 2. Correct `overflow` set to `hidden` in IE 8/9/10/11 and Edge 12.
|
||||
*/
|
||||
|
||||
hr {
|
||||
box-sizing: content-box; /* 1 */
|
||||
height: 0; /* 1 */
|
||||
overflow: visible; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Contain overflow in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct inheritance and scaling of font-size for preformatted text.
|
||||
* 2. Address odd `em`-unit font size rendering in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Known limitation: by default, Chrome and Safari on OS X allow very limited
|
||||
* styling of `select`, unless a `border` property is set.
|
||||
*/
|
||||
|
||||
/**
|
||||
* 1. Correct font properties not being inherited.
|
||||
* 2. Address margins set differently in Firefox 4+, Safari, and Chrome.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font: inherit; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Address `overflow` set to `hidden` in IE 8/9/10/11.
|
||||
*/
|
||||
|
||||
button {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address inconsistent `text-transform` inheritance for `button` and `select`.
|
||||
* All other form control elements do not inherit `text-transform` values.
|
||||
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
|
||||
* Correct `select` style inheritance in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
||||
* and `video` controls.
|
||||
* 2. Correct inability to style clickable `input` types in iOS.
|
||||
* 3. Improve usability and consistency of cursor style between image-type
|
||||
* `input` and others.
|
||||
*/
|
||||
|
||||
button,
|
||||
html input[type="button"], /* 1 */
|
||||
input[type="reset"],
|
||||
input[type="submit"] {
|
||||
-webkit-appearance: button; /* 2 */
|
||||
cursor: pointer; /* 3 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-set default cursor for disabled elements.
|
||||
*/
|
||||
|
||||
button[disabled],
|
||||
html input[disabled] {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove inner padding and border in Firefox 4+.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
|
||||
* the UA stylesheet.
|
||||
*/
|
||||
|
||||
input {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
/**
|
||||
* It's recommended that you don't attempt to style these elements.
|
||||
* Firefox's implementation doesn't respect box-sizing, padding, or width.
|
||||
*
|
||||
* 1. Address box sizing set to `content-box` in IE 8/9/10.
|
||||
* 2. Remove excess padding in IE 8/9/10.
|
||||
*/
|
||||
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
|
||||
* `font-size` values of the `input`, it causes the cursor style of the
|
||||
* decrement button to change from `default` to `text`.
|
||||
*/
|
||||
|
||||
input[type="number"]::-webkit-inner-spin-button,
|
||||
input[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address `appearance` set to `searchfield` in Safari and Chrome.
|
||||
*/
|
||||
|
||||
input[type="search"] {
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
|
||||
* Safari (but not Chrome) clips the cancel button when the search input has
|
||||
* padding (and `textfield` appearance).
|
||||
*/
|
||||
|
||||
input[type="search"]::-webkit-search-cancel-button,
|
||||
input[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Define consistent border, margin, and padding.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin: 0 2px;
|
||||
padding: 0.35em 0.625em 0.75em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct `color` not being inherited in IE 8/9/10/11.
|
||||
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
||||
*/
|
||||
|
||||
legend {
|
||||
border: 0; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove default vertical scrollbar in IE 8/9/10/11.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* Don't inherit the `font-weight` (applied by a rule above).
|
||||
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
|
||||
*/
|
||||
|
||||
optgroup {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Tables
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove most spacing between table cells.
|
||||
*/
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
padding: 0;
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>face-recognition.js</title>
|
||||
|
||||
<!-- Informations de la page -->
|
||||
<meta name='Content-Type' content='text/html; charset=utf-8'>
|
||||
<meta charset='utf-8'>
|
||||
<meta name='author' content='Adrien MARQUÈS alias {xdrm}; Lucas MASCARO alias SeekDaSky'>
|
||||
<meta name='desctiption' content="Face recognition and face components tracking system">
|
||||
|
||||
<!-- Dépendences CSS -->
|
||||
<link type='text/css' rel='stylesheet' href='./css/min/reset.css' /> <!-- Reset du css natif des browsers -->
|
||||
<link type='text/css' rel='stylesheet' href='./css/min/layout.css' /> <!-- Positionnement global des pages -->
|
||||
|
||||
|
||||
<!-- Dépendences Javascript -->
|
||||
<script type='text/javascript' src='./js/lib/min/reset.js' ></script> <!-- Corrections Javascript natif (ajouts) -->
|
||||
<script type='text/javascript' src='./js/lib/image-loader.js' ></script> <!-- Gestion du chargement d'image -->
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<!-- Dépendences Javascript après chargement des éléments -->
|
||||
<script type='text/javascript' src='./js/action-script.js'></script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,3 @@
|
|||
var DOM = {
|
||||
body: document.body
|
||||
};
|
|
@ -0,0 +1,2 @@
|
|||
function $(a){var b=document.querySelectorAll("#"+a);a=document.querySelectorAll("."+a);return 0<b.length?b[0]:a[0]}Element.prototype.getData=function(a){return"undefined"==typeof this.dataset?!1:this.dataset.hasOwnProperty(a)?this.dataset[a]:!1};Element.prototype.addClass=function(a){var b=this.className.split(" ");-1<b.indexOf(a)||(b.push(a),this.className=b.join(" ").trim())};
|
||||
Element.prototype.remClass=function(a){var b=this.className.split(" ");a=b.indexOf(a);-1!=a&&(b=b.slice(0,a).concat(b.slice(a+1)),this.className=b.join(" ").trim())};NodeList.prototype.indexOf=HTMLCollection.prototype.indexOf=function(a){for(var b=0;b<this.length;b++)if(this[b]==a)return b;return-1};Element.prototype.anim=function(a,b){var c=this;c.addClass(a);setTimeout(function(){c.remClass(a)},b)};var format_code;try{format_code=new formatChecker(null,"HH-HH-HH-HH",{H:"[0-9A-F]"})}catch(a){console.warn(a)};
|
|
@ -0,0 +1,119 @@
|
|||
/* SELECTEUR SIMPLIFIE
|
||||
*
|
||||
* @ifOrClass<String> L'id ou la classe de l'element cible
|
||||
*
|
||||
* @return element<Element> Retourne l'element de cet ID ou cette classe si trouve
|
||||
* @return null Retourne null si rien n'est trouve
|
||||
*
|
||||
*/
|
||||
function $(idOrClass){
|
||||
var byId = document.querySelectorAll('#'+idOrClass);
|
||||
var byClass = document.querySelectorAll('.'+idOrClass);
|
||||
|
||||
if( byId.length > 0 ) return byId[0];
|
||||
else return byClass[0];
|
||||
}
|
||||
|
||||
|
||||
/* Retourne un data-* attribute d'un element (surcharge de l'ELEMENT natif)
|
||||
*
|
||||
* @attribute<String> L'attribut qui nous interesse
|
||||
*
|
||||
* @return value<String> Retourne la valeur si l'attribut existe
|
||||
* @return false Retourne FALSE si rien n'a ete trouve
|
||||
*
|
||||
*
|
||||
*/
|
||||
Element.prototype.getData = function(attribute){
|
||||
// On verifie qu'un data-* attribute existe
|
||||
if( typeof this.dataset == 'undefined' )
|
||||
return false;
|
||||
|
||||
return ( this.dataset.hasOwnProperty(attribute) ) ? this.dataset[attribute] : false;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* Ajout de classe pour un element (surcharge de l'ELEMENT natif)
|
||||
*
|
||||
* @className<String> Classe a ajouter a l'element
|
||||
*
|
||||
*/
|
||||
Element.prototype.addClass = function(className){
|
||||
/* [1] On transforme la classe actuelle en tableau
|
||||
====================================================*/
|
||||
var classArray = this.className.split(' ');
|
||||
|
||||
/* [2] On ajoute la classe si elle n'y est pas deja
|
||||
====================================================*/
|
||||
if( classArray.indexOf(className) > -1 ) return; // La classe y est deja
|
||||
|
||||
classArray.push(className);
|
||||
|
||||
/* [3] On reformatte tout
|
||||
====================================================*/
|
||||
this.className = classArray.join(' ').trim();
|
||||
};
|
||||
|
||||
|
||||
/* Suppression de classe pour un element (surcharge de l'ELEMENT natif)
|
||||
*
|
||||
* @className<String> Classe a supprimer a l'element
|
||||
*
|
||||
*/
|
||||
Element.prototype.remClass = function(className){
|
||||
/* [1] On transforme la classe actuelle en tableau
|
||||
====================================================*/
|
||||
var classArray = this.className.split(' ');
|
||||
|
||||
/* [2] On retire la classe si elle y est
|
||||
====================================================*/
|
||||
var index = classArray.indexOf(className);
|
||||
|
||||
if( index == -1 ) return; // La classe n'y est pas
|
||||
|
||||
classArray = classArray.slice(0,index).concat( classArray.slice(index+1) );
|
||||
|
||||
/* [3] On reformatte tout
|
||||
====================================================*/
|
||||
this.className = classArray.join(' ').trim();
|
||||
};
|
||||
|
||||
|
||||
// on définit le "indexOf" pour <HTMLCollection> et <NodeList>
|
||||
NodeList.prototype.indexOf = HTMLCollection.prototype.indexOf = function(searchedElement){
|
||||
for( var i = 0 ; i < this.length ; i++ ) // on parcours la collection
|
||||
// si on trouve l'élement, on retourne son rang
|
||||
if( this[i] == searchedElement ) return i;
|
||||
|
||||
// si on a rien trouvé, on retourne -1
|
||||
return -1;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// GESTION DES ANIMATIONS (CLASSE PENDANT TEMPS IMPARTI)
|
||||
Element.prototype.anim = function(className, timeout){
|
||||
|
||||
var pointer = this; // on cree un pointeur
|
||||
|
||||
pointer.addClass(className); // on met la classe
|
||||
|
||||
// on la retire apres le @timeout imparti
|
||||
setTimeout(function(){ pointer.remClass(className); }, timeout);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/* DEFINITION DES FORMATS UTILES POUR INPUT-CHECKER
|
||||
*
|
||||
*/
|
||||
var format_code;
|
||||
|
||||
try{
|
||||
format_code = new formatChecker(null, 'HH-HH-HH-HH', { 'H' : '[0-9A-F]'} );
|
||||
}catch(e){
|
||||
console.warn(e);
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
var DOM={body:document.body};
|
Loading…
Reference in New Issue