Add new table and model for editable contents. Contents are defined by a context and key, with the context ideally being a path (but not required) and the key identifying the unique piece of content. A rich_text boolean determines if content is editable and rendered as either a string or (GitHub-flavored) Markdown. A lang field is set to "en" by default, for future i18n.
A new EditableContentComponent can be used to render editable content
A new EditContentButtonComponent can be used for showing an edit button, which will open a modal with the correct content editing UI
Only admins can edit content (quelle surprise!)
The first editable contents are the title/menu and body text of "contributions/other" (ex "projects")
This PR removes the special ks-text-link class, so that links in editable content render with the default link style, without having to add classes to the Markdown source
Markdown content can contain arbitrary HTML, not just plain text
The best editing is no editing at all, so this PR also removes all Kosmos-specific language from service pages
Add a Pages controller, Privacy and ToS pages, and a footer menu to reach them (sticks to the bottom of either the screen or the content, whichever is taller)
Note: I initially added ActionText, only to find out that it's not the right solution for the problems solved in this PR. I left the commit, so it can easily be re-added in the future from that, if necessary.
Make some of the content editable.
* Add new table and model for editable contents. Contents are defined by a `context` and `key`, with the context ideally being a path (but not required) and the key identifying the unique piece of content. A `rich_text` boolean determines if content is editable and rendered as either a string or (GitHub-flavored) Markdown. A `lang` field is set to "en" by default, for future i18n.
* A new `EditableContentComponent` can be used to render editable content
* A new `EditContentButtonComponent` can be used for showing an edit button, which will open a modal with the correct content editing UI
* Only admins can edit content (quelle surprise!)
* The first editable contents are the title/menu and body text of "contributions/other" (ex "projects")
* This PR removes the special `ks-text-link` class, so that links in editable content render with the default link style, without having to add classes to the Markdown source
* Markdown content can contain arbitrary HTML, not just plain text
* The best editing is no editing at all, so this PR also removes all Kosmos-specific language from service pages
* Add a Pages controller, Privacy and ToS pages, and a footer menu to reach them (sticks to the bottom of either the screen or the content, whichever is taller)
closes #186
refs #222
Note: I initially added ActionText, only to find out that it's not the right solution for the problems solved in this PR. I left the commit, so it can easily be re-added in the future from that, if necessary.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Make some of the content editable.
contextandkey, with the context ideally being a path (but not required) and the key identifying the unique piece of content. Arich_textboolean determines if content is editable and rendered as either a string or (GitHub-flavored) Markdown. Alangfield is set to "en" by default, for future i18n.EditableContentComponentcan be used to render editable contentEditContentButtonComponentcan be used for showing an edit button, which will open a modal with the correct content editing UIks-text-linkclass, so that links in editable content render with the default link style, without having to add classes to the Markdown sourcecloses #186
refs #222
Note: I initially added ActionText, only to find out that it's not the right solution for the problems solved in this PR. I left the commit, so it can easily be re-added in the future from that, if necessary.
843bcd8cb9to29a67ff87029a67ff870tof1d9cf1e3dLooking good 👍