all repos — honk @ b9c05569bd00fd1f10242f4ea3b1ceac7fff348a

my fork of honk

add combos list to menu
Ted Unangst tedu@tedunangst.com
Tue, 24 Sep 2019 13:52:06 -0400
commit

b9c05569bd00fd1f10242f4ea3b1ceac7fff348a

parent

b43a082fc8b506d304041f87161ded5f6d335181

3 files changed, 14 insertions(+), 5 deletions(-)

jump to
M views/header.htmlviews/header.html

@@ -22,7 +22,12 @@ <p>

<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>
M views/style.cssviews/style.css

@@ -51,18 +51,18 @@ }

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 {
M web.goweb.go

@@ -70,6 +70,11 @@ templinfo["ServerName"] = serverName

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 @@ userinfo := login.GetUserInfo(r)

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)