aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/css/stylew.css98
-rw-r--r--public/w/index.php15
2 files changed, 69 insertions, 44 deletions
diff --git a/public/css/stylew.css b/public/css/stylew.css
index 86ec715..ab206a3 100644
--- a/public/css/stylew.css
+++ b/public/css/stylew.css
@@ -48,23 +48,31 @@ img {
max-width: 1000px;
}
+form {
+ margin-bottom: 0px;
+}
+
section {
text-align: justify;
padding: 3%;
line-height: 1.2em;
}
-.edit {
+body.edit {
+ overflow-y: scroll;
+}
+
+body.edit section {
text-align: left;
- padding-top: 1%;
- padding-bottom: 1%;
+ padding-top: 0px;
+ padding-bottom: 0px;
padding-left: 8%;
padding-right: 8%;
line-height: 1.2em;
}
-
-section input, textarea, select {
+.button, input, textarea, select {
+ display: inline-block;
width: 90%;
padding-left: 15px;
padding-right: 15px;
@@ -75,17 +83,43 @@ section input, textarea, select {
border-style: unset;
}
+.button {
+ text-align: center;
+ color: black;
+ font-size: 13px;
+ padding-top: 7px;
+ background-color: #bfbfbf;
+ box-sizing: border-box;
+ align-items: flex-start;
+ text-align: center;
+ cursor: default;
+ white-space: pre;
+ -webkit-rtl-ordering: logical;
+ text-rendering: auto;
+ color: initial;
+ letter-spacing: normal;
+ word-spacing: normal;
+ text-transform: none;
+ text-indent: 0px;
+ text-shadow: none;
+}
+
+.button:hover {
+
+ text-decoration: none;
+}
+
article {
position: relative;
z-index: 7;
}
#html{
- height: 1000px;
+ height: calc(100% - 95px);
}
#css{
- height: 100px;
+ height: 250px;
}
input[type="submit"] {
@@ -113,19 +147,18 @@ aside:hover {
nav {
position: fixed;
top: 0px;
- right: -50px;
- padding: 7px;
+ right: -6%;
z-index: 10;
- background: #6c7d8a;
opacity: 0.3;
- width:100px;
- border-width: 4px;
- border-style: outset;
+ width: 8%;
+ text-align: right;
}
-nav:hover {
+
+
+nav:hover, body.edit nav {
opacity: 1;
- right: -5px;
+ right: 0px;
}
.alert h4 {
@@ -133,31 +166,9 @@ nav:hover {
margin: 0px;
}
-nav a {
- color: black;
- padding: 1px 4px;
- font-size: 13px;
- background-color: #bfbfbf;
- /* text-rendering: auto; */
- /* color: initial; */
- /* letter-spacing: normal; */
- /* word-spacing: normal; */
- /* text-transform: none; */
- text-indent: 0px;
- text-decoration: none;
- /* text-shadow: none; */
- /* display: inline-block; */
- /* -webkit-appearance: push-button; */
- align-items: flex-start;
- text-align: center;
- cursor: default;
- /* color: buttontext; */
- /* background-color: buttonface; */
- box-sizing: border-box;
- /* padding: 2px 6px 3px; */
- border-width: 2px;
- border-color: lightgrey;
- border-style: outset;
+table {
+ width: 100%;
+ margin-top: 20px;
}
.submit {
@@ -199,4 +210,11 @@ summary {
background-color: #bdbdbd;
margin-top: 3px;
margin-bottom: 3px;
+}
+
+.template {
+ position: fixed;
+ bottom: 0px;
+ left: 0px;
+ width: 8%;
} \ No newline at end of file
diff --git a/public/w/index.php b/public/w/index.php
index d961d56..695ce56 100644
--- a/public/w/index.php
+++ b/public/w/index.php
@@ -38,6 +38,16 @@ if (isset($_POST['action'])) {
}
break;
+ case 'template':
+ if ($app->exist($_GET['id'])) {
+ $template = $app->get($_POST['template']);
+ $art = $app->get($_POST['id']);
+ $art->setcss($template->css());
+ $app->update($art);
+ header('Location: ?id=' . $art->id() . '&edit=1');
+ }
+ break;
+
case 'delete':
if ($app->exist($_GET['id'])) {
$art = new Art($_POST);
@@ -89,7 +99,6 @@ $aff->head($titre, 'w');
// ______________________________________________________ B O D Y _______________________________________________________________
-echo '<body>';
$aff->nav($app);
if (isset($_GET['id'])) {
@@ -100,6 +109,7 @@ if (isset($_GET['id'])) {
if (isset($_GET['edit']) and $_GET['edit'] == 1) {
$aff->edit($art);
+ $aff->template($art, $app->lister());
$aff->aside($app->lister());
} else {
$aff->lecture($art, $app);
@@ -137,11 +147,8 @@ if (isset($_GET['id'])) {
} else {
$tri = 'id';
}
- $aff->search();
$aff->home2table($app->getlister(['id', 'titre', 'intro', 'lien'], $tri));
}
-echo '</body>';
-
?>