all repos — honk @ 2d2594339703492189d3a2b90b7b0f039d44f09a

my fork of honk

quick fix to hide all images
Ted Unangst tedu@tedunangst.com
Thu, 16 Jan 2020 21:42:48 -0500
commit

2d2594339703492189d3a2b90b7b0f039d44f09a

parent

4dc42a9ed445ac4351aaa15f9742065dacce3558

4 files changed, 16 insertions(+), 2 deletions(-)

jump to
M docs/changelog.txtdocs/changelog.txt

@@ -2,6 +2,8 @@ changelog

=== next ++ Quick fix to hide all images. + + Allow resending follow requests. + Improved search query parsing.
M honk.gohonk.go

@@ -47,6 +47,7 @@ }

type UserOptions struct { SkinnyCSS bool `json:",omitempty"` + OmitImages bool `json:",omitempty"` Avatar string `json:",omitempty"` MapLink string `json:",omitempty"` }
M views/account.htmlviews/account.html

@@ -10,6 +10,8 @@ <p>about me:

<p><textarea name="whatabout">{{ .WhatAbout }}</textarea> <p><label class="button" for="skinny">skinny layout:</label> <input tabindex=1 type="checkbox" id="skinny" name="skinny" value="skinny" {{ if .User.Options.SkinnyCSS }}checked{{ end }}><span></span> +<p><label class="button" for="omitimages">omit images:</label> +<input tabindex=1 type="checkbox" id="omitimages" name="omitimages" value="omitimages" {{ if .User.Options.OmitImages }}checked{{ end }}><span></span> <p><label class="button" for="maps">apple map links:</label> <input tabindex=1 type="checkbox" id="maps" name="maps" value="apple" {{ if eq "apple" .User.Options.MapLink }}checked{{ end }}><span></span> <p><button>update settings</button>
M web.goweb.go

@@ -55,10 +55,14 @@ if u == nil {

return "" } user, _ := butwhatabout(u.Username) + css := template.CSS("") if user.Options.SkinnyCSS { - return "main { max-width: 700px; }" + css += "main { max-width: 700px; }\n" } - return "" + if user.Options.OmitImages { + css += ".honk .noise img { display: none; }\n" + } + return css } func getmaplink(u *login.UserInfo) string {

@@ -1117,6 +1121,11 @@ if r.FormValue("skinny") == "skinny" {

options.SkinnyCSS = true } else { options.SkinnyCSS = false + } + if r.FormValue("omitimages") == "omitimages" { + options.OmitImages = true + } else { + options.OmitImages = false } if r.FormValue("maps") == "apple" { options.MapLink = "apple"