all repos — honk @ f0999b78853a812dea21816f643299d69a96dab6

my fork of honk

formatting, inter css
Anirudh Oppiliappan x@icyphox.sh
Thu, 08 Dec 2022 20:51:57 +0530
commit

f0999b78853a812dea21816f643299d69a96dab6

parent

83e180fc244bdc29682afa83fac078a23ba3d493

5 files changed, 61 insertions(+), 61 deletions(-)

jump to
M fun.gofun.go

@@ -64,17 +64,17 @@ }

func prettifydate(d time.Time) string { var customMags = []humanize.RelTimeMagnitude{ - {time.Second, "now", time.Second}, - {2 * time.Second, "1s %s", 1}, - {time.Minute, "%ds %s", time.Second}, - {2 * time.Minute, "1m %s", 1}, - {time.Hour, "%dm %s", time.Minute}, - {2 * time.Hour, "1h %s", 1}, - {humanize.Day, "%dh %s", time.Hour}, - {2 * humanize.Day, "1d %s", 1}, - {humanize.Week, "%dd %s", humanize.Day}, - {2 * humanize.Week, "1w %s", 1}, - {humanize.Month, "%dw %s", humanize.Week}, + {time.Second, "now", time.Second}, + {2 * time.Second, "1s %s", 1}, + {time.Minute, "%ds %s", time.Second}, + {2 * time.Minute, "1m %s", 1}, + {time.Hour, "%dm %s", time.Minute}, + {2 * time.Hour, "1h %s", 1}, + {humanize.Day, "%dh %s", time.Hour}, + {2 * humanize.Day, "1d %s", 1}, + {humanize.Week, "%dd %s", humanize.Day}, + {2 * humanize.Week, "1w %s", 1}, + {humanize.Month, "%dw %s", humanize.Week}, } since := time.Since(d)
M honk.gohonk.go

@@ -51,17 +51,17 @@ SecKey httpsig.PrivateKey

} type UserOptions struct { - SkinnyCSS bool `json:",omitempty"` - OmitImages bool `json:",omitempty"` - Avahex bool `json:",omitempty"` - MentionAll bool `json:",omitempty"` - Avatar string `json:",omitempty"` + SkinnyCSS bool `json:",omitempty"` + OmitImages bool `json:",omitempty"` + Avahex bool `json:",omitempty"` + MentionAll bool `json:",omitempty"` + Avatar string `json:",omitempty"` CustomDisplay string `json:",omitempty"` - Banner string `json:",omitempty"` - MapLink string `json:",omitempty"` - Reaction string `json:",omitempty"` - MeCount int64 - ChatCount int64 + Banner string `json:",omitempty"` + MapLink string `json:",omitempty"` + Reaction string `json:",omitempty"` + MeCount int64 + ChatCount int64 } type KeyInfo struct {

@@ -72,41 +72,41 @@

const serverUID int64 = -2 type Honk struct { - ID int64 - UserID int64 - Username string - What string - Honker string - Handle string - Handles string - Oonker string - Oondle string - XID string - RID string - Date time.Time + ID int64 + UserID int64 + Username string + What string + Honker string + Handle string + Handles string + Oonker string + Oondle string + XID string + RID string + Date time.Time DatePretty string - URL string - Noise string - Precis string - Format string - Convoy string - Audience []string - Public bool - Whofore int64 - Replies []*Honk - Flags int64 - HTPrecis template.HTML - HTML template.HTML - Style string - Open string - Donks []*Donk - Onts []string - Place *Place - Time *Time - Mentions []Mention - Badonks []Badonk - Wonkles string - Guesses template.HTML + URL string + Noise string + Precis string + Format string + Convoy string + Audience []string + Public bool + Whofore int64 + Replies []*Honk + Flags int64 + HTPrecis template.HTML + HTML template.HTML + Style string + Open string + Donks []*Donk + Onts []string + Place *Place + Time *Time + Mentions []Mention + Badonks []Badonk + Wonkles string + Guesses template.HTML } type Badonk struct {
M views/header.htmlviews/header.html

@@ -2,6 +2,7 @@ <!doctype html>

<html> <head> <title>honk</title> + <link href="https://cdn.icyphox.sh/fonts/inter.css" rel="stylesheet"> <link href="/style.css{{ .StyleParam }}" rel="stylesheet"> {{ if .LocalStyleParam }} <link href="/local.css{{ .LocalStyleParam }}" rel="stylesheet">
M views/style.cssviews/style.css

@@ -42,7 +42,7 @@ background: var(--bg-page);

color: var(--fg); font-size: 1rem !important; word-wrap: break-word; - font-family: -apple-system, "Inter", sans-serif, "Noto Color Emoji"; + font-family: "InterVar", -apple-system, sans-serif, "Noto Color Emoji"; line-height: 1.2; overscroll-behavior-y: contain; overflow: overlay;

@@ -66,7 +66,7 @@ overflow-x: auto;

} form, input, textarea { - font-family: -apple-system, "Inter", sans-serif, "Noto Color Emoji"; + font-family: "InterVar", -apple-system, sans-serif, "Noto Color Emoji"; } p { margin-top: 1em;

@@ -157,7 +157,7 @@ }

label.button, button, select { border: none; font-size: 1rem; - font-family: -apple-system, "Inter", sans-serif, "Noto Color Emoji"; + font-family: "InterVar", -apple-system, sans-serif, "Noto Color Emoji"; color: var(--fg); padding: 0.2em; background: var(--bg-dark);
M web.goweb.go

@@ -1145,7 +1145,6 @@ } else {

options.MapLink = "" } - sendupdate := false if r.FormValue("displayname") != "" { options.CustomDisplay = r.FormValue("displayname")

@@ -2498,10 +2497,10 @@ time.Sleep(50 * time.Minute)

} } -func redirectPretty (w http.ResponseWriter, r *http.Request){ +func redirectPretty(w http.ResponseWriter, r *http.Request) { last := path.Base(r.URL.Path) name := mux.Vars(r)["name"] - aturl := "/@"+name + aturl := "/@" + name if last == name { last = ""