From a55cfdca93c0efa2c27c12b4111643aee15429f0 Mon Sep 17 00:00:00 2001
From: m15o
Date: Sat, 2 Jul 2022 15:20:41 +0200
Subject: [PATCH] Redesign
---
README.md | 2 +-
assets/style.css | 131 ++++++++++++++++++++++------
go.mod | 2 +-
web/handler/common.go | 13 ++-
web/handler/html.go | 86 +++++-------------
web/handler/html/common/layout.html | 13 ++-
web/handler/html/editor.html | 5 +-
web/handler/html/files.html | 3 +-
web/handler/html/help.html | 1 +
web/handler/html/index.html | 73 ++++------------
10 files changed, 163 insertions(+), 166 deletions(-)
diff --git a/README.md b/README.md
index 2bf058b..9502063 100644
--- a/README.md
+++ b/README.md
@@ -67,7 +67,7 @@ groupadd ftpaccess
mkdir /var/ichi
-### Update Update ssh config
+### Update ssh config
Add the following lines at the end of /etc/ssh/sshd_config:
diff --git a/assets/style.css b/assets/style.css
index db5d2d8..c142897 100644
--- a/assets/style.css
+++ b/assets/style.css
@@ -1,51 +1,126 @@
+html {
+ background-image: url(https://m15o.ichi.city/bkgtile.gif);
+}
+
+#statuscafe {
+ padding: .5em;
+ background-color: azure;
+ border: 1px solid midnightblue;
+}
+#statuscafe-username {
+ margin-bottom: .5em;
+}
+#statuscafe-username a {
+ color: blue;
+}
+#statuscafe-content {
+ margin: 0 1em 0.5em 1em;
+ color: black;
+}
+
body {
- max-width: 940px;
+ color: white;
+ font-family: sans-serif;
margin: 0 auto;
- background-color: #1ecece;
- padding: 1em;
-}
-.main-nav {
- margin-bottom: 1em;
}
main {
- padding: 1em;
- background-color: #b9f2f2;
+ background-color: teal;
+ max-width: 400px;
+ padding: 2em 4em;
+ margin: 0 auto;
}
-footer {
- margin: 20px 0;
- text-align: center;
+a {
+ color: lightblue;
+}
+a:visited {
+ color: paleturquoise;
+}
+
+a:hover {
+ background-color: paleturquoise;
+ color: black;
}
-pre {
- overflow: auto;
+#create-homepage {
+ color: black;
+ background-color: silver;
+ display: inline-block;
+ padding: 1em 2em;
+ text-decoration: none;
+ box-shadow: 2px 2px black;
}
-.cols {
- display: grid;
- row-gap: 1em;
+#create-homepage:hover {
+ background-color: paleturquoise;
}
-@media (min-width: 650px) {
- .cols {
- grid-template-columns: repeat(2, 1fr);
- grid-gap: 1em;
- }
+.site + .site {
+ margin-top: 1em;
}
-.site {
- padding: 10px;
+main.full {
+ max-width: 1200px;
}
-.site:nth-child(odd) {
- background-color: lightblue;
+
+main.large {
+ max-width: 800px;
}
-h1, h2, h3, h4 {
- color: midnightblue;
- margin-top: 0;
+
+footer {
+ text-align: center;
}
+/*body {*/
+/* max-width: 940px;*/
+/* margin: 0 auto;*/
+/* background-color: #1ecece;*/
+/* padding: 1em;*/
+/*}*/
+
+/*.main-nav {*/
+/* margin-bottom: 1em;*/
+/*}*/
+
+/*main {*/
+/* padding: 1em;*/
+/* background-color: #b9f2f2;*/
+/*}*/
+
+/*footer {*/
+/* margin: 20px 0;*/
+/* text-align: center;*/
+/*}*/
+
+/*pre {*/
+/* overflow: auto;*/
+/*}*/
+
+/*.cols {*/
+/* display: grid;*/
+/* row-gap: 1em;*/
+/*}*/
+
+/*@media (min-width: 650px) {*/
+/* .cols {*/
+/* grid-template-columns: repeat(2, 1fr);*/
+/* grid-gap: 1em;*/
+/* }*/
+/*}*/
+
+/*.site {*/
+/* padding: 10px;*/
+/*}*/
+/*.site:nth-child(odd) {*/
+/* background-color: lightblue;*/
+/*}*/
+/*h1, h2, h3, h4 {*/
+/* color: midnightblue;*/
+/* margin-top: 0;*/
+/*}*/
+
/* Form stuff */
.field { margin-bottom: 1rem; width: 350px; }
diff --git a/go.mod b/go.mod
index 64025f7..88762d9 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,7 @@ module ichi
go 1.16
require (
- github.com/gorilla/csrf v1.7.1 // indirect
+ github.com/gorilla/csrf v1.7.1
github.com/gorilla/mux v1.8.0
github.com/gorilla/sessions v1.2.1
github.com/lib/pq v1.10.3
diff --git a/web/handler/common.go b/web/handler/common.go
index 614b79b..c3c9101 100644
--- a/web/handler/common.go
+++ b/web/handler/common.go
@@ -14,9 +14,9 @@ var TplCommonMap = map[string]string{
{{ template "head" . }}
-
+
-
-
+
+