add combos list to menu
This commit is contained in:
parent
cf9804dfa0
commit
71ac199935
|
@ -22,7 +22,12 @@
|
|||
<ul>
|
||||
<li><a href="/{{ .UserSep }}/{{ .UserInfo.Username }}">{{ .UserInfo.Username }}</a>
|
||||
<li><a href="/honkers">honkers</a>
|
||||
<li><a href="/c">combos</a>
|
||||
<li>combos
|
||||
<ul>
|
||||
{{ range .Combos }}
|
||||
<li><a href="/c/{{ . }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
</ul>
|
||||
<li><a href="/o">tags</a>
|
||||
<li><a href="/about">about</a>
|
||||
<li><a href="/front">front</a>
|
||||
|
|
|
@ -51,18 +51,18 @@ body > header p {
|
|||
body > header span {
|
||||
margin-left: 2em;
|
||||
}
|
||||
header details {
|
||||
header > details {
|
||||
background: $bg-page;
|
||||
padding: 1em;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
display: inline;
|
||||
}
|
||||
header details[open] {
|
||||
header > details[open] {
|
||||
background: $bg-dark;
|
||||
border: 1px solid $fg;
|
||||
}
|
||||
header details li {
|
||||
header > details li {
|
||||
margin: 1em 0em 1em 0em;
|
||||
}
|
||||
main {
|
||||
|
|
6
web.go
6
web.go
|
@ -70,6 +70,11 @@ func getInfo(r *http.Request) map[string]interface{} {
|
|||
templinfo["IconName"] = iconName
|
||||
templinfo["UserInfo"] = u
|
||||
templinfo["UserSep"] = userSep
|
||||
if u != nil {
|
||||
var combos []string
|
||||
combocache.Get(u.UserID, &combos)
|
||||
templinfo["Combos"] = combos
|
||||
}
|
||||
return templinfo
|
||||
}
|
||||
|
||||
|
@ -1101,7 +1106,6 @@ func showcombos(w http.ResponseWriter, r *http.Request) {
|
|||
var combos []string
|
||||
combocache.Get(userinfo.UserID, &combos)
|
||||
templinfo := getInfo(r)
|
||||
templinfo["Combos"] = combos
|
||||
err := readviews.Execute(w, "combos.html", templinfo)
|
||||
if err != nil {
|
||||
log.Print(err)
|
||||
|
|
Loading…
Reference in New Issue