From 33ed4c75fc932cafd701d47d3d58f6e68f5c2e2b Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sat, 13 Jul 2019 11:54:46 +0200 Subject: 1.2.6 Environnement update backtopbar always visible + minor fixes --- app/class/art2.php | 2 +- app/class/controllerart.php | 2 +- app/class/model.php | 2 +- app/view/templates/backtopbar.php | 51 +++++++++++++------------ app/view/templates/edit.php | 3 ++ app/view/templates/editleftbar.php | 2 +- app/view/templates/edittopbar.php | 32 ++++------------ app/view/templates/home.php | 6 +-- assets/css/edit.css | 74 ++++++++++++++++++++++++++++++++----- assets/css/home.css | 23 +++++++++++- assets/icons/admin.png | Bin 0 -> 629 bytes assets/icons/download.png | Bin 0 -> 350 bytes assets/icons/edit.png | Bin 0 -> 491 bytes assets/icons/font.png | Bin 0 -> 608 bytes assets/icons/home.png | Bin 0 -> 484 bytes assets/icons/info.png | Bin 0 -> 876 bytes assets/icons/media.png | Bin 0 -> 617 bytes assets/icons/read.png | Bin 0 -> 574 bytes assets/icons/timeline.png | Bin 0 -> 311 bytes assets/icons/user.png | Bin 0 -> 538 bytes composer.json | 2 +- 21 files changed, 131 insertions(+), 68 deletions(-) create mode 100644 assets/icons/admin.png create mode 100644 assets/icons/download.png create mode 100644 assets/icons/edit.png create mode 100644 assets/icons/font.png create mode 100644 assets/icons/home.png create mode 100644 assets/icons/info.png create mode 100644 assets/icons/media.png create mode 100644 assets/icons/read.png create mode 100644 assets/icons/timeline.png create mode 100644 assets/icons/user.png diff --git a/app/class/art2.php b/app/class/art2.php index 2bd1138..81b6569 100644 --- a/app/class/art2.php +++ b/app/class/art2.php @@ -171,7 +171,7 @@ class Art2 public function description($type = 'string') { if($type == 'short' && strlen($this->description) > 15 ) { - return substr($this->description, 0, 15) . '.'; + return substr($this->description, 0, 20) . '...'; } else { return $this->description; } diff --git a/app/class/controllerart.php b/app/class/controllerart.php index ce742a1..f8155ea 100644 --- a/app/class/controllerart.php +++ b/app/class/controllerart.php @@ -171,7 +171,7 @@ class Controllerart extends Controller } $fonts = []; - $this->showtemplate('edit', ['art' => $this->art, 'artexist' => true, 'tablist' => $tablist, 'artlist' => $idlist, 'showleftpanel' => $showleftpanel, 'showrightpanel' => $showrightpanel, 'fonts' => $fonts, 'tagartlist' => $tagartlist, 'lasteditedartlist' => $lasteditedartlist, 'faviconlist' => $faviconlist, 'editorlist' => $editorlist]); + $this->showtemplate('edit', ['art' => $this->art, 'artexist' => true, 'tablist' => $tablist, 'artlist' => $idlist, 'showleftpanel' => $showleftpanel, 'showrightpanel' => $showrightpanel, 'fonts' => $fonts, 'tagartlist' => $tagartlist, 'lasteditedartlist' => $lasteditedartlist, 'faviconlist' => $faviconlist, 'editorlist' => $editorlist, 'user' => $this->user]); } else { $this->routedirect('artread/', ['art' => $this->art->id()]); } diff --git a/app/class/model.php b/app/class/model.php index b514b00..2b222ec 100644 --- a/app/class/model.php +++ b/app/class/model.php @@ -17,7 +17,7 @@ abstract class Model const MEDIA_EXTENSIONS = array('jpeg', 'jpg', 'JPG', 'png', 'gif', 'mp3', 'mp4', 'mov', 'wav', 'flac', 'pdf'); const MEDIA_TYPES = ['image', 'video', 'sound', 'other']; - const COLUMNS = ['title', 'description', 'tag', 'date', 'datemodif', 'datecreation', 'secure', 'linkfrom', 'linkto', 'visitcount', 'affcount', 'editcount']; + const COLUMNS = ['id', 'title', 'description', 'tag', 'date', 'datemodif', 'datecreation', 'secure', 'linkfrom', 'linkto', 'visitcount', 'affcount', 'editcount']; const TEXT_ELEMENTS = ['header', 'nav', 'main', 'aside', 'footer']; const EDIT_SYMBOLS = ['pen', 'tool', 'none']; diff --git a/app/view/templates/backtopbar.php b/app/view/templates/backtopbar.php index d6b522e..7d04c2e 100644 --- a/app/view/templates/backtopbar.php +++ b/app/view/templates/backtopbar.php @@ -8,6 +8,31 @@ + +iseditor()) { ?> + + +>home +>media +>font +isadmin()) { +?> +>admin + +>info + + + + + + + + + + isvisitor()) { ?> @@ -23,8 +48,8 @@ ->timeline ->id() ?> level() ?> +>timeline +>id() ?> level() ?> @@ -39,28 +64,6 @@ - - -iseditor()) { ?> - - ->home ->media ->font -isadmin()) { -?> ->admin - ->info - - - - - - \ No newline at end of file diff --git a/app/view/templates/edit.php b/app/view/templates/edit.php index 8d79174..5ce1d35 100644 --- a/app/view/templates/edit.php +++ b/app/view/templates/edit.php @@ -10,6 +10,9 @@
+ insert('backtopbar', ['user' => $user, 'tab' => 'edit']) ?> + + insert('edittopbar', ['art' => $art, 'user' => $user]) ?>
diff --git a/app/view/templates/editleftbar.php b/app/view/templates/editleftbar.php index d510f5d..7b4986d 100644 --- a/app/view/templates/editleftbar.php +++ b/app/view/templates/editleftbar.php @@ -62,7 +62,7 @@
templatebody()) || !empty($art->templatecss()) || !empty($art->templatejavascript()) ? 'open' : '' ?>> - Tempalte + Template
@@ -18,38 +17,21 @@ - 👁 + display id() ?> - - - - - iseditor()) { ?> - - 📁media - 📝font - - isadmin()) { - ?> - 🔑admin - - - - - - + + download + + + delete diff --git a/app/view/templates/home.php b/app/view/templates/home.php index 137e1b3..c741c70 100644 --- a/app/view/templates/home.php +++ b/app/view/templates/home.php @@ -117,11 +117,11 @@ - - 👁 + + issupereditor()) { ?> - + tag('sort') ?> diff --git a/assets/css/edit.css b/assets/css/edit.css index 518eff0..54616ff 100644 --- a/assets/css/edit.css +++ b/assets/css/edit.css @@ -9,7 +9,7 @@ div#main { body { margin: 0; height: 100%; - font-family: monospace; + font-family: sans-serif; font-size: 15px; } @@ -96,7 +96,7 @@ body { .editor #workspace { display: flex; - height: calc(100% - 30px); + height: calc(100% - 50px); position: relative; } @@ -172,16 +172,17 @@ html { overflow: hidden; } -.editor #topbar { - height: 30px; - background-color: #7b97b9; - line-height: 30px; +.editor #edittopbar { + height: 24px; + background-color: #a9a9a9; + line-height: 18px; + border-bottom: grey solid 1px; } .editor div#editmenu { - height: 30px; - line-height: 30px; + /* height: 25px; */ + /* line-height: 18px; */ display: flex; flex-direction: row; justify-content: space-between; @@ -230,6 +231,61 @@ a:hover { color: white; } + +#topbar { + background-color: #7b97b9; + width: 100%; + padding: 3px 0.5%; + border-bottom: solid 1px dimgrey; +} + +#topbar form { + display: inline; +} + + +#topbar span#menu { + display: inline-block; + margin: 0 1%; +} + +#topbar input[type="text"], #topbar input[type="password"] {width: 100px;} + +main.font table#fontlist { + width: 100%; + max-width: 500px; +} + +main.media table#medialist { + width: 100%; + max-width: 960px; +} + +#topbar a.actualpage { + text-decoration: underline; +} + +span#user { + float: right; +} + +span#search { + float: left; +} + + + + +img.icon { + height: 15px; +} + +a:hover img.icon { + filter: invert(1); +} + + + #fonts select { height: 150px; } @@ -323,7 +379,7 @@ div#thumbnail img { display: none; } - #topbar .text { + #edittopbar .text { display: none; } diff --git a/assets/css/home.css b/assets/css/home.css index cc86a55..121098e 100644 --- a/assets/css/home.css +++ b/assets/css/home.css @@ -26,12 +26,17 @@ main.home div#main { flex-direction: column; } +main.home table#home2table label { + font-family: monospace; + font-size: medium; +} + body { margin: 0; height: 100%; background-color: grey; - font-family: monospace; + font-family: sans-serif; font-size: 15px; position: fixed; display: flex; @@ -146,7 +151,6 @@ span#search { #topbar input[type="text"], #topbar input[type="password"] {width: 100px;} - main.font table#fontlist { width: 100%; max-width: 500px; @@ -161,6 +165,19 @@ main.media table#medialist { text-decoration: underline; } + + +img.icon { + height: 15px; +} + +a:hover img.icon { + filter: invert(1); +} + + + + main.media table#faviconlist { width: 100%; max-width: 640px; @@ -183,6 +200,8 @@ main.info code, main.info blockquote { color: white; background-color: #191919; width: fit-content; + font-family: monospace; + font-size: initial; } main.info blockquote i { diff --git a/assets/icons/admin.png b/assets/icons/admin.png new file mode 100644 index 0000000..2d6713d Binary files /dev/null and b/assets/icons/admin.png differ diff --git a/assets/icons/download.png b/assets/icons/download.png new file mode 100644 index 0000000..a18aeec Binary files /dev/null and b/assets/icons/download.png differ diff --git a/assets/icons/edit.png b/assets/icons/edit.png new file mode 100644 index 0000000..8cda46d Binary files /dev/null and b/assets/icons/edit.png differ diff --git a/assets/icons/font.png b/assets/icons/font.png new file mode 100644 index 0000000..1ef851e Binary files /dev/null and b/assets/icons/font.png differ diff --git a/assets/icons/home.png b/assets/icons/home.png new file mode 100644 index 0000000..4d74cf6 Binary files /dev/null and b/assets/icons/home.png differ diff --git a/assets/icons/info.png b/assets/icons/info.png new file mode 100644 index 0000000..bb1fd19 Binary files /dev/null and b/assets/icons/info.png differ diff --git a/assets/icons/media.png b/assets/icons/media.png new file mode 100644 index 0000000..b010c47 Binary files /dev/null and b/assets/icons/media.png differ diff --git a/assets/icons/read.png b/assets/icons/read.png new file mode 100644 index 0000000..132d980 Binary files /dev/null and b/assets/icons/read.png differ diff --git a/assets/icons/timeline.png b/assets/icons/timeline.png new file mode 100644 index 0000000..35bca8c Binary files /dev/null and b/assets/icons/timeline.png differ diff --git a/assets/icons/user.png b/assets/icons/user.png new file mode 100644 index 0000000..7aba547 Binary files /dev/null and b/assets/icons/user.png differ diff --git a/composer.json b/composer.json index 6817c3d..e9ebc9c 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "w-cms", "description": "point'n think", - "version": "1.2.5", + "version": "1.2.6", "require": { "michelf/php-markdown": "^1.8", "league/plates": "3.*", -- cgit v1.2.3