aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/class/art2.php2
-rw-r--r--app/class/controllerart.php2
-rw-r--r--app/class/model.php2
-rw-r--r--app/view/templates/backtopbar.php51
-rw-r--r--app/view/templates/edit.php3
-rw-r--r--app/view/templates/editleftbar.php2
-rw-r--r--app/view/templates/edittopbar.php32
-rw-r--r--app/view/templates/home.php6
-rw-r--r--assets/css/edit.css74
-rw-r--r--assets/css/home.css23
-rw-r--r--assets/icons/admin.pngbin0 -> 629 bytes
-rw-r--r--assets/icons/download.pngbin0 -> 350 bytes
-rw-r--r--assets/icons/edit.pngbin0 -> 491 bytes
-rw-r--r--assets/icons/font.pngbin0 -> 608 bytes
-rw-r--r--assets/icons/home.pngbin0 -> 484 bytes
-rw-r--r--assets/icons/info.pngbin0 -> 876 bytes
-rw-r--r--assets/icons/media.pngbin0 -> 617 bytes
-rw-r--r--assets/icons/read.pngbin0 -> 574 bytes
-rw-r--r--assets/icons/timeline.pngbin0 -> 311 bytes
-rw-r--r--assets/icons/user.pngbin0 -> 538 bytes
-rw-r--r--composer.json2
21 files changed, 131 insertions, 68 deletions
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 @@
</span>
+
+<?php if($user->iseditor()) { ?>
+
+<span id="menu">
+<a href="<?= $this->url('home') ?>" <?= $tab == 'home' ? 'class="actualpage"' : '' ?>><img src="/assets/icons/home.png" alt="" class="icon">home</a>
+<a href="<?= $this->url('media') ?>" <?= $tab == 'media' ? 'class="actualpage"' : '' ?>><img src="/assets/icons/media.png" alt="" class="icon">media</a>
+<a href="<?= $this->url('font') ?>" <?= $tab == 'font' ? 'class="actualpage"' : '' ?>><img src="/assets/icons/font.png" alt="" class="icon">font</a>
+<?php
+if($user->isadmin()) {
+?>
+<a href="<?= $this->url('admin') ?>" <?= $tab == 'admin' ? 'class="actualpage"' : '' ?>><img src="/assets/icons/admin.png" alt="" class="icon">admin</a>
+<?php
+}
+?>
+<a href="<?= $this->url('info') ?>" <?= $tab == 'info' ? 'class="actualpage"' : '' ?>><img src="/assets/icons/info.png" alt="" class="icon">info</a>
+</span>
+
+
+
+
+
+<?php } ?>
+
+
+
<span id="user">
<?php if($user->isvisitor()) { ?>
@@ -23,8 +48,8 @@
<?php } else { ?>
<span>
-<a href="<?= $this->url('timeline') ?>" <?= $tab == 'timeline' ? 'class="actualpage"' : '' ?>>timeline</a>
-<a href="<?= $this->url('user') ?>" <?= $tab == 'user' ? 'class="actualpage"' : '' ?>><?= $user->id() ?></a> <i><?= $user->level() ?></i>
+<a href="<?= $this->url('timeline') ?>" <?= $tab == 'timeline' ? 'class="actualpage"' : '' ?>><img src="/assets/icons/timeline.png" alt="" class="icon">timeline</a>
+<a href="<?= $this->url('user') ?>" <?= $tab == 'user' ? 'class="actualpage"' : '' ?>><img src="/assets/icons/user.png" alt="" class="icon"><?= $user->id() ?></a> <i><?= $user->level() ?></i>
</span>
@@ -41,26 +66,4 @@
<?php } ?>
-<?php if($user->iseditor()) { ?>
-
-<span id="menu">
-<a href="<?= $this->url('home') ?>" <?= $tab == 'home' ? 'class="actualpage"' : '' ?>>home</a>
-<a href="<?= $this->url('media') ?>" <?= $tab == 'media' ? 'class="actualpage"' : '' ?>>media</a>
-<a href="<?= $this->url('font') ?>" <?= $tab == 'font' ? 'class="actualpage"' : '' ?>>font</a>
-<?php
-if($user->isadmin()) {
-?>
-<a href="<?= $this->url('admin') ?>" <?= $tab == 'admin' ? 'class="actualpage"' : '' ?>>admin</a>
-<?php
-}
-?>
-<a href="<?= $this->url('info') ?>" <?= $tab == 'info' ? 'class="actualpage"' : '' ?>>info</a>
-</span>
-
-
-
-
-
-<?php } ?>
-
</div> \ 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 @@
<body>
<main class="editor">
+ <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'edit']) ?>
+
+
<?php $this->insert('edittopbar', ['art' => $art, 'user' => $user]) ?>
<div id="workspace">
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 @@
<details <?= !empty($art->templatebody()) || !empty($art->templatecss()) || !empty($art->templatejavascript()) ? 'open' : '' ?>>
- <summary>Tempalte</summary>
+ <summary>Template</summary>
<fieldset>
<label for="templatebody">BODY template</label>
<select name="templatebody" id="templatebody">
diff --git a/app/view/templates/edittopbar.php b/app/view/templates/edittopbar.php
index 1c422b7..3182d4d 100644
--- a/app/view/templates/edittopbar.php
+++ b/app/view/templates/edittopbar.php
@@ -1,4 +1,4 @@
-<div id="topbar">
+<div id="edittopbar">
@@ -9,7 +9,6 @@
<span>
- <a href="<?= $this->url('home') ?>" class="icon" >⍇</a>
<input type="submit" value="update" accesskey="s" form="update">
@@ -18,38 +17,21 @@
- <a href="<?= $this->uart('artread/', $art->id()) ?>" target="_blank" class="icon" >👁</a>
+ <a href="<?= $this->uart('artread/', $art->id()) ?>" target="_blank" ><img src="/assets/icons/read.png" class="icon">display</a>
<span id="headid"><?= $art->id() ?></span>
</span>
-
-
-
-<span id="menu" >
- <?php if($user->iseditor()) { ?>
-
- <a href="<?= $this->url('media') ?>"><span class="symbol">📁</span><span class="text">media</span></a>
- <a href="<?= $this->url('font') ?>"><span class="symbol">📝</span><span class="text">font</span></a>
-
- <?php
- if($user->isadmin()) {
- ?>
- <a href="<?= $this->url('admin') ?>"><span class="symbol">🔑</span><span class="text">admin</span></a>
- <?php
- }
- }
- ?>
-</span>
-
-
-
-
<span id="fontsize">
<label for="fontsize">Font-size</label>
<input type="number" name="fontsize" value="<?= Config::fontsize() ?>" id="fontsize" min="5" max="99">
</span>
+<span id="download">
+ <a href="<?= $this->uart('artdownload', $art->id()) ?>"><img src="/assets/icons/download.png" class="icon"><span class="text">download</span></a>
+</span>
+
+
<span id="delete">
<a href="<?= $this->uart('artconfirmdelete', $art->id()) ?>"><span class="symbol">✖</span><span class="text">delete</span></a>
</span>
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 @@
<tr>
<td><input type="checkbox" name="id[]" value="<?= $item->id() ?>" id="id_<?= $item->id() ?>"></td>
<td><label title="<?= $item->title() ?>" for="id_<?= $item->id() ?>"><?= $item->id() ?></label></td>
- <td><a href="<?= $this->uart('artedit', $item->id()) ?>">✏</a></td>
- <td><a href="<?= $this->uart('artread/', $item->id()) ?>" target="_blank">👁</a></td>
+ <td><a href="<?= $this->uart('artedit', $item->id()) ?>"><img src="/assets/icons/edit.png" class="icon"></a></td>
+ <td><a href="<?= $this->uart('artread/', $item->id()) ?>" target="_blank"><img src="/assets/icons/read.png" class="icon"></a></td>
<td class="delete"><a href="<?= $this->uart('artdelete', $item->id()) ?>" >✖</a></td>
<?php if($user->issupereditor()) { ?>
- <td><a href="<?= $this->uart('artdownload', $item->id()) ?>" download>↓</a></td>
+ <td><a href="<?= $this->uart('artdownload', $item->id()) ?>" download><img src="/assets/icons/download.png" class="icon"></a></td>
<?php } if($columns['tag']) { ?>
<td class="tag"><a title="<?= $item->tag('string') ?>"><?= $item->tag('sort') ?></a></td>
<?php } if($columns['title']) { ?>
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
--- /dev/null
+++ b/assets/icons/admin.png
Binary files differ
diff --git a/assets/icons/download.png b/assets/icons/download.png
new file mode 100644
index 0000000..a18aeec
--- /dev/null
+++ b/assets/icons/download.png
Binary files differ
diff --git a/assets/icons/edit.png b/assets/icons/edit.png
new file mode 100644
index 0000000..8cda46d
--- /dev/null
+++ b/assets/icons/edit.png
Binary files differ
diff --git a/assets/icons/font.png b/assets/icons/font.png
new file mode 100644
index 0000000..1ef851e
--- /dev/null
+++ b/assets/icons/font.png
Binary files differ
diff --git a/assets/icons/home.png b/assets/icons/home.png
new file mode 100644
index 0000000..4d74cf6
--- /dev/null
+++ b/assets/icons/home.png
Binary files differ
diff --git a/assets/icons/info.png b/assets/icons/info.png
new file mode 100644
index 0000000..bb1fd19
--- /dev/null
+++ b/assets/icons/info.png
Binary files differ
diff --git a/assets/icons/media.png b/assets/icons/media.png
new file mode 100644
index 0000000..b010c47
--- /dev/null
+++ b/assets/icons/media.png
Binary files differ
diff --git a/assets/icons/read.png b/assets/icons/read.png
new file mode 100644
index 0000000..132d980
--- /dev/null
+++ b/assets/icons/read.png
Binary files differ
diff --git a/assets/icons/timeline.png b/assets/icons/timeline.png
new file mode 100644
index 0000000..35bca8c
--- /dev/null
+++ b/assets/icons/timeline.png
Binary files differ
diff --git a/assets/icons/user.png b/assets/icons/user.png
new file mode 100644
index 0000000..7aba547
--- /dev/null
+++ b/assets/icons/user.png
Binary files 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.*",