"Remove posts from front page" option
This commit is contained in:
parent
af6ddcf8f1
commit
699b6fc29e
|
@ -201,6 +201,7 @@ class Config(models.Model):
|
|||
site_name: str = "Takahē"
|
||||
highlight_color: str = "#449c8c"
|
||||
site_about: str = "<h2>Welcome!</h2>\n\nThis is a community running Takahē."
|
||||
site_frontpage_posts: bool = True
|
||||
site_icon: UploadedImage = StaticAbsoluteUrl("img/icon-128.png").relative # type: ignore
|
||||
site_banner: UploadedImage = StaticAbsoluteUrl(
|
||||
"img/fjords-banner-600.jpg"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
{{ content }}
|
||||
</section>
|
||||
|
||||
{% if not request.user.is_authenticated %}
|
||||
{% if not request.user.is_authenticated and config.site_frontpage_posts %}
|
||||
<h1>Recent Posts</h1>
|
||||
<section class="posts shell">
|
||||
{% for post in posts %}
|
||||
|
|
|
@ -51,6 +51,10 @@ class BasicSettings(AdminSettingsPage):
|
|||
"help_text": "Displayed on the homepage and the about page.\nUse Markdown for formatting.",
|
||||
"display": "textarea",
|
||||
},
|
||||
"site_frontpage_posts": {
|
||||
"title": "Show Posts On Front Page",
|
||||
"help_text": "Whether to show some recent posts on the logged-out homepage.",
|
||||
},
|
||||
"site_icon": {
|
||||
"title": "Site Icon",
|
||||
"help_text": "Minimum size 64x64px. Should be square.",
|
||||
|
@ -95,6 +99,7 @@ class BasicSettings(AdminSettingsPage):
|
|||
"Branding": [
|
||||
"site_name",
|
||||
"site_about",
|
||||
"site_frontpage_posts",
|
||||
"site_icon",
|
||||
"site_banner",
|
||||
"highlight_color",
|
||||
|
|
Loading…
Reference in New Issue