2023-07-08 20:51:42 +00:00
{{ if not .XHR }}
2023-07-03 22:12:32 +00:00
<!DOCTYPE html>
< head >
< title > {{ host .Host }}: preferences< / title >
< link rel = "shortcut icon" href = "/{{.Host}}/icon.jpg" >
2023-07-27 01:07:39 +00:00
< link rel = "stylesheet" href = "/_/static/style.css?v={{ .Version }}" >
2023-07-03 22:12:32 +00:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
2024-05-11 00:53:58 +00:00
{{- if or (not .Dark) (is .Dark) }}
< link rel = "stylesheet" href = "/_/static/dark.css?v={{ .Version }}" { { if not . Dark } } media = "(prefers-color-scheme:dark)" { { end } } >
{{- end }}
2023-07-03 22:12:32 +00:00
< / head >
2024-05-11 00:53:58 +00:00
< body >
2023-07-08 20:51:42 +00:00
< noscript >
2023-07-27 01:07:39 +00:00
< link rel = "stylesheet" href = "/_/static/noscript.css?v={{ .Version }}" >
2023-07-08 20:51:42 +00:00
< / noscript >
2023-07-03 22:12:32 +00:00
< nav >
< div class = "communities" >
< a href = "/{{.Host}}" > home< / a >
< span > - < / span >
< a href = "/{{.Host}}?listingType=All" > all< / a >
|
{{ $host := .Host }}
{{ range $i, $c := .TopCommunities}}
< a href = "/{{$host}}/c/{{$c.Community.Name}}" > {{$c.Community.Name}}< / a >
< span > - < / span >
{{ end }}
< a href = "/{{$host}}/search?searchtype=Communities" class = "more" > more »< / a >
< / div >
< div class = "right" >
{{ if .Session }}
< a href = "/{{.Host}}/u/{{ .Session.UserName}}" > {{ .Session.UserName }}< / a >
|
< a href = "/{{.Host}}/inbox" class = "mailbox{{ if .UnreadCount }} orangered{{end}}" > ✉< / a >
|
< a href = "/{{.Host}}/settings" > settings< / a >
|
< form method = "POST" > < input type = "submit" name = "op" value = "logout" > < / form >
{{else}}
2023-07-06 15:20:35 +00:00
< a href = "/{{.Host}}/login" > log in< / a > or < a href = "/{{.Host}}/login" > sign up< / a >
2023-07-03 22:12:32 +00:00
|
< a href = "/{{.Host}}/settings" > settings< / a >
{{end}}
< / div >
< div class = "spacer" >
< a href = "/{{ .Host}}/" >
2024-06-02 17:45:42 +00:00
< img class = "icon" src = "{{ if and .Site .Site.SiteView.Site.Icon.IsValid }}{{ shrink .Site.SiteView.Site.Icon.String }}{{else}}/{{ .Host}}/icon.jpg{{end}}" >
2023-07-03 22:12:32 +00:00
< / a >
< / div >
< span class = "title" > < a class = "title" href = "/{{.Host}}" > {{host .Host}}< / a > - settings< / span >
< ul >
< li class = "selected" > < a href = "" > options< / a > < / li >
< / ul >
< / nav >
{{ if .Alert }}
< div class = "alert" >
{{ .Alert }}
< / div >
{{ end }}
{{ if .Error }}
< div class = "error" > {{.Error}}< / div >
{{ end }}
2023-07-08 20:51:42 +00:00
{{ end }}
2024-05-27 16:41:13 +00:00
< form id = "settings" class = "preferences" method = "POST" data-target = "/{{.Host}}/settings" >
2023-07-03 22:12:32 +00:00
< div >
< label >
default listing
< / label >
< select name = "DefaultListingType" >
< option value = "All" { { if eq . Listing " All " } } selected { { end } } > All< / option >
< option value = "Local" { { if eq . Listing " Local " } } selected { { end } } > Local< / option >
< option value = "Subscribed" { { if eq . Listing " Subscribed " } } selected { { end } } > Subscribed< / option >
< / select >
< / div >
< div >
< label >
2023-07-14 13:55:42 +00:00
default post sort
2023-07-03 22:12:32 +00:00
< / label >
< select name = "DefaultSortType" >
< option value = "Hot" { { if eq . Sort " Hot " } } selected { { end } } > Hot< / option >
< option value = "Active" { { if eq . Sort " Active " } } selected { { end } } > Active< / option >
2023-12-17 03:22:54 +00:00
< option value = "Scaled" { { if eq . Sort " Scaled " } } selected { { end } } > Scaled< / option >
< option value = "Controversial" { { if eq . Sort " Controversial " } } selected { { end } } > Controversial< / option >
2023-07-03 22:12:32 +00:00
< option value = "New" { { if eq . Sort " New " } } selected { { end } } > New< / option >
< option value = "Old" { { if eq . Sort " Old " } } selected { { end } } > Old< / option >
< option value = "MostComments" { { if eq . Sort " MostComments " } } selected { { end } } > Most Comments< / option >
< option value = "NewComments" { { if eq . Sort " NewComments " } } selected { { end } } > New Comments< / option >
< option value = "TopHour" { { if eq . Sort " TopHour " } } selected { { end } } > Top Hour< / option >
< option value = "TopSixHour" { { if eq . Sort " TopSixHour " } } selected { { end } } > Top Six Hours< / option >
< option value = "TopTwelveHour" { { if eq . Sort " TopTwelveHour " } } selected { { end } } > Top Twelve Hours< / option >
< option value = "TopDay" { { if eq . Sort " TopDay " } } selected { { end } } > Top Day< / option >
< option value = "TopWeek" { { if eq . Sort " TopWeek " } } selected { { end } } > Top Week< / option >
< option value = "TopMonth" { { if eq . Sort " TopMonth " } } selected { { end } } > Top Month< / option >
< option value = "TopYear" { { if eq . Sort " TopYear " } } selected { { end } } > Top Year< / option >
< option value = "TopAll" { { if eq . Sort " TopAll " } } selected { { end } } > Top All Time< / option > < / select >
< / select >
< / div >
2023-07-14 13:55:42 +00:00
< div >
< label >
default comment sort
< / label >
< select name = "DefaultCommentSortType" >
< option value = "Hot" { { if eq . CommentSort " Hot " } } selected { { end } } > Hot< / option >
< option value = "New" { { if eq . CommentSort " New " } } selected { { end } } > New< / option >
< option value = "Old" { { if eq . CommentSort " Old " } } selected { { end } } > Old< / option >
< option value = "Top" { { if eq . CommentSort " Top " } } selected { { end } } > Top< / option >
2023-12-17 03:22:54 +00:00
< option value = "Controversial" { { if eq . CommentSort " Controversial " } } selected { { end } } > Controversial< / option >
2023-07-14 13:55:42 +00:00
< / select >
< / div >
2024-05-27 16:41:13 +00:00
< div >
< label > theme< / label >
< select name = "Dark" >
< option { { if eq . Dark nil } } selected { { end } } > Default< / option >
< option value = "0" { { if not ( or ( is . Dark ) ( eq . Dark nil ) ) } } selected { { end } } > Light< / option >
< option value = "1" { { if is . Dark } } selected { { end } } > Dark< / option >
< / select >
2023-07-05 13:49:41 +00:00
< / div >
2023-07-08 20:51:42 +00:00
< div class = "scripting" >
< label >
endless scrolling
< / label >
< input type = "checkbox" name = "endlessScrolling" >
< / div >
< div class = "scripting" >
< label >
auto load more
< / label >
< input type = "checkbox" name = "autoLoad" >
< / div >
2023-07-14 13:55:42 +00:00
< div >
< label >
hide instance names
< / label >
< input type = "checkbox" name = "hideInstanceNames" { { if . HideInstanceNames } } checked { { end } } >
< / div >
2023-07-03 22:12:32 +00:00
< div >
2023-08-08 21:26:30 +00:00
< label >
hide thumbnails
< / label >
< input type = "checkbox" name = "hideThumbnails" { { if . HideThumbnails } } checked { { end } } >
< / div >
2023-09-14 19:40:32 +00:00
< div >
< label >
open links in new window
< / label >
< input type = "checkbox" name = "linksInNewWindow" { { if . LinksInNewWindow } } checked { { end } } >
< / div >
2024-04-28 15:43:26 +00:00
{{ if .Session }}
< div class = "scripting" >
< label >
expand marks read
< / label >
< input type = "checkbox" name = "markRead" >
< / div >
{{ end }}
2023-08-08 21:26:30 +00:00
< div >
< label > lemmy: {{ .Site.Version }}< br > < a href = "https://github.com/rystaf/mlmym" > mlmym< / a > : {{ .Version }}< / label >
2023-07-03 22:12:32 +00:00
< input type = "submit" value = "save" >
2023-07-10 15:53:15 +00:00
{{ if .XHR }}< input id = "closesettings" type = "submit" value = "close" > {{ end }}
2023-07-03 22:12:32 +00:00
< / div >
< / form >
2023-07-08 20:51:42 +00:00
{{ if not .XHR}}
2023-07-27 01:07:39 +00:00
< script src = "/_/static/utils.js?v={{ .Version }}" > < / script >
2023-07-03 22:12:32 +00:00
< / body >
< / html >
2023-07-08 20:51:42 +00:00
{{ end }}