From 50e367e56b367259a2e6fb29621c97e9b0fc9c5e Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sun, 18 Aug 2019 03:33:11 +0200 Subject: interface home update --- app/class/controllerhome.php | 12 +- app/view/templates/backtopbar.php | 3 +- app/view/templates/home.php | 366 ++++++++++++++++++-------------------- app/view/templates/homemenu.php | 49 +++++ app/view/templates/homeopt.php | 292 +++++++++++++++--------------- assets/css/home.css | 74 +++++++- composer.json | 2 +- 7 files changed, 445 insertions(+), 353 deletions(-) create mode 100644 app/view/templates/homemenu.php diff --git a/app/class/controllerhome.php b/app/class/controllerhome.php index e177272..5a6d839 100644 --- a/app/class/controllerhome.php +++ b/app/class/controllerhome.php @@ -62,7 +62,17 @@ class Controllerhome extends Controller public function search() { if(isset($_POST['id']) && !empty($_POST['id'])) { - $this->routedirect('artread/', ['art' => $_POST['id']]); + if(isset($_POST['action'])) { + switch ($_POST['action']) { + case 'read': + $this->routedirect('artread/', ['art' => $_POST['id']]); + break; + + case 'edit': + $this->routedirect('artedit', ['art' => $_POST['id']]); + break; + } + } } else { $this->routedirect('home'); } diff --git a/app/view/templates/backtopbar.php b/app/view/templates/backtopbar.php index 91ccd89..8e15d14 100644 --- a/app/view/templates/backtopbar.php +++ b/app/view/templates/backtopbar.php @@ -3,7 +3,8 @@
- + +iseditor() ? '' : '' ?>
diff --git a/app/view/templates/home.php b/app/view/templates/home.php index bf00301..f2d2668 100644 --- a/app/view/templates/home.php +++ b/app/view/templates/home.php @@ -10,196 +10,182 @@ insert('backtopbar', ['user' => $user, 'tab' => 'home']) ?> -iseditor()) { ?> - -
- - - - - - - - insert('homeopt', ['opt' => $opt, 'user' => $user]) ?> - -
- -
- -

Pages ()

- - -
- Import W JSON page file - Upload page file as json -
- - - - -
- - -
- - -
- - -
- - -
- -
-
- -
> - Generate list - Generate code to display a list of pages -
- - - - description() ? 'checked' : '' ?>> - -
- - thumbnail() ? 'checked' : '' ?>> - -
- - date() ? 'checked' : '' ?>> - -
- - author() ? 'checked' : '' ?>> - -
- - -
- - ' . $optlist->getcode() . ''; - } - - ?> -
- - - -
- -
- - - - -
- - - - - - - - - - - issupereditor()) { ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - issupereditor()) { ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
xideditseedeldltagtitlesummarytofromlast modificationdate of creationdateprivacyvisiteditaff
tag('sort') ?>title() ?>description('short') ?>linkto('sort') ?>linkfrom('sort') ?>datemodif('hrdi') ?>datecreation('hrdi') ?>date('dmy') ?>secure('string') ?>visitcount() ?>editcount() ?>affcount() ?>
-
-
-
-
- - - -insert('footer', ['footer' => $footer]) ?> + iseditor()) { ?> + + + + insert('homemenu', ['user' => $user]) ?> + + +
+ + + insert('homeopt', ['opt' => $opt, 'user' => $user]) ?> + +
+ +
+ +

Pages ()

+ + +
> + Generate list + Generate code to display a list of pages +
+ + + + description() ? 'checked' : '' ?>> + +
+ + thumbnail() ? 'checked' : '' ?>> + +
+ + date() ? 'checked' : '' ?>> + +
+ + author() ? 'checked' : '' ?>> + +
+ + +
+ + ' . $optlist->getcode() . ''; + } + + ?> +
+ + + +
+ +
+ + +
+ + + + + + + + + + issupereditor()) { ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + issupereditor()) { ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
xideditseedeldltagtitlesummarytofromlast modificationdate of creationdateprivacyvisiteditaff
tag('sort') ?>title() ?>description('short') ?>linkto('sort') ?>linkfrom('sort') ?>datemodif('hrdi') ?>datecreation('hrdi') ?>date('dmy') ?>secure('string') ?>visitcount() ?>editcount() ?>affcount() ?>
+
+ +
+ +
+
+ + insert('footer', ['footer' => $footer]) ?> + + diff --git a/app/view/templates/homemenu.php b/app/view/templates/homemenu.php new file mode 100644 index 0000000..2dd486c --- /dev/null +++ b/app/view/templates/homemenu.php @@ -0,0 +1,49 @@ + \ No newline at end of file diff --git a/app/view/templates/homeopt.php b/app/view/templates/homeopt.php index 8b1b7d7..27d5625 100644 --- a/app/view/templates/homeopt.php +++ b/app/view/templates/homeopt.php @@ -1,154 +1,140 @@ -
-

Options

-
- -⬅ - -
- -
Sort - -
-order() == '1' ? "checked" : "" ?>/> -
-order() == '-1' ? "checked" : "" ?>/> - -
- -
Privacy
    -
  • secure() == 4 ? "checked" : "" ?>/>
  • -
  • secure() == 2 ? "checked" : "" ?>/>
  • -
  • secure() == 1 ? "checked" : "" ?>/>
  • -
  • secure() == 0 ? "checked" : "" ?>/>
  • -
- -
Tag - -
    - -tagcompare() == "OR" ? "checked" : "" ?> > -tagcompare() == "AND" ? "checked" : "" ?>> - -taglist() as $tagfilter => $count) { - - if ($count > $limit && $in == false) { - echo '
    >' . $limit . ''; - $in = true; - } - if ($count == $limit && $in == true && $out == false) { - echo '
    ' . $limit . ''; - $out = true; - } - - if (in_array($tagfilter, $opt->tagfilter())) { - - echo '
  • '; - } else { - echo '
  • '; - } -} -if ($in = true || $out = true) { - echo '
    '; -} -?> - -
- -
- -
- Author(s) - -
    - -authorcompare() == "OR" ? "checked" : "" ?> > -authorcompare() == "AND" ? "checked" : "" ?>> - -authorlist() as $authorfilter => $count) { - - if ($count > $limit && $in == false) { - echo '
    >' . $limit . ''; - $in = true; - } - if ($count == $limit && $in == true && $out == false) { - echo '
    ' . $limit . ''; - $out = true; - } - - if (in_array($authorfilter, $opt->authorfilter())) { - - echo '
  • '; - } else { - echo '
  • '; - } -} -if ($in = true || $out = true) { - echo '
    '; -} -?> - -
+
- - invert() == 1) { - echo ''; - } else { - echo ''; - } - echo '
- - - -⬅ - -isadmin()) { ?> - - - -

Columns

- -
- -
    - - -
  • - columns()) ? 'checked' : '' ?>> - -
  • - - -
- - - -
- - - -
+ \ No newline at end of file diff --git a/assets/css/home.css b/assets/css/home.css index 736989d..d1d58e8 100644 --- a/assets/css/home.css +++ b/assets/css/home.css @@ -14,6 +14,32 @@ div#options, article#main { main.home { display: flex; + height: 100%; + /* width: 100%; */ +} + + +aside.home { + display: flex; + background-color: darkgrey; +} + + + +aside.home details, aside.home span { + width: 30%; +} + + + +aside.home details form, aside.home summary { + background-color: darkgrey; +} + + +aside.home form { + position: absolute; + border: solid 1px dimgrey; } main.home article#main { @@ -57,14 +83,13 @@ h1, h2 { margin: 0; background-color: #7b97b9; color: white; - padding: 0.1% 0.5%; font-size: larger; } main.media div, main.home div#options, main.info nav, main article { - border: ridge 1px dimgrey; + border: solid 1px dimgrey; margin: 1%; background-color: lightgrey; } @@ -102,9 +127,10 @@ a:hover { color: white; } -#options ul { +ul { list-style: none; padding-inline-start: 0; + margin: 0; } th { @@ -121,10 +147,6 @@ main.admin input, main.admin select, main.admin textarea { width: 100%; } -main section { - width: fit-content; - margin: 1%; -} div.checkbox [type="checkbox"] { @@ -388,6 +410,44 @@ main.timeline li.event { + +section.pages { + display: flex; + flex-direction: column; + max-width: calc(100% - 160px); +} + +.home nav { + display: flex; + flex-direction: column; + height: 100%; + min-width: 160px; +} + + +.block { + background-color: lightgrey; + display: flex; + flex-direction: column; + max-height: 100%; + width: 100%; +} + +.scroll { + overflow: auto; + height: 100%; + max-width: 100%; +} + +footer { + background-color: black; + color: white; + opacity: 0.4; +} + + + + @media (max-width: 600px) { main.home .summary, main.home .linkfrom, main.home .linkto, main.home .delete, main.home .datecreation, main.home .date, main.home .log, main.home .secure, main.home .tag, .hidephone { display: none; diff --git a/composer.json b/composer.json index b9e0239..f607921 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "w-cms", "description": "point'n think", - "version": "1.4.4", + "version": "1.4.5", "require": { "michelf/php-markdown": "^1.8", "league/plates": "3.*", -- cgit v1.2.3