1{{define "app-settings"}} 2{{template "header" .}} 3 4<style type="text/css"> 5h2 {font-weight: normal;} 6form { 7 margin: 0 0 2em; 8} 9form dt { 10 line-height: inherit; 11} 12.invisible { 13 display: none; 14} 15p.docs { 16 font-size: 0.86em; 17} 18input[type=checkbox] { 19 height: 1em; 20 width: 1em; 21} 22select { 23 font-size: 1em; 24} 25</style> 26 27<div class="content-container snug"> 28 {{template "admin-header" .}} 29 30 {{if .Message}}<p><a name="config"></a>{{.Message}}</p>{{end}} 31 32 {{if .ConfigMessage}}<p class="success" style="text-align: center">{{.ConfigMessage}}</p>{{end}} 33 34 <form action="/admin/update/config" method="post"> 35 <div class="features row"> 36 <div{{if .Config.SingleUser}} class="invisible"{{end}}> 37 Site Title 38 <p>Your public site name.</p> 39 </div> 40 <div{{if .Config.SingleUser}} class="invisible"{{end}}><input type="text" name="site_name" id="site_name" class="inline" value="{{.Config.SiteName}}" style="width: 14em;"/></div> 41 </div> 42 <div class="features row"> 43 <div{{if .Config.SingleUser}} class="invisible"{{end}}> 44 Site Description 45 <p>Describe your site — this shows in your site's metadata.</p> 46 </div> 47 <div{{if .Config.SingleUser}} class="invisible"{{end}}><input type="text" name="site_desc" id="site_desc" class="inline" value="{{.Config.SiteDesc}}" style="width: 14em;"/></div> 48 </div> 49 <div class="features row"> 50 <div> 51 Host 52 <p>The public address where users will access your site, starting with <code>http://</code> or <code>https://</code>.</p> 53 </div> 54 <div>{{.Config.Host}}</div> 55 </div> 56 <div class="features row"> 57 <div> 58 Community Mode 59 <p>Whether your site is made for one person or many.</p> 60 </div> 61 <div>{{if .Config.SingleUser}}Single user{{else}}Multiple users{{end}}</div> 62 </div> 63 <div class="features row"> 64 <div{{if .Config.SingleUser}} class="invisible"{{end}}> 65 Landing Page 66 <p>The page that logged-out visitors will see first. This should be an absolute path like: <code>/read</code></p> 67 </div> 68 <div{{if .Config.SingleUser}} class="invisible"{{end}}><input type="text" name="landing" id="landing" class="inline" value="{{.Config.Landing}}" style="width: 14em;"/></div> 69 </div> 70 <div class="features row"> 71 <div{{if .Config.SingleUser}} class="invisible"{{end}}><label for="open_registration"> 72 Open Registrations 73 <p>Allow anyone who visits the site to create an account.</p> 74 </label></div> 75 <div{{if .Config.SingleUser}} class="invisible"{{end}}><input type="checkbox" name="open_registration" id="open_registration" {{if .Config.OpenRegistration}}checked="checked"{{end}} /> 76 </div> 77 </div> 78 <div class="features row"> 79 <div{{if .Config.SingleUser}} class="invisible"{{end}}><label for="open_deletion"> 80 Allow account deletion 81 <p>Allow all users to delete their account. Admins can always delete users.</p> 82 </label></div> 83 <div{{if .Config.SingleUser}} class="invisible"{{end}}><input type="checkbox" name="open_deletion" id="open_deletion" {{if .Config.OpenDeletion}}checked="checked"{{end}} /> 84 </div> 85 </div> 86 <div class="features row"> 87 <div{{if .Config.SingleUser}} class="invisible"{{end}}><label for="user_invites"> 88 Allow invitations from... 89 <p>Choose who is allowed to invite new people.</p> 90 </label></div> 91 <div{{if .Config.SingleUser}} class="invisible"{{end}}> 92 <select name="user_invites" id="user_invites"> 93 <option value="none" {{if eq .Config.UserInvites ""}}selected="selected"{{end}}>No one</option> 94 <option value="admin" {{if eq .Config.UserInvites "admin"}}selected="selected"{{end}}>Only Admins</option> 95 <option value="user" {{if eq .Config.UserInvites "user"}}selected="selected"{{end}}>All Users</option> 96 </select> 97 </div> 98 </div> 99 <div class="features row"> 100 <div><label for="private"> 101 Private Instance 102 <p>Limit site access to people with an account.</p> 103 </label></div> 104 <div><input type="checkbox" name="private" id="private" {{if .Config.Private}}checked="checked"{{end}} /></div> 105 </div> 106 <div class="features row"> 107 <div{{if .Config.SingleUser}} class="invisible"{{end}}><label for="local_timeline"> 108 Reader 109 <p>Show a feed of user posts for anyone who chooses to share there.</p> 110 </label></div> 111 <div{{if .Config.SingleUser}} class="invisible"{{end}}><input type="checkbox" name="local_timeline" id="local_timeline" {{if .Config.LocalTimeline}}checked="checked"{{end}} /></div> 112 </div> 113 <div class="features row"> 114 <div{{if .Config.SingleUser}} class="invisible"{{end}}><label for="default_visibility"> 115 Default blog visibility 116 <p>The default setting for new accounts and blogs.</p> 117 </label></div> 118 <div{{if .Config.SingleUser}} class="invisible"{{end}}> 119 <select name="default_visibility" id="default_visibility"> 120 <option value="unlisted" {{if eq .Config.DefaultVisibility "unlisted"}}selected="selected"{{end}}>Unlisted</option> 121 <option value="public" {{if eq .Config.DefaultVisibility "public"}}selected="selected"{{end}}>Public</option> 122 <option value="private" {{if eq .Config.DefaultVisibility "private"}}selected="selected"{{end}}>Private</option> 123 </select> 124 </div> 125 </div> 126 <div class="features row"> 127 <div{{if .Config.SingleUser}} class="invisible"{{end}}><label for="max_blogs"> 128 Maximum Blogs per User 129 <p>Keep things simple by setting this to <strong>1</strong>, unlimited by setting to <strong>0</strong>, or pick another amount.</p> 130 </label></div> 131 <div{{if .Config.SingleUser}} class="invisible"{{end}}><input type="number" name="max_blogs" id="max_blogs" class="inline" min="0" value="{{.Config.MaxBlogs}}"/></div> 132 </div> 133 <div class="features row"> 134 <div><label for="federation"> 135 Federation 136 <p>Enable accounts on this site to propagate their posts via the ActivityPub protocol.</p> 137 </label></div> 138 <div><input type="checkbox" name="federation" id="federation" {{if .Config.Federation}}checked="checked"{{end}} /></div> 139 </div> 140 <div class="features row"> 141 <div><label for="public_stats"> 142 Public Stats 143 <p>Publicly display the number of users and posts on your <strong>About</strong> page.</p> 144 </label></div> 145 <div><input type="checkbox" name="public_stats" id="public_stats" {{if .Config.PublicStats}}checked="checked"{{end}} /></div> 146 </div> 147 <div class="features row"> 148 <div><label for="monetization"> 149 Monetization 150 <p>Enable blogs on this site to receive micro­pay­ments from readers via <a target="wm" href="https://webmonetization.org/">Web Monetization</a>.</p> 151 </label></div> 152 <div><input type="checkbox" name="monetization" id="monetization" {{if .Config.Monetization}}checked="checked"{{end}} /></div> 153 </div> 154 <div class="features row"> 155 <div><label for="min_username_len"> 156 Minimum Username Length 157 <p>The minimum number of characters allowed in a username. (Recommended: 2 or more.)</p> 158 </label></div> 159 <div><input type="number" name="min_username_len" id="min_username_len" class="inline" min="1" max="100" value="{{.Config.MinUsernameLen}}"/></div> 160 </div> 161 <div class="features row"> 162 <input type="submit" value="Save Settings" /> 163 </div> 164 </form> 165 166 <p class="docs">Still have questions? Read more details in the <a href="https://writefreely.org/docs/{{.OfficialVersion}}/admin/config">configuration docs</a>.</p> 167</div> 168 169<script> 170history.replaceState(null, "", "/admin/settings"+window.location.hash); 171</script> 172 173{{template "footer" .}} 174 175{{template "body-end" .}} 176{{end}} 177