diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-10-04 05:10:51 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-10-04 05:10:51 +0200 |
commit | 67b20c49ec4e5efb4526fc64ef679dfb6dd41e30 (patch) | |
tree | 289a6da21e036b62c881bc505a079d5d64dc1c20 /public | |
parent | c3c4be4a4efd1404aad19797c15d2a9a6ffe29a6 (diff) | |
download | wcms-67b20c49ec4e5efb4526fc64ef679dfb6dd41e30.tar.gz wcms-67b20c49ec4e5efb4526fc64ef679dfb6dd41e30.zip |
2.8 auto-tag-update + help + tabs
Diffstat (limited to 'public')
-rw-r--r-- | public/css/stylebase.css | 22 | ||||
-rw-r--r-- | public/css/styleedit.css | 150 | ||||
-rw-r--r-- | public/test/index.php | 24 | ||||
-rw-r--r-- | public/w/article.php | 9 | ||||
-rw-r--r-- | public/w/index.php | 36 |
5 files changed, 207 insertions, 34 deletions
diff --git a/public/css/stylebase.css b/public/css/stylebase.css index c733e79..017b075 100644 --- a/public/css/stylebase.css +++ b/public/css/stylebase.css @@ -5,14 +5,32 @@ --color4: grey; } + +@keyframes alert { + from {top: 30px;} + to {top: -50px;} +} + body { margin: 0; - font-family: monospace; + font-family: sans-serif; background-color: var(--color4); } - +span.alert { + position: fixed; + background-color: var(--color1); + z-index: 100; + border: ridge red; + width: 200px; + text-align: center; + padding: 5px; + top: 30px; + font-weight: bold; + left: calc(50% - 100px); + animation: alert 1s linear 2s forwards; +} form{ diff --git a/public/css/styleedit.css b/public/css/styleedit.css index 3a868c3..fe6745f 100644 --- a/public/css/styleedit.css +++ b/public/css/styleedit.css @@ -25,37 +25,25 @@ details { - - - -details#editinfo { - position: fixed; - top: 0; - left: 10%; - width: 40%; -} - -details#editcss { - position: fixed; - top: 0; - left: 50%; - width: 40%; +.sidebar { + position: fixed; + width: 250px; + height: 100%; + overflow: scroll; + overflow-x: hidden; } div#submit { - position: fixed; - top: 0; - width: 10%; + position: relative; } -textarea#html { - width: 100%; +textarea { + position: fixed; + width: calc(100% - 250px); + right: 0px; height: 100%; font-size: 1em; - padding-top: 40px; - padding-bottom: 40px; - font-family: serif; - padding-left: 2%; + padding: 2%; padding-right: calc(50% - 500px); resize: none; @@ -96,19 +84,25 @@ div#roll ul { details label { - display: block; margin-top: 4px; } -textarea#css { - width: 100%; - height: 200px; -} details select, details input, details label, details textarea#css { width: 100%; } +details input[type="checkbox"] +{ + width: auto; +} + +ul { + list-style: none; + padding: 0; + margin: 2px; +} + fieldset { margin: 0; padding: 0; @@ -120,6 +114,104 @@ summary, div#linklist, div#copy, div#submit { } +span#headid { + font-weight: bold; + padding-left: 1%; + padding-right: 1%; + border: ridge; + background-color: var(--color3); + +} + +input#fontsize { + width: 40px; +} + +summary { + background-color: var(--color1); + border: outset; + font-weight: bold; +} + +summary:focus { + outline: none; +} + +div#help { + padding: 2px; +} + +div#help pre { + background-color: white; + margin-bottom: 2px; +} + +div#help p { + background-color: var(--color3); + margin-top: 4px; +} + +div#help h3 {margin-bottom: 8px;} + +span.i { + background-color: var(--color2); + color: white; +} + + + +/* ------------------------------ TABS ----------------------------- */ + + + +.tabs +{ + position: absolute; + left: 250px; + top: 28px; +} + +.tabs .tab +{ + float: left; +} + +.tabs .tab .content +{ + position: absolute; + background-color: white; + left: 0px; + width: 100%; + border: 1px #000 solid; +} + +.checkboxtab +{ + display: none; +} + +.tab label +{ + margin-right: 10px; + border: outset; + background-color: var(--color1); +} + +.checkboxtab:checked ~ label +{ + border: inset; +} + +.checkboxtab:checked ~ .content +{ + z-index: 1; +} + + + + + + @media (max-width: 600px) { details#editinfo, details#editcss, div#copy, div#linklist { diff --git a/public/test/index.php b/public/test/index.php new file mode 100644 index 0000000..5b778ee --- /dev/null +++ b/public/test/index.php @@ -0,0 +1,24 @@ + + +<?php + +$pattern = "/%%(\w*)%%/"; + +$string = "bla bla bld dd d , dfddddddsdsdf fzpapap %q dsq%%c%%dd % dsqqsd %% dsqq dsq sd %%c%%dsssssssssss dsqd %%coucouhibou%% fdsf fdsf fdsfsdfsdf "; + + + +preg_match_all($pattern, $string, $out); + +foreach ($out[0] as $key => $value) { + $replace = '^^ÔHYEAH BB££___'.$out[1][$key]. '_____§§§§§§'; + $string = str_replace($value, $replace, $string); + +} + + +var_dump($out); + +var_dump($string); + +?>
\ No newline at end of file diff --git a/public/w/article.php b/public/w/article.php index e5cfff7..307caa4 100644 --- a/public/w/article.php +++ b/public/w/article.php @@ -6,12 +6,17 @@ if ($app->exist($_GET['id'])) { if (isset($_GET['edit']) and $_GET['edit'] == 1 and $app->session() >= $app::EDITOR) { echo '<section class=edit>'; - $aff->edit($art, $app, $app->getlister(['id', 'titre'])); - $aff->copy($art, $app->getlister(['id', 'titre'])); + $aff->edit($art, $app, $app->getlister(['id', 'titre']), $config->fontsize(), $app->getlistermedia($app::MEDIA_DIR, 'image')); + //$aff->copy($art, $app->getlister(['id', 'titre'])); $aff->aside($app); echo '</section>'; } else { echo '<section class="lecture">'; + + + $art->autotaglistupdate($app->taglist($app->getlister(['id', 'titre', 'intro', 'tag']), $art->autotaglist())); + + $aff->lecture($art, $app); echo '</section>'; diff --git a/public/w/index.php b/public/w/index.php index 1f3e967..887cc9a 100644 --- a/public/w/index.php +++ b/public/w/index.php @@ -118,8 +118,42 @@ if (isset($_POST['action'])) { case 'update': if ($app->exist($_GET['id'])) { $art = new Art($_POST); + $art->updatelien(); + $art->autotaglistcalc($app->taglist($app->getlister(['id', 'titre', 'tag']), $art->autotaglist())); $app->update($art); - header('Location: ?id=' . $art->id() . '&edit=1'); + if($config->fontsize() != $_POST['fontsize']) { + $config->setfontsize($_POST['fontsize']); + $app->savejson($config->tojson()); + } + header('Location: ?id=' . $art->id() . '&edit=1&message='.$art->id().'_saved'); + } + break; + + case 'display': + if ($app->exist($_GET['id'])) { + $art = new Art($_POST); + $art->updatelien(); + $art->autotaglistcalc($app->taglist($app->getlister(['id', 'titre', 'tag']), $art->autotaglist())); + $app->update($art); + if($config->fontsize() != $_POST['fontsize']) { + $config->setfontsize($_POST['fontsize']); + $app->savejson($config->tojson()); + } + header('Location: ?id=' . $art->id().'&message='.$art->id().'_saved'); + } + break; + + case 'home': + if ($app->exist($_GET['id'])) { + $art = new Art($_POST); + $art->updatelien(); + $art->autotaglistcalc($app->taglist($app->getlister(['id', 'titre', 'tag']), $art->autotaglist())); + $app->update($art); + if($config->fontsize() != $_POST['fontsize']) { + $config->setfontsize($_POST['fontsize']); + $app->savejson($config->tojson()); + } + header('Location: ./?message='.$art->id().'_saved'); } break; |