From a511593da994da9ba3fc47adcdb32fe63ac73b5e Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Mon, 21 May 2018 16:48:06 +0200 Subject: transfert --- public/css/stylebase.css | 200 +++++++++++++++++++++++++++++++++++++++++++++++ public/css/stylem.css | 196 ++++++---------------------------------------- public/css/stylew.css | 52 +++++++----- public/m/index.php | 90 ++++++++++++++++----- public/w/index.php | 36 +++++++-- 5 files changed, 358 insertions(+), 216 deletions(-) create mode 100644 public/css/stylebase.css (limited to 'public') diff --git a/public/css/stylebase.css b/public/css/stylebase.css new file mode 100644 index 0000000..46d43f4 --- /dev/null +++ b/public/css/stylebase.css @@ -0,0 +1,200 @@ +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; +} + +form { + margin-bottom: 0px; +} + +section { + text-align: justify; + padding: 3%; + line-height: 1.2em; +} + +.edit { + overflow-y: scroll; +} + +.edit section { + text-align: left; + padding-top: 0px; + padding-bottom: 0px; + padding-left: 8%; + padding-right: 8%; + line-height: 1.2em; +} + +.button, input, textarea, select { + display: inline-block; + width: 90%; + padding-left: 15px; + padding-right: 15px; + margin: 5px; + margin-left: 5%; + margin-right: 5%; + height: 30px; + border-style: unset; +} + +.button { + text-align: center; + color: black; + font-size: 13px; + padding-top: 7px; + background-color: #bfbfbf; + box-sizing: border-box; + align-items: flex-start; + text-align: center; + cursor: default; + white-space: pre; + -webkit-rtl-ordering: logical; + text-rendering: auto; + color: initial; + letter-spacing: normal; + word-spacing: normal; + text-transform: none; + text-indent: 0px; + text-shadow: none; +} + +.button:hover { + + text-decoration: none; +} + +article { + position: relative; + z-index: 7; +} + +#html{ + height: calc(100% - 95px); +} + +#css{ + height: 250px; +} + +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: calc(100% - 200px); +} + +aside:hover { + opacity: 1; + right: 0px; +} + +nav { + position: fixed; + top: 0px; + right: -6%; + z-index: 10; + opacity: 0.3; + width: 8%; + text-align: right; +} + + + +nav:hover, .edit nav { + opacity: 1; + right: 0px; +} + +.alert h4 { + background-color: red; + margin: 0px; +} + +table { + width: 100%; + margin-top: 20px; +} + +.home tr:hover { + background-color: #bfbfbf; +} + +.home td:hover { + background-color: #a7a6a6; +} + +td { + border: 1px solid #ffffff00; + padding-top: 3px; + padding-bottom: 3px; +} + +.submit { + position: fixed; + top: 0px; + left: 0px; + width: 8%; +} + + +summary { + height: 24px; + outline: none; + font-size: 1.4em; + background-color: #a0a0a0; + margin-top: 3px; + margin-bottom: 3px; +} \ No newline at end of file diff --git a/public/css/stylem.css b/public/css/stylem.css index d942257..4e18678 100644 --- a/public/css/stylem.css +++ b/public/css/stylem.css @@ -1,199 +1,51 @@ -html { -} - -body { - background-color: #dcdcdceb; - font-family: helvetica, arial, sans-serif; - margin: 0px; - overflow: scroll; - -} - -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: 100; -} - -#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%; -} .infobulle { display: none; } -.little:focus .infobulle { +.little:hover .infobulle { display: inline-block; position: relative; background-color: white; - border: 1px solid black; z-index: 5; top: 5px; - left: 100px; width: 300px; + font-family: monospace; + font-size: 0.9em; + line-height: 1.1em; } span.infobulle img { - width: 100% + width: 100%; } .grid { display: flex; flex-wrap: wrap; + padding: 4%; + margin-right: 120px; + } .little { width: 100px; height: 150px; margin: 10px; + background-color: white; + +} + +.infobulle input[type="text"] { + font-family: monospace; + font-size: 0.9em; + margin: 3px; +} + +img.thumbnail { + width: 100%; +} + +section.gest { + padding-bottom: 300px; } \ No newline at end of file diff --git a/public/css/stylew.css b/public/css/stylew.css index ab206a3..3a414c7 100644 --- a/public/css/stylew.css +++ b/public/css/stylew.css @@ -1,6 +1,3 @@ -html { -} - body { background-color: #dcdcdceb; font-family: helvetica, arial, sans-serif; @@ -58,11 +55,11 @@ section { line-height: 1.2em; } -body.edit { +.edit { overflow-y: scroll; } -body.edit section { +.edit section { text-align: left; padding-top: 0px; padding-bottom: 0px; @@ -136,7 +133,7 @@ aside { opacity: 0.3; width: 350px; overflow-y: scroll; - max-height: 70%; + max-height: calc(100% - 200px); } aside:hover { @@ -156,7 +153,7 @@ nav { -nav:hover, body.edit nav { +nav:hover, .edit nav { opacity: 1; right: 0px; } @@ -171,6 +168,20 @@ table { margin-top: 20px; } +.home tr:hover { + background-color: #bfbfbf; +} + +.home td:hover { + background-color: #a7a6a6; +} + +td { + border: 1px solid #ffffff00; + padding-top: 3px; + padding-bottom: 3px; +} + .submit { position: fixed; top: 0px; @@ -203,18 +214,23 @@ span.infobulle img { flex-wrap: wrap; } -summary { - height: 24px; - outline: none; - font-size: 1.4em; - background-color: #bdbdbd; - margin-top: 3px; - margin-bottom: 3px; -} - -.template { +.copy { position: fixed; bottom: 0px; left: 0px; width: 8%; -} \ No newline at end of file +} + +.container { + position: relative; + width: 100%; + height: 0; + padding-bottom: 56.25%; + } + .video { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } \ No newline at end of file diff --git a/public/m/index.php b/public/m/index.php index bf14b0f..e29c801 100644 --- a/public/m/index.php +++ b/public/m/index.php @@ -9,6 +9,7 @@ $config = require('../../config.php'); require('../../fn/fn.php'); require('../../class/class.art.php'); +require('../../class/class.media.php'); require('../../class/class.app.php'); require('../../class/class.aff.php'); session(); @@ -42,6 +43,24 @@ if (isset($_POST['action'])) { case 'addmedia': $app->addmedia($_FILES, 2 ** 30, $_POST['id']); break; + + case 'login': + $_SESSION['level'] = $app->login($_POST['pass']); + if (isset($_GET['id'])) { + header('Location: ?id=' . $_GET['id']); + } else { + header('Location: ?'); + } + break; + + case 'logout': + $_SESSION['level'] = $app->logout(); + if (isset($_GET['id'])) { + header('Location: ?id=' . $_GET['id']); + } else { + header('Location: ?'); + } + break; } } @@ -53,49 +72,84 @@ echo ''; $aff->nav($app); $aff->addmedia(); -echo '

Media

'; -echo '
'; +echo '
'; +echo 'Media List'; +echo '

Media

'; +echo '
'; $dir = "../media/"; +echo '
'; + +echo '
'; if ($handle = opendir($dir)) { while (false !== ($entry = readdir($handle))) { if ($entry != "." && $entry != "..") { $fileinfo = pathinfo($entry); - $filepath = '../media/' . $fileinfo['filename'] . '.' . $fileinfo['extension']; + $filepath = $dir . $fileinfo['filename'] . '.' . $fileinfo['extension']; list($width, $height, $type, $attr) = getimagesize($filepath); $filesize = filesize($filepath); - echo ''; - echo '

' . $entry . '

'; + echo '
'; } - closedir($handle); } +closedir($handle); +} + +echo '
'; + +?> + + + +
+ + + +'; +echo '
'; + +var_dump($app->getlistermedia($dir)); echo ''; diff --git a/public/w/index.php b/public/w/index.php index 51bce0e..71f1728 100644 --- a/public/w/index.php +++ b/public/w/index.php @@ -38,11 +38,25 @@ if (isset($_POST['action'])) { } break; - case 'template': + case 'copy': if ($app->exist($_GET['id'])) { - $template = $app->get($_POST['template']); + $copy = $app->get($_POST['copy']); $art = $app->get($_POST['id']); - $art->setcss($template->css()); + if (!empty($_POST['css'])) { + $art->setcss($copy->css()); + } + if (!empty($_POST['color'])) { + $art->setcouleurtext($copy->couleurtext()); + $art->setcouleurbkg($copy->couleurbkg()); + $art->setcouleurlien($copy->couleurlien()); + $art->setcouleurlienblank($copy->couleurlienblank()); + } + if (!empty($_POST['html'])) { + $art->sethtml($copy->md()); + } + if (!empty($_POST['template'])) { + $art->settemplate($copy->template()); + } $app->update($art); header('Location: ?id=' . $art->id() . '&edit=1'); } @@ -98,7 +112,7 @@ $aff->head($titre, 'w'); // ______________________________________________________ B O D Y _______________________________________________________________ - +echo ''; $aff->nav($app); if (isset($_GET['id'])) { @@ -107,9 +121,9 @@ if (isset($_GET['id'])) { $art = $app->get($_GET['id']); - if (isset($_GET['edit']) and $_GET['edit'] == 1) { - $aff->edit($art, $app->lister()); - $aff->template($art, $app->lister()); + if (isset($_GET['edit']) and $_GET['edit'] == 1 and $aff->session() == 2) { + $aff->edit($art, $app->getlister(['id', 'titre'], 'id')); + $aff->copy($art, $app->getlister(['id', 'titre'], 'id')); $aff->aside($app->lister()); } else { $aff->lecture($art, $app); @@ -147,8 +161,14 @@ if (isset($_GET['id'])) { } else { $tri = 'id'; } - $aff->home2table($app->getlister(['id', 'titre', 'intro', 'lien'], $tri)); + if (isset($_GET['desc'])) { + $desc = strip_tags($_GET['desc']); + } else { + $desc = 'ASC'; + } + $aff->home2table($app->getlister(['id', 'titre', 'intro', 'lien', 'datecreation', 'datemodif'], $tri, $desc)); } +echo ''; ?> -- cgit v1.2.3