Commit graph

13 commits

Author SHA1 Message Date
Matt Baer
238a913ce3 Make WriteFreely spacing consistent 2019-04-11 21:33:33 -04:00
Matt Baer
9cb0f80921 Support changing instance page titles
Now admins can choose a title for their About and Privacy pages; now
editable through the instance page editor.

This adds `title` and `content_type` fields to the `appcontent` table,
requiring a migration by running `writefreely --migrate`

The content_type field specifies that items we're currently storing in
this table are all "page"s; queries for fetching these have been updated
to filter for this type. In the future, this field will be used to
indicate when an item is a stylesheet (ref T563) or other supported
type.

Ref T566
2019-04-11 13:56:07 -04:00
Matt Baer
70e823d6ab Support user invites
This includes:

- A new `user_invites` config value that determines who can generate
  invite links
- A new page for generating invite links, with new user navigation link
- A new /invite/ path that allows anyone to sign up via unique invite
  link, even if registrations are closed
- Tracking who (of registered users) has been invited by whom

It requires an updated database with `writefreely --migrate` in order to
work.

This closes T556
2019-01-18 00:05:50 -05:00
Matt Baer
cb2b30b379 Show stats on About page if public_stats enabled
Previously, it would only show the stats if federation was enabled.
2018-12-03 18:49:12 -05:00
Matt Baer
77e79acd06 Include About/Privacy page content in page description 2018-11-21 15:04:47 -05:00
Matt Baer
be2c7ef86b Show instance stats on About page
This also moves the stats database logic out of nodeinfo.go and into
database.go.
2018-11-21 14:08:47 -05:00
Matt Baer
bdc4f270f8 Support editing About and Privacy pages from Admin panel
This allows admin to edit these pages from the web, using Markdown. It
also dynamically loads information on those pages now, and makes loading
`pages` templates a little easier to find in the code / more explicit.

It requires this new schema change:

CREATE TABLE IF NOT EXISTS `appcontent` (
  `id` varchar(36) NOT NULL,
  `content` mediumtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `updated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

This closes T533
2018-11-18 21:58:50 -05:00
Matt Baer
001fc8bb2d Fully support single-user mode
- New editor nav
- New backend nav
- Support for drafts
- Different footers on backend
2018-11-09 22:10:46 -05:00
Matt Baer
5614bb448a Show "closed registration" message on landing page 2018-11-09 19:55:07 -05:00
Matt Baer
2ea10939f2 Improve sign up
- Add server-side validation
- Normalize usernames
- Check username existence when signing up
- Tailor UI to whether federation is enabled or not
- Return user to form and show errors on sign up
2018-11-09 14:51:11 -05:00
Matt Baer
c5e7e35205 Update copy on default pages
- Removes more mentions of Write.as
- Adds a default privacy policy
- Improves the About page
2018-11-09 14:37:31 -05:00
Matt Baer
af872127c6 Add user-facing templates and pages 2018-11-08 01:13:00 -05:00
Matt Baer
a30fc5b52b Add handler, page, template loading 2018-11-07 23:50:50 -05:00