Merge pull request #149 from writeas/modestly-writefreely

Support toning down WriteFreely promotion

Resolves T676
pull/163/head
Matt Baer 5 years ago committed by GitHub
commit 10ca7ca00a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      config/config.go
  2. 4
      pages.go
  3. 2
      pages/about.tmpl
  4. 20
      templates/include/footer.tmpl
  5. 4
      templates/user/include/footer.tmpl

@ -67,6 +67,7 @@ type (
JSDisabled bool `ini:"disable_js"` JSDisabled bool `ini:"disable_js"`
WebFonts bool `ini:"webfonts"` WebFonts bool `ini:"webfonts"`
Landing string `ini:"landing"` Landing string `ini:"landing"`
WFModesty bool `ini:"wf_modesty"`
// Users // Users
SingleUser bool `ini:"single_user"` SingleUser bool `ini:"single_user"`

@ -65,9 +65,9 @@ func defaultPrivacyTitle() sql.NullString {
func defaultAboutPage(cfg *config.Config) string { func defaultAboutPage(cfg *config.Config) string {
if cfg.App.Federation { if cfg.App.Federation {
return `_` + cfg.App.SiteName + `_ is an interconnected place for you to write and publish, powered by WriteFreely and ActivityPub.` return `_` + cfg.App.SiteName + `_ is an interconnected place for you to write and publish, powered by [WriteFreely](https://writefreely.org) and ActivityPub.`
} }
return `_` + cfg.App.SiteName + `_ is a place for you to write and publish, powered by WriteFreely.` return `_` + cfg.App.SiteName + `_ is a place for you to write and publish, powered by [WriteFreely](https://writefreely.org).`
} }
func defaultPrivacyPolicy(cfg *config.Config) string { func defaultPrivacyPolicy(cfg *config.Config) string {

@ -12,6 +12,7 @@
<p><em>{{.SiteName}}</em> is home to <strong>{{largeNumFmt .AboutStats.NumPosts}}</strong> {{pluralize "article" "articles" .AboutStats.NumPosts}} across <strong>{{largeNumFmt .AboutStats.NumBlogs}}</strong> {{pluralize "blog" "blogs" .AboutStats.NumBlogs}}.</p> <p><em>{{.SiteName}}</em> is home to <strong>{{largeNumFmt .AboutStats.NumPosts}}</strong> {{pluralize "article" "articles" .AboutStats.NumPosts}} across <strong>{{largeNumFmt .AboutStats.NumBlogs}}</strong> {{pluralize "blog" "blogs" .AboutStats.NumBlogs}}.</p>
{{end}} {{end}}
{{if not .WFModesty}}
<h2 style="margin-top:2em">About WriteFreely</h2> <h2 style="margin-top:2em">About WriteFreely</h2>
<p><a href="https://writefreely.org">WriteFreely</a> is a self-hosted, decentralized blogging platform for publishing beautiful, simple blogs.</p> <p><a href="https://writefreely.org">WriteFreely</a> is a self-hosted, decentralized blogging platform for publishing beautiful, simple blogs.</p>
<p>It lets you publish a single blog, or host a community of writers who can create multiple blogs under one account. You can also enable federation, which allows people in the fediverse to follow your blog, bookmark your posts, and share them with others.</p> <p>It lets you publish a single blog, or host a community of writers who can create multiple blogs under one account. You can also enable federation, which allows people in the fediverse to follow your blog, bookmark your posts, and share them with others.</p>
@ -23,5 +24,6 @@
<p><a href="https://writefreely.org">WriteFreely</a></p> <p><a href="https://writefreely.org">WriteFreely</a></p>
</div> </div>
</div> </div>
{{end}}
</div> </div>
{{end}} {{end}}

@ -1,13 +1,21 @@
{{define "footer"}} {{define "footer"}}
<footer{{if not .SingleUser}} class="contain-me"{{end}}> <footer{{if not (or .SingleUser .WFModesty)}} class="contain-me"{{end}}>
<hr /> <hr />
{{if .SingleUser}} {{if or .SingleUser .WFModesty}}
<nav> <nav>
<a class="home" href="/">{{.SiteName}}</a> <a class="home" href="/">{{.SiteName}}</a>
<a href="https://writefreely.org/guide/{{.OfficialVersion}}" target="guide">writer's guide</a> {{if not .SingleUser}}
<a href="https://developers.write.as/" title="Build on WriteFreely with our open developer API.">developers</a> <a href="/about">about</a>
<a href="https://github.com/writeas/writefreely">source code</a> {{if .LocalTimeline}}<a href="/read">reader</a>{{end}}
<a href="https://writefreely.org">writefreely {{.Version}}</a> {{if .Username}}<a href="https://writefreely.org/guide/{{.OfficialVersion}}" target="guide">writer's guide</a>{{end}}
<a href="/privacy">privacy</a>
<p style="font-size: 0.9em">powered by <a href="https://writefreely.org">writefreely</a></p>
{{else}}
<a href="https://writefreely.org/guide/{{.OfficialVersion}}" target="guide">writer's guide</a>
<a href="https://developers.write.as/" title="Build on WriteFreely with our open developer API.">developers</a>
<a href="https://github.com/writeas/writefreely">source code</a>
<a href="https://writefreely.org">writefreely {{.Version}}</a>
{{end}}
</nav> </nav>
{{else}} {{else}}
<div class="marketing-section"> <div class="marketing-section">

@ -12,7 +12,11 @@
{{if and (not .SingleUser) .LocalTimeline}}<a href="/read">reader</a>{{end}} {{if and (not .SingleUser) .LocalTimeline}}<a href="/read">reader</a>{{end}}
<a href="https://writefreely.org/guide/{{.OfficialVersion}}" target="guide">writer's guide</a> <a href="https://writefreely.org/guide/{{.OfficialVersion}}" target="guide">writer's guide</a>
{{if not .SingleUser}}<a href="/privacy">privacy</a>{{end}} {{if not .SingleUser}}<a href="/privacy">privacy</a>{{end}}
{{if .WFModesty}}
<p style="font-size: 0.9em">powered by <a href="https://writefreely.org">writefreely</a></p>
{{else}}
<a href="https://writefreely.org">writefreely {{.Version}}</a> <a href="https://writefreely.org">writefreely {{.Version}}</a>
{{end}}
</nav> </nav>
</footer> </footer>

Loading…
Cancel
Save