- [x] Dispatcher+Route pour les images (image/svg)

- [x] Inclusions maintenant par URL (forcer l'utilisation du Dispatcher)
	- [x] Routage modifie
This commit is contained in:
xdrm-brackets 2016-02-02 23:29:30 +01:00
parent 4d152cc0d9
commit ad99a95438
34 changed files with 446 additions and 95 deletions

View File

@ -1,2 +1,2 @@
$theme-color: #f97a53;
$theme-color: #5395f9;
$theme-color: #4662d4;
$theme-color: #00A6EB;

View File

@ -1,2 +1,2 @@
#WRAPPER>#CONTAINER>.sub-menu-side{display:block;position:relative}#WRAPPER>#CONTAINER>.sub-menu-side>span[data-sublink]{display:block;position:relative;padding:.3em 1.5em;border-radius:3px;background:url("../src/?static/sub-menu-side.svg") left 0.25em center no-repeat;background-size:1.1em;color:#5b5e63;text-shadow:1px 1px white;white-space:nowrap;transition:all .2s;cursor:pointer}#WRAPPER>#CONTAINER>.sub-menu-side>span[data-sublink]:hover,#WRAPPER>#CONTAINER>.sub-menu-side>span[data-sublink].active{background-color:#d8deea;box-shadow:inset 0 0 4px #c8ced9}
/*# sourceMappingURL=container.css.map */

View File

@ -0,0 +1,41 @@
#WRAPPER > #CONTAINER{
/**************************/
/* Menu interne (submenu) */
/**************************/
& > .sub-menu-side{
display: block;
position: relative;
// Les liens du menu
& > span[data-sublink]{
display: block;
position: relative;
padding: .3em 1.5em;
border-radius: 3px;
background: url('../src/?static/sub-menu-side.svg') left .25em center no-repeat;
background-size: 1.1em;
color: #5b5e63;
text-shadow: 1px 1px white;
white-space: nowrap;
transition: all .2s;
cursor: pointer;
&:hover,
&.active{
background-color: #d8deea;
box-shadow: inset 0 0 4px #c8ced9;
}
}
}
}

View File

@ -1,2 +1,2 @@
#WRAPPER>#HEADER>.icon{display:block;position:absolute;top:0;left:0;width:4em;height:4em;background-color:#2277f7;background-image:url("../src/static/icon.svg");background-position:center center;background-repeat:no-repeat;background-size:50% 50%;cursor:pointer;transition:all .3s}#WRAPPER>#HEADER>.icon:hover{background-color:#0967f6}#WRAPPER>#HEADER.loading>.icon{background-image:url("../src/static/loader.svg");background-size:70% 70%}
#WRAPPER>#HEADER>.icon{display:block;position:absolute;top:0;left:0;width:4em;height:4em;background-color:#0082b8;background-image:url("../src/static/icon.svg");background-position:center center;background-repeat:no-repeat;background-size:50% 50%;cursor:pointer;transition:all .3s}#WRAPPER>#HEADER>.icon:hover{background-color:#00709f}#WRAPPER>#HEADER.loading>.icon{background-image:url("../src/static/loader.svg");background-size:70% 70%}
/*# sourceMappingURL=header.css.map */

View File

@ -1,4 +1,3 @@
@import 'constants';

View File

@ -1,2 +1,2 @@
#WRAPPER{display:block;position:fixed;top:0;left:0;width:100%;height:100%;background-color:#edf0f5;font-family:'Ubuntu'}#WRAPPER>#HEADER{display:block;position:absolute;top:0;left:0;width:100%;height:calc( 4em - 1px );border-bottom:1px solid #2277f7;background-color:#5395f9;z-index:10}#WRAPPER>#MENU-SIDE{display:block;position:absolute;top:4em;left:0;width:4em;height:100%;box-shadow:2px 1px 3px #ddd;background-color:#fff;transition:all .3s;z-index:9}#WRAPPER>#CONTAINER{display:block;position:absolute;top:4em;left:4em;width:calc( 100% - 4em - 2*1em );height:calc( 100% - 4em - 2*1em );padding:1em;overflow-x:none;overflow-y:auto}
#WRAPPER{display:block;position:fixed;top:0;left:0;width:100%;height:100%;background-color:#edf0f5;font-family:'Ubuntu'}#WRAPPER>#HEADER{display:block;position:absolute;top:0;left:0;width:100%;height:calc( 4em - 1px );border-bottom:1px solid #0082b8;background-color:#00A6EB;z-index:10}#WRAPPER>#MENU-SIDE{display:block;position:absolute;top:4em;left:0;width:4em;height:100%;box-shadow:2px 1px 3px #ddd;background-color:#fff;transition:all .3s;z-index:9}#WRAPPER>#CONTAINER{display:flex;position:absolute;top:4em;left:4em;width:calc( 100% - 4em - 2*1em );height:calc( 100% - 4em - 2*1em );padding:1em;flex-direction:row;justify-content:space-between;overflow-x:none;overflow-y:auto}
/*# sourceMappingURL=layout.css.map */

View File

@ -56,7 +56,7 @@
/* [3] Container de la page
==========================================*/
& > #CONTAINER{
display: block;
display: flex;
position: absolute;
top: 4em;
left: 4em;
@ -64,6 +64,10 @@
height: calc( 100% - 4em - 2*1em );
padding: 1em;
// Flex properties
flex-direction: row;
justify-content: space-between;
overflow-x: none;
overflow-y: auto;
}

View File

@ -1,6 +1,13 @@
<?php define('__ROOT__', dirname(__FILE__) );
require_once 'manager/autoloader.php';
/*******************************************/
/* DEBUGGER */
/*******************************************/
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);
/*******************************************/
/* [0] On initialise le routeur
@ -10,14 +17,17 @@
/* [1] On cree les regles de routage
===================================================*/
// Racine -> page d'accueil
$R->get('/?', function(){ header('Location: /dashboard/'); });
$R->get('dashboard/(?::submenu/)*', function($sm){ var_dump(func_get_args()); $subMenu = $sm; include __ROOT__.'/view.php'; });
$R->get('machines/(?::submenu/)*', function($sm){ $subMenu = $sm; include __ROOT__.'/view.php'; });
$R->get('users/(?::submenu/)*', function($sm){ $subMenu = $sm; include __ROOT__.'/view.php'; });
$R->get('sync/(?::submenu/)*', function($sm){ $subMenu = $sm; include __ROOT__.'/view.php'; });
$R->get('settings/(?::submenu/)*', function($sm){ $subMenu = $sm; include __ROOT__.'/view.php'; });
// nomPage/arg1/arg2 -> inclusion de la page
$R->get('dashboard(?:/[\w-]+)*/??', function(){ include __ROOT__.'/view.php'; });
$R->get('machines(?:/[\w-]+)*/??', function(){ include __ROOT__.'/view.php'; });
$R->get('users(?:/[\w-]+)*/??', function(){ include __ROOT__.'/view.php'; });
$R->get('sync(?:/[\w-]+)*/??', function(){ include __ROOT__.'/view.php'; });
$R->get('settings(?:/[\w-]+)*/??', function(){ include __ROOT__.'/view.php'; });
// nomPage -> nomPage/
$R->get('dashboard', function(){ header('Location: /dashboard/'); });
$R->get('machines', function(){ header('Location: /machines/'); });
$R->get('users', function(){ header('Location: /users/'); });
@ -30,7 +40,10 @@
$R->get('sync/', function(){ include __ROOT__.'/view.php'; });
$R->get('settings/', function(){ include __ROOT__.'/view.php'; });
// Correction d'
// Dispatcher
$R->get('f(?:/([\w-]+))*/?', function(){ new manager\Dispatcher($_GET['url']); });
// N'importe -> page d'accueil
$R->get('.+', function(){ header('Location: /dashboard/'); });

191
manager/Dispatcher.php Executable file
View File

@ -0,0 +1,191 @@
<?php
namespace manager;
class Dispatcher{
// Constantes (a dispatcher dans un .conf)
public static $supported_extensions = array('svg');
public static $supported_extensions_header = array('image/svg+xml');
public static $supported_parents = array('st', 'dy');
public static $supported_parents_folder = array('/src/static', '/src/dynamic');
// Attributs prives utiles (initialisation)
private $header;
private $path;
private $flags;
/* CONSTRUCTEUR & AMORCAGE DU DISPATCHER
*
* @url<String> L'url courante
*
* @GET<Array> Arguments indirects (variable $_GET)
*
* @return status<Boolean> Retourne si oui ou non tout s'est bien passe
*
*/
public function __construct($url){
/* [1] On recupere les donnees de l'URL
==================================================*/
$serialFlags = array_slice( explode('/',$url), 1 );
/* [2] On check/cree les drapeaux avec ces donnees
==================================================*/
if( !$this->createFlags($serialFlags) ) // Creation des drapeaux
return false; // On retourne FALSE, si erreur
/* [3] On construit le chemin a partir des tags
==================================================*/
if( !$this->buildPath() ) // Construction du chemin
return false; // On retourne FALSE, si erreur
/* [4] On gere l'affichage pour l'appel externe
==================================================*/
$this->view();
return true;
}
/* FONCTION QUI VERIFIE LES DRAPEAUX
*
* @serialFlags<Array> Tableau a indice numerique
*
* @return correct<Boolean> Retourne si oui ou non les drapeaux sont corrects
*
*/
private function createFlags($serialFlags){
/* [1] Verification des flags (version serialisee)
======================================================*/
$correct = true;
// Verification du nombre de drapeaux () au moins 3
$correct = $correct && count($serialFlags) >= 3;
// Verification que l'extension est correcte
$correct = $correct && array_search($serialFlags[0], self::$supported_extensions) !== false;
// Verification du filename
$correct = $correct && preg_match('#^[\w_-]+$#i', $serialFlags[1]);
// Verification du parent
$correct = $correct && array_search($serialFlags[2], self::$supported_parents) !== false;
// Verification du sous-parent (optionnel)
$opt_subParent = count($serialFlags) >= 4;
if( $opt_subParent )
$correct = $correct && preg_match('#^[\w_-]+$#i', $serialFlags[3]);
if( !$correct )
return false;
/* [2] Creation (non serialisee) des flags
======================================================*/
// Si tout se deroule bien, on cree les flags
$this->flags = array(
'extension' => $serialFlags[0],
'filename' => $serialFlags[1],
'parent' => $serialFlags[2]
);
// Ajout du sous-parent optionnel
if( $opt_subParent )
$this->flags['subparent'] = $serialFlags[3];
return true;
}
/* FONCTION QUI CONSTRUIT LE CHEMIN A PARTIR DU PATH
*
* @return fileExists<Boolean> Retourne si oui ou non le fichier cible existe
*
* @format
*
* f/extension/filename/parent/:subparent:/ (:OPT:)
*
*/
private function buildPath(){
/* [1] On recupere le HEADER associe a l'extension
==========================================================*/
$index_header = array_search($this->flags['extension'], self::$supported_extensions);
// Si l'extension n'est pas repertoriee, on retourne une erreur
if( $index_header === false ) return false;
// Si aucun header pour cet indice, on retourne une erreur
if( !isset(self::$supported_extensions_header[$index_header]) ) return false;
// On recupere le header associe
$header = self::$supported_extensions_header[$index_header];
/* [2] On recupere le chemin associe au parent
==========================================================*/
$index_parent = array_search($this->flags['parent'], self::$supported_parents);
// Si le parent n'est pas repertorie, on retourne une erreur
if( $index_parent === false ) return false;
// Si aucun dossier pour cet indice, on retourne une erreur
if( !isset(self::$supported_parents_folder[$index_parent]) ) return false;
// On recupere le dossier associe
$parent = self::$supported_parents_folder[$index_parent];
/* [3] Gestion du sous-parent optionnel
==========================================================*/
$opt_subParent = (isset($this->flags['subparent'])) ? $this->flags['subparent'].'/' : '';
/* [4] On definit le header
==========================================================*/
$this->header = $header;
/* [5] On construit le chemin
==========================================================*/
$this->path = __ROOT__.$parent.'/'.$opt_subParent.$this->flags['filename'].'.'.$this->flags['extension'];
/* [6] On retourne si le fichier existe ou non
==========================================================*/
return file_exists( $this->path );
}
/* FUNCTION QUI AFFICHE LA RESSOURCE EN QUESTION
*
*/
public function view(){
// On definit le header
header('Content-Type: '.$this->header);
// On inclut le contenu
include $this->path;
}
}
?>

View File

@ -25,8 +25,7 @@ class Route{
$this->callback = $callback;
// On formatte le pattern en regexp
$this->pattern = preg_replace('#:(\w+)#i', '([^/]+)', $pattern);
$this->pattern = '#^'.$this->pattern.'$#';
$this->pattern = '#^'.$pattern.'$#';
return $this;
}
@ -56,7 +55,7 @@ class Route{
*
*/
public function call(){
return call_user_func_array($this->callback, $this->matches);
return call_user_func($this->callback, $this->matches);
}
}

71
src/dynamic/create.svg Normal file
View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="32px"
version="1.1"
viewBox="0 0 32 32"
width="32px"
id="svg3901"
inkscape:version="0.48.4 r9939"
sodipodi:docname="18.svg">
<metadata
id="metadata3914">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1056"
id="namedview3912"
showgrid="false"
inkscape:zoom="20.85965"
inkscape:cx="12.887181"
inkscape:cy="17.571155"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="icon-150-tag-checked"
inkscape:snap-page="true" />
<desc
id="desc3905" />
<defs
id="defs3907" />
<g
fill="none"
fill-rule="evenodd"
id="Page-1"
stroke="none"
stroke-width="1"
style="fill:#000000;fill-opacity:1">
<g
fill="#157EFB"
id="icon-150-tag-checked"
style="fill:#000000;fill-opacity:1">
<path
style="fill:#000000;fill-opacity:1"
d="M 16 0.46875 C 7.4289025 0.46875 0.46875 7.4289035 0.46875 16 C 0.46875 24.571097 7.4289025 31.53125 16 31.53125 C 24.571096 31.53125 31.53125 24.571097 31.53125 16 C 31.53125 7.4289035 24.571096 0.46875 16 0.46875 z M 22.6875 9.53125 L 24.75 11.59375 L 13.875 22.46875 L 7.25 15.84375 L 9.3125 13.75 L 13.875 18.34375 L 22.6875 9.53125 z "
id="path4447" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

1
src/dynamic/edit.svg Normal file
View File

@ -0,0 +1 @@
<?xml version="1.0" ?><svg height="48" viewBox="0 0 48 48" width="48" xmlns="http://www.w3.org/2000/svg"><path d="M6 34.5v7.5h7.5l22.13-22.13-7.5-7.5-22.13 22.13zm35.41-20.41c.78-.78.78-2.05 0-2.83l-4.67-4.67c-.78-.78-2.05-.78-2.83 0l-3.66 3.66 7.5 7.5 3.66-3.66z"/><path d="M0 0h48v48h-48z" fill="none"/></svg>

After

Width:  |  Height:  |  Size: 311 B

1
src/dynamic/filter.svg Normal file
View File

@ -0,0 +1 @@
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="100px" id="Capa_1" style="enable-background:new 0 0 96 100;" version="1.1" viewBox="0 0 96 100" width="96px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M94.456,2.028c-0.544-1.577-2.248-2.408-3.804-1.859c-1.557,0.549-2.379,2.272-1.837,3.849 c4.599,13.351-4.53,23.317-11.485,28.657l-2.817-4.072c-0.942-1.361-3.058-2.495-4.699-2.52l-15.777,0.072 c-1.64-0.026-4.085,0.735-5.43,1.689L2.123,60.786c-2.251,1.596-2.799,4.736-1.223,7.016L22.027,98.34 c1.577,2.28,4.111,2.007,6.362,0.412l46.483-32.941c1.345-0.955,2.885-3.02,3.426-4.59l4.94-15.731 c0.538-1.571,0.21-3.969-0.733-5.331l-1.717-2.481C90.139,30.451,99.841,17.665,94.456,2.028z M72.829,48.808 c-3.603,2.552-8.569,1.665-11.091-1.98c-2.523-3.648-1.648-8.672,1.957-11.227c2.859-2.027,6.573-1.879,9.246,0.088 c-1.346,0.82-2.269,1.292-2.445,1.376c-1.49,0.712-2.127,2.512-1.426,4.02c0.51,1.095,1.584,1.736,2.705,1.736 c0.426,0,0.859-0.094,1.271-0.29c0.958-0.457,1.989-1.009,3.064-1.652C76.595,43.845,75.426,46.968,72.829,48.808z"/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

1
src/dynamic/remove.svg Normal file
View File

@ -0,0 +1 @@
<?xml version="1.0" ?><svg height="48" viewBox="0 0 48 48" width="48" xmlns="http://www.w3.org/2000/svg"><path d="M12 38c0 2.21 1.79 4 4 4h16c2.21 0 4-1.79 4-4v-24h-24v24zm26-30h-7l-2-2h-10l-2 2h-7v4h28v-4z"/><path d="M0 0h48v48h-48z" fill="none"/></svg>

After

Width:  |  Height:  |  Size: 254 B

1
src/dynamic/search.svg Normal file
View File

@ -0,0 +1 @@
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg enable-background="new 0 0 500 500" height="500px" id="Layer_1" version="1.1" viewBox="0 0 500 500" width="500px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path clip-rule="evenodd" d="M306.39,154.09c19.628,4.543,35.244,21.259,39.787,39.523 c1.551,8.54,8.998,14.989,17.904,14.989c9.991,0,18.168-8.175,18.168-18.17c0-13.083-10.991-32.98-25.985-47.881 c-14.719-14.537-32.252-24.802-46.695-24.802c-9.991,0-18.172,8.45-18.172,18.446C291.396,145.094,297.847,152.546,306.39,154.09z M56.629,392.312c-14.09,14.08-14.09,36.979,0,51.059c14.08,14.092,36.981,14.092,50.965,0l104.392-104.303 c24.347,15.181,53.062,23.991,83.953,23.991c87.857,0,158.995-71.142,158.995-158.999c0-87.854-71.138-158.995-158.995-158.995 c-87.856,0-158.995,71.141-158.995,158.995c0,30.802,8.819,59.606,23.992,83.953L56.629,392.312z M182.371,204.06 c0-62.687,50.875-113.568,113.568-113.568s113.569,50.881,113.569,113.568c0,62.694-50.876,113.569-113.569,113.569 S182.371,266.754,182.371,204.06z" fill="#010101" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,52 +0,0 @@
<?php define('__ROOT__', dirname(__FILE__) );
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);
// FORMAT: extension & root & image & declinaison
$info = array(); // Contiendra les donnees GET
$path = array(); // Contiendra le chemin
$extensions = array('svg'); // extensions gerees
$extensionHeader = array('image/svg+xml'); // header associees aux extensions
$index = 0;
/* [1] On recupere les cles GET
======================================*/
foreach($_GET as $k=>$v)
array_push($info, $k);
/* [2] Verification des donnees recues
======================================*/
$infoChecker = count($info) >= 3;
$infoChecker = $infoChecker && ($index=array_search($info[0], $extensions)) !== false;
// Gestion de la declinaison si existe
$subView = ( count($info)>=4 && $info[3] != 'noheader' ) ? $info[3].'/' : '';
/* (1) Erreur */
if( !$infoChecker ) exit(1);
/* (2) Cas de $info[0] */
switch($info[1]){
case 'static':
$path = __ROOT__.'/static/'.$subView.$info[2].'.'.$info[0];
// On verifie si le fichier existe
if( file_exists($path) ){
if( !isset($_GET['noheader']) )
header('Content-type:'.$extensionHeader[$index]);
include $path;
}
break;
}
?>

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="32px"
version="1.1"
viewBox="0 0 32 32"
width="32px"
id="svg3901"
inkscape:version="0.48.4 r9939"
sodipodi:docname="18.svg">
<metadata
id="metadata3914">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1056"
id="namedview3912"
showgrid="false"
inkscape:zoom="20.85965"
inkscape:cx="12.887181"
inkscape:cy="17.571155"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="icon-150-tag-checked"
inkscape:snap-page="true" />
<desc
id="desc3905" />
<defs
id="defs3907" />
<g
fill="none"
fill-rule="evenodd"
id="Page-1"
stroke="none"
stroke-width="1"
style="fill:#000000;fill-opacity:1">
<g
fill="#157EFB"
id="icon-150-tag-checked"
style="fill:#000000;fill-opacity:1">
<path
style="fill:#000000;fill-opacity:1"
d="M 16 0.46875 C 7.4289025 0.46875 0.46875 7.4289035 0.46875 16 C 0.46875 24.571097 7.4289025 31.53125 16 31.53125 C 24.571096 31.53125 31.53125 24.571097 31.53125 16 C 31.53125 7.4289035 24.571096 0.46875 16 0.46875 z M 22.6875 9.53125 L 24.75 11.59375 L 13.875 22.46875 L 7.25 15.84375 L 9.3125 13.75 L 13.875 18.34375 L 22.6875 9.53125 z "
id="path4447" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" ?><svg height="48" viewBox="0 0 48 48" width="48" xmlns="http://www.w3.org/2000/svg"><path d="M6 34.5v7.5h7.5l22.13-22.13-7.5-7.5-22.13 22.13zm35.41-20.41c.78-.78.78-2.05 0-2.83l-4.67-4.67c-.78-.78-2.05-.78-2.83 0l-3.66 3.66 7.5 7.5 3.66-3.66z"/><path d="M0 0h48v48h-48z" fill="none"/></svg>

After

Width:  |  Height:  |  Size: 311 B

View File

@ -0,0 +1 @@
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="100px" id="Capa_1" style="enable-background:new 0 0 96 100;" version="1.1" viewBox="0 0 96 100" width="96px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M94.456,2.028c-0.544-1.577-2.248-2.408-3.804-1.859c-1.557,0.549-2.379,2.272-1.837,3.849 c4.599,13.351-4.53,23.317-11.485,28.657l-2.817-4.072c-0.942-1.361-3.058-2.495-4.699-2.52l-15.777,0.072 c-1.64-0.026-4.085,0.735-5.43,1.689L2.123,60.786c-2.251,1.596-2.799,4.736-1.223,7.016L22.027,98.34 c1.577,2.28,4.111,2.007,6.362,0.412l46.483-32.941c1.345-0.955,2.885-3.02,3.426-4.59l4.94-15.731 c0.538-1.571,0.21-3.969-0.733-5.331l-1.717-2.481C90.139,30.451,99.841,17.665,94.456,2.028z M72.829,48.808 c-3.603,2.552-8.569,1.665-11.091-1.98c-2.523-3.648-1.648-8.672,1.957-11.227c2.859-2.027,6.573-1.879,9.246,0.088 c-1.346,0.82-2.269,1.292-2.445,1.376c-1.49,0.712-2.127,2.512-1.426,4.02c0.51,1.095,1.584,1.736,2.705,1.736 c0.426,0,0.859-0.094,1.271-0.29c0.958-0.457,1.989-1.009,3.064-1.652C76.595,43.845,75.426,46.968,72.829,48.808z"/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" ?><svg height="48" viewBox="0 0 48 48" width="48" xmlns="http://www.w3.org/2000/svg"><path d="M12 38c0 2.21 1.79 4 4 4h16c2.21 0 4-1.79 4-4v-24h-24v24zm26-30h-7l-2-2h-10l-2 2h-7v4h28v-4z"/><path d="M0 0h48v48h-48z" fill="none"/></svg>

After

Width:  |  Height:  |  Size: 254 B

View File

@ -0,0 +1 @@
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg enable-background="new 0 0 500 500" height="500px" id="Layer_1" version="1.1" viewBox="0 0 500 500" width="500px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path clip-rule="evenodd" d="M306.39,154.09c19.628,4.543,35.244,21.259,39.787,39.523 c1.551,8.54,8.998,14.989,17.904,14.989c9.991,0,18.168-8.175,18.168-18.17c0-13.083-10.991-32.98-25.985-47.881 c-14.719-14.537-32.252-24.802-46.695-24.802c-9.991,0-18.172,8.45-18.172,18.446C291.396,145.094,297.847,152.546,306.39,154.09z M56.629,392.312c-14.09,14.08-14.09,36.979,0,51.059c14.08,14.092,36.981,14.092,50.965,0l104.392-104.303 c24.347,15.181,53.062,23.991,83.953,23.991c87.857,0,158.995-71.142,158.995-158.999c0-87.854-71.138-158.995-158.995-158.995 c-87.856,0-158.995,71.141-158.995,158.995c0,30.802,8.819,59.606,23.992,83.953L56.629,392.312z M182.371,204.06 c0-62.687,50.875-113.568,113.568-113.568s113.569,50.881,113.569,113.568c0,62.694-50.876,113.569-113.569,113.569 S182.371,266.754,182.371,204.06z" fill="#010101" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -9,10 +9,12 @@
############
# EN COURS #
############
- [.] Design de structure (layout)
- [x] Header
- [x] Menu-side
- [.] Submenu-side
- [.] Gestion JS de la navigation
- [x] Gestion de liens+URL du menu
- [ ] Gestion des liens+URL du submenu
@ -20,6 +22,9 @@
########
# FAIT #
########
- [x] Dispatcher+Route pour les images (image/svg)
- [x] Inclusions maintenant par URL (forcer l'utilisation du Dispatcher)
- [x] Routage modifie
- [x] Gestion complete de la navigation de niveau 0
- [x] Ajout d'un loader pour page-manager.js
- [x] Autoloader avec namespace

View File

@ -42,11 +42,11 @@
<!-- MENU DE LA PAGE -->
<nav id='MENU-SIDE'>
<span data-link='dashboard' data-desc='Tableau de bord' ><?php include __ROOT__.'/src/static/menu-dashboard.svg'; ?></span>
<span data-link='machines' data-desc='Véhicules' ><?php include __ROOT__.'/src/static/menu-machines.svg'; ?></span>
<span data-link='users' data-desc='Utilisateurs' ><?php include __ROOT__.'/src/static/users2.svg'; ?></span>
<span data-link='sync' data-desc='Synchronisation' ><?php include __ROOT__.'/src/static/menu-sync.svg'; ?></span>
<span data-link='settings' data-desc='Paramètres' ><?php include __ROOT__.'/src/static/menu-settings.svg'; ?></span>
<span data-link='dashboard' data-desc='Tableau de bord' ><?php include 'http://'.$_SERVER['HTTP_HOST'].'/f/svg/menu-dashboard/st/menu-side'; ?></span>
<span data-link='machines' data-desc='Véhicules' ><?php include 'http://'.$_SERVER['HTTP_HOST'].'/f/svg/menu-machines/st/menu-side/'; ?></span>
<span data-link='users' data-desc='Utilisateurs' ><?php include 'http://'.$_SERVER['HTTP_HOST'].'/f/svg/users2/st/menu-side/'; ?></span>
<span data-link='sync' data-desc='Synchronisation' ><?php include 'http://'.$_SERVER['HTTP_HOST'].'/f/svg/menu-sync/st/menu-side/'; ?></span>
<span data-link='settings' data-desc='Paramètres' ><?php include 'http://'.$_SERVER['HTTP_HOST'].'/f/svg/menu-settings/st/menu-side/'; ?></span>
</nav>

View File

@ -1,6 +1,6 @@
<!-- [1] Gestion du sous-menu de gauche -->
<nav class='inside-menu'>
<nav class='sub-menu-side'>
<span>menu item 1</span>
<span>menu item 2</span>
<span>menu item 3</span>

View File

@ -1,12 +1,13 @@
<!-- [1] Gestion du sous-menu de gauche -->
<nav class='inside-menu'>
<span>menu item 1</span>
<span>menu item 2</span>
<span>menu item 3</span>
<span>menu item 4</span>
<span>menu item 5</span>
<span>menu item 6</span>
<nav class='sub-menu-side'>
<span data-sublink='displayall' data-desc='Tout afficher'><?php include '/src/static/sub-menu-side/create.svg'; ?></span>
<span data-sublink='create' data-desc='Creation' ><?php include '/src/static/sub-menu-side/create.svg'; ?></span>
<span data-sublink='remove' data-desc='Suppression' ><?php include '/src/static/sub-menu-side/create.svg'; ?></span>
<span data-sublink='filter' data-desc='Filtrer' ><?php include '/src/static/sub-menu-side/create.svg'; ?></span>
<span data-sublink='search' data-desc='Recherche' ><?php include '/src/static/sub-menu-side/create.svg'; ?></span>
</nav>
Bienvenue sur la page de gestion des MACHINES
<section>
Bienvenue sur la page de gestion des MACHINES
</section>

View File

@ -1,6 +1,6 @@
<!-- [1] Gestion du sous-menu de gauche -->
<nav class='inside-menu'>
<nav class='sub-menu-side'>
<span>menu item 1</span>
<span>menu item 2</span>
<span>menu item 3</span>

View File

@ -1,6 +1,6 @@
<!-- [1] Gestion du sous-menu de gauche -->
<nav class='inside-menu'>
<nav class='sub-menu-side'>
<span>menu item 1</span>
<span>menu item 2</span>
<span>menu item 3</span>

View File

@ -1,6 +1,6 @@
<!-- [1] Gestion du sous-menu de gauche -->
<nav class='inside-menu'>
<nav class='sub-menu-side'>
<span>menu item 1</span>
<span>menu item 2</span>
<span>menu item 3</span>