diff options
-rw-r--r-- | class/class.aff.php | 19 | ||||
-rw-r--r-- | class/class.app.php | 1 | ||||
-rw-r--r-- | public/css/stylem.css (renamed from public/css/style.css) | 26 | ||||
-rw-r--r-- | public/css/stylew.css | 202 | ||||
-rw-r--r-- | public/m/index.php | 20 | ||||
-rw-r--r-- | public/w/index.php | 2 |
6 files changed, 252 insertions, 18 deletions
diff --git a/class/class.aff.php b/class/class.aff.php index db0f59a..20742a8 100644 --- a/class/class.aff.php +++ b/class/class.aff.php @@ -60,6 +60,8 @@ class Aff ?> <section class="edit"> <form action="?id=<?= $art->id() ?>" method="post"> + <details close> + <summary>Infos</summary> <label for="titre">Titre :</label> <input type="text" name="titre" id="titre" value="<?= $art->titre(); ?>"> <label for="soustitre">Sous-titre :</label> @@ -68,14 +70,17 @@ class Aff <input type="text" name="intro" id="intro" value="<?= $art->intro(); ?>"> <label for="tag">Tag(s) :</label> <input type="text" name="tag" id="tag" value="<?= $art->tag('string'); ?>"> - <label for="css">Styles CSS :</label> - <textarea name="css" id="css"><?= $art->css(); ?></textarea> <label for="secure">Niveau de sécurité :</label> <select name="secure" id="secure"> <option value="0" <?= $art->secure() == 0 ? 'selected' : '' ?>>0</option> <option value="1" <?= $art->secure() == 1 ? 'selected' : '' ?>>1</option> <option value="2" <?= $art->secure() == 2 ? 'selected' : '' ?>>2</option> </select> + </details> + <details close> + <summary>CSS</summary> + <label for="css">Styles CSS :</label> + <textarea name="css" id="css"><?= $art->css(); ?></textarea> <label for="couleurtext">Couleur du texte :</label> <input type="color" name="couleurtext" value="<?= $art->couleurtext() ?>" id="couleurtext"> <label for="couleurbkg">Couleur de l'arrière plan :</label> @@ -84,14 +89,18 @@ class Aff <input type="color" name="couleurlien" value="<?= $art->couleurlien() ?>" id="couleurlien"> <label for="couleurlienblank">Couleur des liens externes :</label> <input type="color" name="couleurlienblank" value="<?= $art->couleurlienblank() ?>" id="couleurlienblank"> + </details> + <details open> + <summary>Contenu</summary> <label for="html">Contenu :</label> <textarea name="html" id="html" ><?= $art->html('md'); ?></textarea> + </details> <input type="hidden" name="datecreation" value="<?= $art->datecreation('string'); ?>"> <input type="hidden" name="id" value="<?= $art->id() ?>"> <div class="submit"> <input type="submit" name="action" value="update"> <input type="submit" name="action" value="delete" onclick="confirmSubmit(event, 'Suppression de cet article')"> - </div> + </div> </form> </section> @@ -101,13 +110,13 @@ class Aff } -public function head($title) +public function head($title, $tool) { ?> <head> <meta charset="utf8" /> <meta name="viewport" content="width=device-width" /> - <link href="/css/style.css" rel="stylesheet" /> + <link href="/css/style<?= $tool ?>.css" rel="stylesheet" /> <title><?= $title ?></title> <script src="../rsc/js/app.js"></script> </head> diff --git a/class/class.app.php b/class/class.app.php index 08a7202..fbab4b4 100644 --- a/class/class.app.php +++ b/class/class.app.php @@ -187,7 +187,6 @@ class App public function login($pass) { if (strip_tags($pass) == $this->admin) { - var_dump($this->admin); return $level = 2; } elseif (strip_tags($pass) == $this->secure) { return $level = 1; diff --git a/public/css/style.css b/public/css/stylem.css index b0d8cc1..d942257 100644 --- a/public/css/style.css +++ b/public/css/stylem.css @@ -5,6 +5,7 @@ body { background-color: #dcdcdceb; font-family: helvetica, arial, sans-serif; margin: 0px; + overflow: scroll; } @@ -167,11 +168,32 @@ nav a { width: 8%; } -.thumbnail { - max-width: 100px; +.infobulle { + display: none; +} + +.little:focus .infobulle { + display: inline-block; + position: relative; + background-color: white; + border: 1px solid black; + z-index: 5; + top: 5px; + left: 100px; + width: 300px; +} + +span.infobulle img { + width: 100% } .grid { display: flex; flex-wrap: wrap; +} + +.little { + width: 100px; + height: 150px; + margin: 10px; }
\ No newline at end of file diff --git a/public/css/stylew.css b/public/css/stylew.css new file mode 100644 index 0000000..86ec715 --- /dev/null +++ b/public/css/stylew.css @@ -0,0 +1,202 @@ +html { +} + +body { + background-color: #dcdcdceb; + font-family: helvetica, arial, sans-serif; + margin: 0px; + +} + +h1 { + font-size: 3em; + font-variant: all-small-caps; + margin-top: 0px; + margin-bottom: 0px; +} + +h2 { + font-style: italic; +} + +h3 { + opacity: 0.7; +} + +h6 { + font-size: 1em; +} + +p{ + font-size: 1em; +} + +em { + opacity: 0.8; +} + +a{ + text-decoration: none; +} + +a:hover{ + text-decoration: underline; +} + +img { + width: 90%; + max-width: 1000px; +} + +section { + text-align: justify; + padding: 3%; + line-height: 1.2em; +} + +.edit { + text-align: left; + padding-top: 1%; + padding-bottom: 1%; + padding-left: 8%; + padding-right: 8%; + line-height: 1.2em; +} + + +section input, textarea, select { + width: 90%; + padding-left: 15px; + padding-right: 15px; + margin: 5px; + margin-left: 5%; + margin-right: 5%; + height: 30px; + border-style: unset; +} + +article { + position: relative; + z-index: 7; +} + +#html{ + height: 1000px; +} + +#css{ + height: 100px; +} + +input[type="submit"] { + background-color: #bfbfbf; +} + +aside { + position: fixed; + bottom: 0px; + right: -300px; + padding: 7px; + z-index: 5; + background: #bfbfbf; + opacity: 0.3; + width: 350px; + overflow-y: scroll; + max-height: 70%; +} + +aside:hover { + opacity: 1; + right: 0px; +} + +nav { + position: fixed; + top: 0px; + right: -50px; + padding: 7px; + z-index: 10; + background: #6c7d8a; + opacity: 0.3; + width:100px; + border-width: 4px; + border-style: outset; +} + +nav:hover { + opacity: 1; + right: -5px; +} + +.alert h4 { + background-color: red; + margin: 0px; +} + +nav a { + color: black; + padding: 1px 4px; + font-size: 13px; + background-color: #bfbfbf; + /* text-rendering: auto; */ + /* color: initial; */ + /* letter-spacing: normal; */ + /* word-spacing: normal; */ + /* text-transform: none; */ + text-indent: 0px; + text-decoration: none; + /* text-shadow: none; */ + /* display: inline-block; */ + /* -webkit-appearance: push-button; */ + align-items: flex-start; + text-align: center; + cursor: default; + /* color: buttontext; */ + /* background-color: buttonface; */ + box-sizing: border-box; + /* padding: 2px 6px 3px; */ + border-width: 2px; + border-color: lightgrey; + border-style: outset; +} + +.submit { + position: fixed; + top: 0px; + left: 0px; + width: 8%; +} + +.thumbnail { + max-width: 30px; +} + +.infobulle { + width: 20%; + display: none; +} + +.little:hover .infobulle { + display: inline; + position: absolute; + background-color: white; + border: 1px solid black; +} + +span.infobulle img { + width: 100% +} + +.grid { + display: flex; + flex-wrap: wrap; +} + +summary { + height: 24px; + outline: none; + font-size: 1.4em; + background-color: #bdbdbd; + margin-top: 3px; + margin-bottom: 3px; +}
\ No newline at end of file diff --git a/public/m/index.php b/public/m/index.php index f5e101d..bf14b0f 100644 --- a/public/m/index.php +++ b/public/m/index.php @@ -24,7 +24,7 @@ $aff = new Aff($level); // ______________________________________________________ H E A D _____________________________________________________________ $titre = 'home'; -$aff->head($titre); +$aff->head($titre, 'm'); // _____________________________________________________ A L E R T _______________________________________________________________ @@ -55,9 +55,6 @@ $aff->addmedia(); echo '<h1>Media</h1>'; -var_dump(2 ** 29); -var_dump(readablesize(2 ** 29)); - echo '<section class="grid">'; @@ -74,9 +71,14 @@ if ($handle = opendir($dir)) { list($width, $height, $type, $attr) = getimagesize($filepath); $filesize = filesize($filepath); - echo '<span>'; - echo '<h2>' . $entry . '</h2>'; + echo '<a href="#" class="little">'; + echo '<h3>' . $entry . '</h3>'; + + + + echo '<img class="thumbnail" src="' . $filepath . '" alt="' . $fileinfo['filename'] . '">'; + echo '<span class="infobulle">'; echo 'width = ' . $width; echo '<br/>'; echo 'height = ' . $height; @@ -84,10 +86,10 @@ if ($handle = opendir($dir)) { echo 'filesize = ' . readablesize($filesize); echo '<br/>'; - - echo '<img class="thumbnail" src="' . $filepath . '" title="' . $fileinfo['filename'] . '" alt="image">'; - + echo '<img src="' . $filepath . '" alt="' . $fileinfo['filename'] . '">'; echo '</span>'; + + echo '</a>'; } } closedir($handle); diff --git a/public/w/index.php b/public/w/index.php index 38a4132..d961d56 100644 --- a/public/w/index.php +++ b/public/w/index.php @@ -81,7 +81,7 @@ if (isset($_GET['id'])) { $titre = $art->titre(); } } -$aff->head($titre); +$aff->head($titre, 'w'); |