quick fix to hide all images

Ted Unangst 4 years ago
parent 183e57eee0
commit eab1176f7d

@ -2,6 +2,8 @@ changelog
=== next
+ Quick fix to hide all images.
+ Allow resending follow requests.
+ Improved search query parsing.

@ -47,6 +47,7 @@ type WhatAbout struct {
type UserOptions struct {
SkinnyCSS bool `json:",omitempty"`
OmitImages bool `json:",omitempty"`
Avatar string `json:",omitempty"`
MapLink string `json:",omitempty"`
}

@ -10,6 +10,8 @@
<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>

@ -55,10 +55,14 @@ func getuserstyle(u *login.UserInfo) template.CSS {
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 {
@ -1118,6 +1122,11 @@ func saveuser(w http.ResponseWriter, r *http.Request) {
} else {
options.SkinnyCSS = false
}
if r.FormValue("omitimages") == "omitimages" {
options.OmitImages = true
} else {
options.OmitImages = false
}
if r.FormValue("maps") == "apple" {
options.MapLink = "apple"
} else {

Loading…
Cancel
Save