aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2018-11-12 16:18:09 +0100
committervincent-peugnet <v.peugnet@free.fr>2018-11-12 16:18:09 +0100
commite1eb55024b67793e62e93696cffbd22ead855729 (patch)
tree701e3c90befa65aa0d36910dcfa32b673254faea
parente4768cd0647d934eff424f73bfd9f5c8f6223c94 (diff)
downloadwcms-e1eb55024b67793e62e93696cffbd22ead855729.tar.gz
wcms-e1eb55024b67793e62e93696cffbd22ead855729.zip
corner-menu
-rw-r--r--app/class/controllerconnect.php2
-rw-r--r--app/view/templates/edittopbar.php10
-rw-r--r--app/view/templates/home.php21
-rw-r--r--app/view/templates/hometopbar.php36
-rw-r--r--app/view/templates/navart.php71
-rw-r--r--assets/css/edit.css23
-rw-r--r--assets/css/home.css38
7 files changed, 157 insertions, 44 deletions
diff --git a/app/class/controllerconnect.php b/app/class/controllerconnect.php
index da3c96f..b8dea88 100644
--- a/app/class/controllerconnect.php
+++ b/app/class/controllerconnect.php
@@ -37,7 +37,7 @@ class Controllerconnect extends Controller
$this->usermanager->writesession($this->user);
}
if (!empty($id)) {
- $this->routedirect('artedit', ['art' => $id]);
+ $this->routedirect('artread/', ['art' => $id]);
} else {
$this->routedirect('backrouter');
}
diff --git a/app/view/templates/edittopbar.php b/app/view/templates/edittopbar.php
index b97db12..5090081 100644
--- a/app/view/templates/edittopbar.php
+++ b/app/view/templates/edittopbar.php
@@ -2,7 +2,9 @@
<form action="<?= $this->uart('artupdate', $art->id()) ?>" method="post" id="update">
-
+ <span>
+ <a href="<?= $this->url('backrouter') ?>" class="icon" >⏏</a>
+ </span>
<span>
<input type="submit" value="update" accesskey="x" form="update">
</span>
@@ -13,10 +15,10 @@
</span>
+
<span>
- <a href="<?= $this->url('backrouter') ?>" >🏠</a>
- <a href="<?= $this->uart('artread/', $art->id()) ?>" target="_blank">πŸ‘</a>
- <a href="<?= $this->uart('artlog', $art->id()) ?>" target="_blank">ΒΆ</a>
+ <a href="<?= $this->uart('artread/', $art->id()) ?>" target="_blank" class="icon" >πŸ‘</a>
+ <a href="<?= $this->uart('artlog', $art->id()) ?>" target="_blank" class="icon" >⁋</a>
</span>
<span id="headid"><?= $art->id() ?></span>
diff --git a/app/view/templates/home.php b/app/view/templates/home.php
index 5c3a007..b5b9f67 100644
--- a/app/view/templates/home.php
+++ b/app/view/templates/home.php
@@ -8,25 +8,12 @@
<body>
- <?php $this->insert('navback', ['user' => $user]) ?>
+ <?php $this->insert('hometopbar', ['user' => $user]) ?>
<?php if($user->canedit()) { ?>
<section>
-<div>
-
-<form id="goto" action="./" method="get">
-<input type="text" name="id" placeholder="id" required>
-<input type="submit" name="aff" value="read">
-<input type="submit" name="aff" value="edit">
-<input type="submit" name="action" value="add">
-</form>
-
-
-<form action="./" method="get">
-<input type="submit" name="action" value="analyseall">
-</form>
</div>
@@ -82,9 +69,9 @@
<td><label title="<?= $item->title() ?>" for="<?= $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('artdelete', $item->id()) ?>" >πŸ—‘</a></td>
- <td><a href="<?= $this->uart('artlog', $item->id()) ?>" target="_blank">ΒΆ</a></td>
- <td><?= $item->tag('sort') ?></td>
+ <td><a href="<?= $this->uart('artdelete', $item->id()) ?>" >βœ–</a></td>
+ <td><a href="<?= $this->uart('artlog', $item->id()) ?>" target="_blank">⁋</a></td>
+ <td><a title="<?= $item->tag('string') ?>"><?= $item->tag('sort') ?></a></td>
<td><?= $item->description() ?></td>
<td><?= $item->linkto('sort') ?></td>
<td><?= $item->linkfrom('sort') ?></td>
diff --git a/app/view/templates/hometopbar.php b/app/view/templates/hometopbar.php
new file mode 100644
index 0000000..0640119
--- /dev/null
+++ b/app/view/templates/hometopbar.php
@@ -0,0 +1,36 @@
+<div id="topbar">
+
+<?php if($user->isvisitor()) { ?>
+
+
+<form action="<?= $this->url('log') ?>" method="post">
+<input type="password" name="pass" id="loginpass" placeholder="password">
+<input type="submit" name="log" value="login">
+</form>
+
+
+<?php } else { ?>
+
+<form action="<?= $this->url('log') ?>" method="post">
+<input type="submit" name="log" value="logout">
+</form>
+
+<span>
+User level : <?= $user->level() ?>
+</span>
+
+<?php } ?>
+
+<?php if($user->canedit()) { ?>
+
+
+<span>
+| <a href="">media</a>
+| <a href="">admin</a>
+</span>
+
+
+
+<?php } ?>
+
+</div> \ No newline at end of file
diff --git a/app/view/templates/navart.php b/app/view/templates/navart.php
index 9ce932d..a98eed6 100644
--- a/app/view/templates/navart.php
+++ b/app/view/templates/navart.php
@@ -1,6 +1,9 @@
<style>
-.menu {
+.wqn, .wqn *, .wqn:hover *, .wqn *:hover{
all:initial;
+
+}
+.wqn {
position: fixed;
top: 0;
right: 0;
@@ -8,44 +11,78 @@
background-color: var(--color1);
}
-div#dropmenu {
+.wqn div#dropwqn {
+ background-color: lightgrey;
+ text-align: right;
+ font-family: monospace;
+}
+
+.wqn li.drop{
+ display: block;
+ text-align: right;
+}
+
+.wqn li.drop a.button:hover, .wqn li.drop input[type="submit"]:hover {
+ color: white;
+}
+
+.wqn li.drop a.button, .wqn li.drop input[type="submit"] {
+ cursor: pointer;
+ font-family: monospace;
+ font-size: 15px;
+}
+
+.wqn li.drop a.button, .wqn li.drop input[type="submit"] {
+ cursor: pointer;
+ font-family: monospace;
+ font-size: 15px;
+}
+
+.wqn div#dropwqn {
display: none;
}
-.menu:hover div#dropmenu {
+.wqn input#loginpass {
+ width: 70px;
+ background-color: white;
+}
+
+.wqn:hover div#dropwqn {
display: block;
}
</style>
-<div class="menu" >
- <?= $user->level() ?>
- <div id="dropmenu">
+<div class="wqn" >
+<div style="opacity: 0.5; text-align: right; display: block;">✎</div>
+ <div id="dropwqn">
<ul>
-
- <li>
- <a class="button" href="<?= $this->url('backrouter') ?>">home</a>
+ <li class="drop">
+ <span class="button" style="font-family: monospace; background-color: #7b97b9;" >User lvl : <?= $user->level() ?></span>
+ </li>
+ <li class="drop">
+ <a class="button" href="<?= $this->url('backrouter') ?>">home</a>
</li>
<?php if($user->isvisitor()) { ?>
- <li>
+ <li class="drop">
<form action="<?= $this->url('log') ?>" method="post">
<input type="password" name="pass" id="loginpass" placeholder="password">
<input type="hidden" name="id" value="<?= $art->id() ?>">
- <input type="submit" name="log" value="login">
+ <input type="submit" name="log" value="login" id="button">
</form>
</li>
<?php } else { ?>
- <li>
+ <li class="drop">
<form action="<?= $this->url('log') ?>" method="post">
<input type="hidden" name="id" value="<?= $art->id() ?>">
- <input type="submit" name="log" value="logout">
+ <input type="submit" name="log" value="logout" id="button">
</form>
</li>
@@ -54,10 +91,10 @@ div#dropmenu {
<?php if($user->canedit() && $artexist) { ?>
- <li>
+ <li class="drop">
<a class="button" href="<?= $this->uart('artread/', $art->id()) ?>" target="_blank">display</a>
</li>
- <li>
+ <li class="drop">
<a class="button" href="<?= $this->uart('artedit', $art->id()) ?>" >edit</a>
</li>
@@ -66,7 +103,7 @@ div#dropmenu {
<?php if ($user->canedit()) { ?>
- <li>
+ <li class="drop">
<a class="button" href="?aff=media" >Media</a>
</li>
@@ -74,7 +111,7 @@ div#dropmenu {
<?php if($user->isadmin()) { ?>
- <li>
+ <li class="drop">
<a class="button" href="?aff=admin" >Admin</a>
</li>
diff --git a/assets/css/edit.css b/assets/css/edit.css
index e166418..6262aba 100644
--- a/assets/css/edit.css
+++ b/assets/css/edit.css
@@ -192,15 +192,28 @@ input#fontsize {
width: 36px;
}
-span#headid {
- border: solid 1px;
- padding: 2px 4px;
-}
+span#headid {color: white;}
a {
color: black;
+ text-decoration: none;
+}
+
+a:hover {
+ color: white;
}
#fonts select {
height: 150px;
-} \ No newline at end of file
+}
+
+a.icon {
+ font-size: 25px;
+}
+
+form#update {
+ display: flex;
+ height: 30px;
+}
+
+#update span {margin-right: 1%;} \ No newline at end of file
diff --git a/assets/css/home.css b/assets/css/home.css
index 2fc3773..3d57cf0 100644
--- a/assets/css/home.css
+++ b/assets/css/home.css
@@ -1,3 +1,7 @@
+* {
+ box-sizing: border-box;
+}
+
div#options {
float: left;
}
@@ -21,3 +25,37 @@ body {
+
+
+tr:hover {
+ background-color: grey;
+ color: white;
+}
+
+#topbar {
+ height: 30px;
+ background-color: #7b97b9;
+ line-height: 30px;
+}
+
+#topbar form {
+ display: inline;
+}
+
+a {
+ color: black;
+ text-decoration: none;
+}
+
+a:hover {
+ color: white;
+}
+
+div#massedit {
+ display: none;
+}
+
+#options ul {
+ list-style: none;
+ padding-inline-start: 0;
+} \ No newline at end of file