favicon handler
Jes Olson j3s@c3f.net
Sun, 06 Nov 2022 20:02:22 -0800
9 files changed,
22 insertions(+),
14 deletions(-)
M
main.go
→
main.go
@@ -57,6 +57,10 @@ http.Redirect(w, r, url, 302)
} } +func faviconHandler(w http.ResponseWriter, r *http.Request) { + http.ServeFile(w, r, "static/favicon.ico") +} + func main() { go data.populate()@@ -65,13 +69,16 @@ http.Handle("/static/", http.StripPrefix("/static/", fs))
// redirs up front - some of these are here for // historic reasons, others for utility + http.HandleFunc("/ip", redirHandler("/ip.html")) + http.HandleFunc("/feeds", redirHandler("/feeds.html")) http.HandleFunc("/tools.html", redirHandler("/creations.html")) http.HandleFunc("/projects.html", redirHandler("/creations.html")) - http.HandleFunc("/feeds", feedHandler) + http.HandleFunc("/favicon.ico", faviconHandler) + http.HandleFunc("/feeds.html", feedHandler) http.HandleFunc("/feed.atom", atom.Handler) http.HandleFunc("/age.html", ageHandler) - http.HandleFunc("/ip", ipHandler) + http.HandleFunc("/ip.html", ipHandler) http.HandleFunc("/review/", postHandler) http.HandleFunc("/thought/", postHandler) http.HandleFunc("/", serveRoot)@@ -238,7 +245,7 @@ ip := r.Header.Get("X-Forwarded-For")
if ip != "" { fmt.Fprintf(w, r.Header.Get("X-Forwarded-For")+"\n") } else { - fmt.Fprintf(w, "not found\n") + fmt.Fprintf(w, "no ip detected\n") } }
M
templates/about.html
→
templates/about.html
@@ -20,7 +20,7 @@ i'm j3s pretty much everywhere
email: <code>j3</code><code>s@c</code><code>3</code><code>f.n</code><code>et</code> matrix: @j3s:cyberia.club</a> -mastodon: j3s@merveilles.town +mastodon: @j3s@merveilles.town </pre> <h3>values</h3> <p>i have some values that i try my best to live by.</p>
M
templates/creations.html
→
templates/creations.html
@@ -4,10 +4,10 @@ <h3>creations</h3>
this page is a showcase for my many creations :3 <h4>handy j3s.sh links</h4> -<ul><a href="/ip">/ip - get ur public ip</a></ul> -<ul><a href="/feeds">/feeds - my personal rss reader</a></ul> -<ul><a href="/age.html">/age.html - age encryption tool</a></ul> -<ul><a href="/travel.html">/travel.html - my travel checklist</a></ul> +<ul><a href="/age.html">/age - age encryption tool</a></ul> +<ul><a href="/feeds.html">/feeds - my rss reader</a></ul> +<ul><a href="/ip.html">/ip - get ur public ip</a></ul> +<ul><a href="/travel.html">/travel - my travel checklist</a></ul> <h4>tools</h4> <ul><a href="https://github.com/biox/shmoji">shmoji | a little shell-based emoji picker</a></ul>
M
templates/index.html
→
templates/index.html
@@ -68,11 +68,11 @@ or sink in dread</pre>
</details> <details> <summary>7</summary> - <pre>wheresoever you go, go with all your heart.</pre> + <code>wheresoever you go, go with all your heart.</code> </details> <details> <summary>8</summary> - <pre>despite everything, it's still you.</pre> + <code>despite everything, it's still you.</code> </details> <h4>posts from my friends</h4> {{- range $feed := .Feeds }}
M
templates/layout.html
→
templates/layout.html
@@ -33,7 +33,6 @@
<meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>{{template "title"}}</title> - <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22><text y=%2226%22 font-size=%2226%22>🐈⬛</text></svg>" /> <link rel="alternate" title="Sitewide Atom feed" type="application/atom+xml" href="/feed.atom" /> </head>
M
templates/now.html
→
templates/now.html
@@ -1,5 +1,7 @@
-{{define "title"}}what is jes doing now{{end}} +{{define "title"}}now{{end}} {{define "body"}} +<h3>now</h3> +<p>this page descibes what i'm up to _now_</p> <p><b>2022-11-05</b></p> <li>finished version 1 of the van</li> <li>traveled to the west coast</li>
M
templates/reviews.html
→
templates/reviews.html
@@ -1,5 +1,6 @@
-{{define "title"}}jes reviews arbitrary garbage{{end}} +{{define "title"}}reviews{{end}} {{define "body"}} +<h3>reviews</h3> <p><i>this is where i review movies, tech stuff, lotion, etc</p></i> <details> <summary>jes's rating system</summary>
M
templates/simple-layout.html
→
templates/simple-layout.html
@@ -12,7 +12,6 @@
<meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>jes post</title> - <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22><text y=%2226%22 font-size=%2226%22>🐈⬛</text></svg>"> </head> <div id="main"><body class="grayscale"> <a href="/"><img height="92" src="/static/unnamed-puffy.png" alt="another pufferfish drawn by rekka"></a>