diff --git a/assets/assets.qtpl b/assets/assets.qtpl index d334fa5..5330a7a 100644 --- a/assets/assets.qtpl +++ b/assets/assets.qtpl @@ -31,3 +31,8 @@ This is a modified version of https://www.svgrepo.com/svg/232085/rat {% func IconGopher() %} {% cat "icon/gopher-protocol-icon.svg" %} {% endfunc %} + +https://upload.wikimedia.org/wikipedia/commons/4/46/Generic_Feed-icon.svg +{% func IconFeed() %} +{% cat "icon/feed-icon.svg" %} +{% endfunc %} diff --git a/assets/assets.qtpl.go b/assets/assets.qtpl.go index 5fddd1a..d742476 100644 --- a/assets/assets.qtpl.go +++ b/assets/assets.qtpl.go @@ -352,7 +352,7 @@ main, article, .hypha-tabs__tab, header, .layout-card { background-color: #3434 a, .wikilink_external { color: #f1fa8c; } a:visited, .wikilink_external:visited { color: #ffb86c; } .wikilink_new, .wikilink_new:visited { color: #dd4444; } -.navitree__link:hover, .backlinks__link:hover { background-color: #444; } +.subhyphae__link:hover, .navitree__link:hover, .backlinks__link:hover { background-color: #444; } .header-links__link, .header-links__link:visited, .prevnext__el, .prevnext__el:visited { color: #ddd; } @@ -706,3 +706,61 @@ func IconGopher() string { return qs422016 //line assets/assets.qtpl:33 } + +// https://upload.wikimedia.org/wikipedia/commons/4/46/Generic_Feed-icon.svg + +//line assets/assets.qtpl:36 +func StreamIconFeed(qw422016 *qt422016.Writer) { +//line assets/assets.qtpl:36 + qw422016.N().S(` +`) +//line assets/assets.qtpl:37 + qw422016.N().S(` + + RSS feed icon + + + + + + + + + +`) +//line assets/assets.qtpl:37 + qw422016.N().S(` +`) +//line assets/assets.qtpl:38 +} + +//line assets/assets.qtpl:38 +func WriteIconFeed(qq422016 qtio422016.Writer) { +//line assets/assets.qtpl:38 + qw422016 := qt422016.AcquireWriter(qq422016) +//line assets/assets.qtpl:38 + StreamIconFeed(qw422016) +//line assets/assets.qtpl:38 + qt422016.ReleaseWriter(qw422016) +//line assets/assets.qtpl:38 +} + +//line assets/assets.qtpl:38 +func IconFeed() string { +//line assets/assets.qtpl:38 + qb422016 := qt422016.AcquireByteBuffer() +//line assets/assets.qtpl:38 + WriteIconFeed(qb422016) +//line assets/assets.qtpl:38 + qs422016 := string(qb422016.B) +//line assets/assets.qtpl:38 + qt422016.ReleaseByteBuffer(qb422016) +//line assets/assets.qtpl:38 + return qs422016 +//line assets/assets.qtpl:38 +} diff --git a/assets/default.css b/assets/default.css index 8700c5a..4d06d76 100644 --- a/assets/default.css +++ b/assets/default.css @@ -241,7 +241,7 @@ main, article, .hypha-tabs__tab, header, .layout-card { background-color: #3434 a, .wikilink_external { color: #f1fa8c; } a:visited, .wikilink_external:visited { color: #ffb86c; } .wikilink_new, .wikilink_new:visited { color: #dd4444; } -.navitree__link:hover, .backlinks__link:hover { background-color: #444; } +.subhyphae__link:hover, .navitree__link:hover, .backlinks__link:hover { background-color: #444; } .header-links__link, .header-links__link:visited, .prevnext__el, .prevnext__el:visited { color: #ddd; } diff --git a/assets/icon/feed-icon.svg b/assets/icon/feed-icon.svg new file mode 100644 index 0000000..95765bd --- /dev/null +++ b/assets/icon/feed-icon.svg @@ -0,0 +1,17 @@ + + + RSS feed icon + + + + + + + + + diff --git a/main.go b/main.go index e5b8953..138c589 100644 --- a/main.go +++ b/main.go @@ -145,6 +145,8 @@ func handlerIcon(w http.ResponseWriter, rq *http.Request) { w.Write([]byte(assets.IconMailto())) case "gopher": w.Write([]byte(assets.IconGopher())) + case "feed": + w.Write([]byte(assets.IconFeed())) default: w.Write([]byte(assets.IconHTTP())) } diff --git a/views/history.qtpl b/views/history.qtpl index cf645be..3432fd8 100644 --- a/views/history.qtpl +++ b/views/history.qtpl @@ -28,7 +28,6 @@ if err != nil {

Recent Changes

-

← Back

-

Subscribe via RSS, Atom or JSON feed.

+

Subscribe via RSS, Atom or JSON feed.

{% comment %} Here I am, willing to add some accessibility using ARIA. Turns out, diff --git a/views/history.qtpl.go b/views/history.qtpl.go index d61101f..470c411 100644 --- a/views/history.qtpl.go +++ b/views/history.qtpl.go @@ -107,273 +107,272 @@ func StreamRecentChangesHTML(qw422016 *qt422016.Writer, n int) {

Recent Changes

-

← Back

-

Subscribe via RSS, Atom or JSON feed.

+

Subscribe via RSS, Atom or JSON feed.

`) -//line views/history.qtpl:55 +//line views/history.qtpl:54 qw422016.N().S(` `) -//line views/history.qtpl:58 +//line views/history.qtpl:57 changes := history.RecentChanges(n) -//line views/history.qtpl:59 +//line views/history.qtpl:58 qw422016.N().S(`
`) -//line views/history.qtpl:61 +//line views/history.qtpl:60 if len(changes) == 0 { -//line views/history.qtpl:61 +//line views/history.qtpl:60 qw422016.N().S(`

Could not find any recent changes.

`) -//line views/history.qtpl:63 +//line views/history.qtpl:62 } else { -//line views/history.qtpl:63 +//line views/history.qtpl:62 qw422016.N().S(` `) -//line views/history.qtpl:64 +//line views/history.qtpl:63 for i, entry := range changes { -//line views/history.qtpl:64 +//line views/history.qtpl:63 qw422016.N().S(`
    `) -//line views/history.qtpl:67 +//line views/history.qtpl:66 qw422016.N().S(recentChangesEntry(entry)) -//line views/history.qtpl:67 +//line views/history.qtpl:66 qw422016.N().S(`
`) -//line views/history.qtpl:69 +//line views/history.qtpl:68 } -//line views/history.qtpl:69 +//line views/history.qtpl:68 qw422016.N().S(` `) -//line views/history.qtpl:70 +//line views/history.qtpl:69 } -//line views/history.qtpl:70 +//line views/history.qtpl:69 qw422016.N().S(`
`) -//line views/history.qtpl:74 +//line views/history.qtpl:73 } -//line views/history.qtpl:74 +//line views/history.qtpl:73 func WriteRecentChangesHTML(qq422016 qtio422016.Writer, n int) { -//line views/history.qtpl:74 +//line views/history.qtpl:73 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/history.qtpl:74 +//line views/history.qtpl:73 StreamRecentChangesHTML(qw422016, n) -//line views/history.qtpl:74 +//line views/history.qtpl:73 qt422016.ReleaseWriter(qw422016) -//line views/history.qtpl:74 +//line views/history.qtpl:73 } -//line views/history.qtpl:74 +//line views/history.qtpl:73 func RecentChangesHTML(n int) string { -//line views/history.qtpl:74 +//line views/history.qtpl:73 qb422016 := qt422016.AcquireByteBuffer() -//line views/history.qtpl:74 +//line views/history.qtpl:73 WriteRecentChangesHTML(qb422016, n) -//line views/history.qtpl:74 +//line views/history.qtpl:73 qs422016 := string(qb422016.B) -//line views/history.qtpl:74 +//line views/history.qtpl:73 qt422016.ReleaseByteBuffer(qb422016) -//line views/history.qtpl:74 +//line views/history.qtpl:73 return qs422016 -//line views/history.qtpl:74 +//line views/history.qtpl:73 } -//line views/history.qtpl:76 +//line views/history.qtpl:75 func streamrecentChangesEntry(qw422016 *qt422016.Writer, rev history.Revision) { -//line views/history.qtpl:76 +//line views/history.qtpl:75 qw422016.N().S(`
  • `) -//line views/history.qtpl:78 +//line views/history.qtpl:77 qw422016.E().S(rev.Hash) -//line views/history.qtpl:78 +//line views/history.qtpl:77 qw422016.N().S(`
  • `) -//line views/history.qtpl:79 +//line views/history.qtpl:78 qw422016.N().S(rev.HyphaeLinksHTML()) -//line views/history.qtpl:79 +//line views/history.qtpl:78 qw422016.N().S(`
  • `) -//line views/history.qtpl:80 +//line views/history.qtpl:79 qw422016.E().S(rev.Message) -//line views/history.qtpl:80 +//line views/history.qtpl:79 qw422016.N().S(` `) -//line views/history.qtpl:80 +//line views/history.qtpl:79 if rev.Username != "anon" { -//line views/history.qtpl:80 +//line views/history.qtpl:79 qw422016.N().S(``) -//line views/history.qtpl:80 +//line views/history.qtpl:79 } -//line views/history.qtpl:80 +//line views/history.qtpl:79 qw422016.N().S(`
  • `) -//line views/history.qtpl:81 +//line views/history.qtpl:80 } -//line views/history.qtpl:81 +//line views/history.qtpl:80 func writerecentChangesEntry(qq422016 qtio422016.Writer, rev history.Revision) { -//line views/history.qtpl:81 +//line views/history.qtpl:80 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/history.qtpl:81 +//line views/history.qtpl:80 streamrecentChangesEntry(qw422016, rev) -//line views/history.qtpl:81 +//line views/history.qtpl:80 qt422016.ReleaseWriter(qw422016) -//line views/history.qtpl:81 +//line views/history.qtpl:80 } -//line views/history.qtpl:81 +//line views/history.qtpl:80 func recentChangesEntry(rev history.Revision) string { -//line views/history.qtpl:81 +//line views/history.qtpl:80 qb422016 := qt422016.AcquireByteBuffer() -//line views/history.qtpl:81 +//line views/history.qtpl:80 writerecentChangesEntry(qb422016, rev) -//line views/history.qtpl:81 +//line views/history.qtpl:80 qs422016 := string(qb422016.B) -//line views/history.qtpl:81 +//line views/history.qtpl:80 qt422016.ReleaseByteBuffer(qb422016) -//line views/history.qtpl:81 +//line views/history.qtpl:80 return qs422016 -//line views/history.qtpl:81 +//line views/history.qtpl:80 } -//line views/history.qtpl:83 +//line views/history.qtpl:82 func StreamHistoryHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, list string) { -//line views/history.qtpl:83 +//line views/history.qtpl:82 qw422016.N().S(` `) -//line views/history.qtpl:84 +//line views/history.qtpl:83 StreamNavHTML(qw422016, rq, hyphaName, "history") -//line views/history.qtpl:84 +//line views/history.qtpl:83 qw422016.N().S(`

    History of `) -//line views/history.qtpl:88 +//line views/history.qtpl:87 qw422016.E().S(util.BeautifulName(hyphaName)) -//line views/history.qtpl:88 +//line views/history.qtpl:87 qw422016.N().S(`

    `) -//line views/history.qtpl:89 +//line views/history.qtpl:88 qw422016.N().S(list) -//line views/history.qtpl:89 +//line views/history.qtpl:88 qw422016.N().S(`
    `) -//line views/history.qtpl:93 +//line views/history.qtpl:92 } -//line views/history.qtpl:93 +//line views/history.qtpl:92 func WriteHistoryHTML(qq422016 qtio422016.Writer, rq *http.Request, hyphaName, list string) { -//line views/history.qtpl:93 +//line views/history.qtpl:92 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/history.qtpl:93 +//line views/history.qtpl:92 StreamHistoryHTML(qw422016, rq, hyphaName, list) -//line views/history.qtpl:93 +//line views/history.qtpl:92 qt422016.ReleaseWriter(qw422016) -//line views/history.qtpl:93 +//line views/history.qtpl:92 } -//line views/history.qtpl:93 +//line views/history.qtpl:92 func HistoryHTML(rq *http.Request, hyphaName, list string) string { -//line views/history.qtpl:93 +//line views/history.qtpl:92 qb422016 := qt422016.AcquireByteBuffer() -//line views/history.qtpl:93 +//line views/history.qtpl:92 WriteHistoryHTML(qb422016, rq, hyphaName, list) -//line views/history.qtpl:93 +//line views/history.qtpl:92 qs422016 := string(qb422016.B) -//line views/history.qtpl:93 +//line views/history.qtpl:92 qt422016.ReleaseByteBuffer(qb422016) -//line views/history.qtpl:93 +//line views/history.qtpl:92 return qs422016 -//line views/history.qtpl:93 +//line views/history.qtpl:92 } diff --git a/views/hypha.qtpl b/views/hypha.qtpl index 74d6ae6..d758cb0 100644 --- a/views/hypha.qtpl +++ b/views/hypha.qtpl @@ -22,8 +22,7 @@ {% endif %} - + {%s= util.BeautifulName(part) %} {% code prevAcc += part + "/" %} diff --git a/views/hypha.qtpl.go b/views/hypha.qtpl.go index 13bcc52..6d6dee0 100644 --- a/views/hypha.qtpl.go +++ b/views/hypha.qtpl.go @@ -67,167 +67,167 @@ func StreamNaviTitleHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) { //line views/hypha.qtpl:25 qw422016.E().S(prevAcc + part) //line views/hypha.qtpl:25 - qw422016.N().S(`"rel="`) -//line views/hypha.qtpl:26 + qw422016.N().S(`" rel="`) +//line views/hypha.qtpl:25 if i == len(parts)-1 { -//line views/hypha.qtpl:26 +//line views/hypha.qtpl:25 qw422016.N().S(`bookmark`) -//line views/hypha.qtpl:26 +//line views/hypha.qtpl:25 } else { -//line views/hypha.qtpl:26 +//line views/hypha.qtpl:25 qw422016.N().S(`up`) -//line views/hypha.qtpl:26 +//line views/hypha.qtpl:25 } -//line views/hypha.qtpl:26 +//line views/hypha.qtpl:25 qw422016.N().S(`">`) -//line views/hypha.qtpl:27 +//line views/hypha.qtpl:26 qw422016.N().S(util.BeautifulName(part)) -//line views/hypha.qtpl:27 +//line views/hypha.qtpl:26 qw422016.N().S(``) -//line views/hypha.qtpl:29 +//line views/hypha.qtpl:28 prevAcc += part + "/" -//line views/hypha.qtpl:30 +//line views/hypha.qtpl:29 } -//line views/hypha.qtpl:31 +//line views/hypha.qtpl:30 qw422016.N().S(` `) -//line views/hypha.qtpl:33 +//line views/hypha.qtpl:32 } -//line views/hypha.qtpl:33 +//line views/hypha.qtpl:32 func WriteNaviTitleHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) { -//line views/hypha.qtpl:33 +//line views/hypha.qtpl:32 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/hypha.qtpl:33 +//line views/hypha.qtpl:32 StreamNaviTitleHTML(qw422016, h) -//line views/hypha.qtpl:33 +//line views/hypha.qtpl:32 qt422016.ReleaseWriter(qw422016) -//line views/hypha.qtpl:33 +//line views/hypha.qtpl:32 } -//line views/hypha.qtpl:33 +//line views/hypha.qtpl:32 func NaviTitleHTML(h *hyphae.Hypha) string { -//line views/hypha.qtpl:33 +//line views/hypha.qtpl:32 qb422016 := qt422016.AcquireByteBuffer() -//line views/hypha.qtpl:33 +//line views/hypha.qtpl:32 WriteNaviTitleHTML(qb422016, h) -//line views/hypha.qtpl:33 +//line views/hypha.qtpl:32 qs422016 := string(qb422016.B) -//line views/hypha.qtpl:33 +//line views/hypha.qtpl:32 qt422016.ReleaseByteBuffer(qb422016) -//line views/hypha.qtpl:33 +//line views/hypha.qtpl:32 return qs422016 -//line views/hypha.qtpl:33 +//line views/hypha.qtpl:32 } -//line views/hypha.qtpl:35 +//line views/hypha.qtpl:34 func StreamAttachmentHTML(qw422016 *qt422016.Writer, h *hyphae.Hypha) { -//line views/hypha.qtpl:35 +//line views/hypha.qtpl:34 qw422016.N().S(` `) -//line views/hypha.qtpl:36 +//line views/hypha.qtpl:35 switch filepath.Ext(h.BinaryPath) { -//line views/hypha.qtpl:38 +//line views/hypha.qtpl:37 case ".jpg", ".gif", ".png", ".webp", ".svg", ".ico": -//line views/hypha.qtpl:38 +//line views/hypha.qtpl:37 qw422016.N().S(`
    `) -//line views/hypha.qtpl:43 +//line views/hypha.qtpl:42 case ".ogg", ".webm", ".mp4": -//line views/hypha.qtpl:43 +//line views/hypha.qtpl:42 qw422016.N().S(`
    `) -//line views/hypha.qtpl:51 +//line views/hypha.qtpl:50 case ".mp3": -//line views/hypha.qtpl:51 +//line views/hypha.qtpl:50 qw422016.N().S(`
    `) -//line views/hypha.qtpl:59 +//line views/hypha.qtpl:58 default: -//line views/hypha.qtpl:59 +//line views/hypha.qtpl:58 qw422016.N().S(` `) -//line views/hypha.qtpl:63 +//line views/hypha.qtpl:62 } -//line views/hypha.qtpl:63 +//line views/hypha.qtpl:62 qw422016.N().S(` `) -//line views/hypha.qtpl:64 +//line views/hypha.qtpl:63 } -//line views/hypha.qtpl:64 +//line views/hypha.qtpl:63 func WriteAttachmentHTML(qq422016 qtio422016.Writer, h *hyphae.Hypha) { -//line views/hypha.qtpl:64 +//line views/hypha.qtpl:63 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/hypha.qtpl:64 +//line views/hypha.qtpl:63 StreamAttachmentHTML(qw422016, h) -//line views/hypha.qtpl:64 +//line views/hypha.qtpl:63 qt422016.ReleaseWriter(qw422016) -//line views/hypha.qtpl:64 +//line views/hypha.qtpl:63 } -//line views/hypha.qtpl:64 +//line views/hypha.qtpl:63 func AttachmentHTML(h *hyphae.Hypha) string { -//line views/hypha.qtpl:64 +//line views/hypha.qtpl:63 qb422016 := qt422016.AcquireByteBuffer() -//line views/hypha.qtpl:64 +//line views/hypha.qtpl:63 WriteAttachmentHTML(qb422016, h) -//line views/hypha.qtpl:64 +//line views/hypha.qtpl:63 qs422016 := string(qb422016.B) -//line views/hypha.qtpl:64 +//line views/hypha.qtpl:63 qt422016.ReleaseByteBuffer(qb422016) -//line views/hypha.qtpl:64 +//line views/hypha.qtpl:63 return qs422016 -//line views/hypha.qtpl:64 +//line views/hypha.qtpl:63 } diff --git a/views/nav.qtpl b/views/nav.qtpl index cecdc63..8e1ed51 100644 --- a/views/nav.qtpl +++ b/views/nav.qtpl @@ -52,7 +52,7 @@ var navEntries = []navEntry{ {% if u.Group == "anon" %} Login {% else %} - {%s u.Name %} + {%s u.Name %} {% endif %} {% endif %} diff --git a/views/nav.qtpl.go b/views/nav.qtpl.go index b1cabdb..c3b14ec 100644 --- a/views/nav.qtpl.go +++ b/views/nav.qtpl.go @@ -162,7 +162,7 @@ func StreamUserMenuHTML(qw422016 *qt422016.Writer, u *user.User) { } else { //line views/nav.qtpl:54 qw422016.N().S(` -