A clean, Markdown-based publishing platform made for writers. Write together, and build a community. https://writefreely.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

50 lines
1.8 KiB

  1. /*
  2. * Copyright © 2018 A Bunch Tell LLC.
  3. *
  4. * This file is part of WriteFreely.
  5. *
  6. * WriteFreely is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU Affero General Public License, included
  8. * in the LICENSE file in this source code package.
  9. */
  10. package writefreely
  11. import (
  12. "time"
  13. )
  14. func getAboutPage(app *app) (string, error) {
  15. c, _, err := app.db.GetDynamicContent("about")
  16. if err != nil {
  17. return "", err
  18. }
  19. if c == "" {
  20. if app.cfg.App.Federation {
  21. c = `_` + app.cfg.App.SiteName + `_ is an interconnected place for you to write and publish, powered by WriteFreely and ActivityPub.`
  22. } else {
  23. c = `_` + app.cfg.App.SiteName + `_ is a place for you to write and publish, powered by WriteFreely.`
  24. }
  25. }
  26. return c, nil
  27. }
  28. func getPrivacyPage(app *app) (string, *time.Time, error) {
  29. c, updated, err := app.db.GetDynamicContent("privacy")
  30. if err != nil {
  31. return "", nil, err
  32. }
  33. if c == "" {
  34. c = `[Write Freely](https://writefreely.org), the software that powers this site, is built to enforce your right to privacy by default.
  35. It retains as little data about you as possible, not even requiring an email address to sign up. However, if you _do_ give us your email address, it is stored encrypted in our database. We salt and hash your account's password.
  36. We store log files, or data about what happens on our servers. We also use cookies to keep you logged in to your account.
  37. Beyond this, it's important that you trust whoever runs **` + app.cfg.App.SiteName + `**. Software can only do so much to protect you -- your level of privacy protections will ultimately fall on the humans that run this particular service.`
  38. defaultTime := time.Date(2018, 11, 8, 12, 0, 0, 0, time.Local)
  39. updated = &defaultTime
  40. }
  41. return c, updated, nil
  42. }