commit 4fc922750b673a41356869836067a6e82fcbb70c
parent 0c623826be63c0d0ca7643eebc7a71a6642e8bc2
Author: Peter Kosyh <p.kosyh@gmail.com>
Date: Fri, 4 Sep 2020 17:00:10 +0300
html
Diffstat:
4 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/ii-node/lib/style.css b/ii-node/lib/style.css
@@ -116,15 +116,15 @@
#header {
margin: 0;
- margin-left:auto;
- margin-right:auto;
+ margin-left:0;
+ margin-right:0;
+ width: 100%;
padding: 0;
border: 0;
border-collapse: collapse;
}
#header .title {
- width: 100%;
padding: 0 0 0.5em 0;
}
#header tr {
@@ -143,10 +143,16 @@
font-size: smaller;
color: #555555;
font-style: italic;
+ font-weight: bold;
}
#header .links {
padding: 0 1em 0.5em 0;
+ text-align: right;
+}
+
+#header .links a, #header .links a:visited {
+ color: #ea5555;
}
@media (max-width: 640px) {
diff --git a/ii-node/tpl/header.tpl b/ii-node/tpl/header.tpl
@@ -14,10 +14,18 @@
<tr>
<td class="title">
<span class="logo"><a href="/">ii-go</a></span>
- <span class="info">II/IDEC networks</span>
+ <span class="info">II/IDEC networks {{ with .Echo }} :: {{.}}{{end}}
+</span>
</td>
<td class="links">
- {{ with .User }}{{.Name}}{{end}}
+ <span>
+ {{ with .User }}
+ {{.Name}}
+ {{end}}
+ {{ with .Echo }}
+ :: <a href="/{{.}}/new">New topic</a>
+ {{ end }}
+ </span>
</td>
</tr>
</table>
diff --git a/ii-node/tpl/topics.tpl b/ii-node/tpl/topics.tpl
@@ -1,8 +1,5 @@
{{template "header.tpl" $}}
{{ $odd := false }}
-{{if .User.Name }}
-<a href="/{{.BasePath}}/new">New topic</a><br>
-{{end}}
{{template "pager.tpl" $}}
<table id="topiclist" cellspacing=0 cellpadding=0>
<tr class="title">
diff --git a/ii-node/web.go b/ii-node/web.go
@@ -176,7 +176,7 @@ func makePager(ctx *WebContext, count int, page int) int {
func www_topics(user *ii.User, www WWW, w http.ResponseWriter, r *http.Request, echo string, page int) error {
db := www.db
- ctx := WebContext{ User: user }
+ ctx := WebContext{ User: user, Echo: echo }
mis := db.LookupIDS(db.SelectIDS(ii.Query{Echo: echo}))
ii.Trace.Printf("www topics: %s", echo)