]> git.ipfire.org Git - ipfire.org.git/commitdiff
blog: Drop unused post module
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 14 Dec 2023 14:23:07 +0000 (14:23 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 14 Dec 2023 14:23:07 +0000 (14:23 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/templates/blog/modules/post.html [deleted file]
src/web/__init__.py
src/web/blog.py

index 3e42ad59b4ee3078f5baf0f426a64c4c3029a62b..9bb0c43fdcf047d9fe3927febe6215476610606e 100644 (file)
@@ -166,8 +166,7 @@ templates_blog_messagesdir = $(templates_blogdir)/messages
 
 templates_blog_modules_DATA = \
        src/templates/blog/modules/history-navigation.html \
-       src/templates/blog/modules/list.html \
-       src/templates/blog/modules/post.html
+       src/templates/blog/modules/list.html
 
 templates_blog_modulesdir = $(templates_blogdir)/modules
 
diff --git a/src/templates/blog/modules/post.html b/src/templates/blog/modules/post.html
deleted file mode 100644 (file)
index 41e4b4d..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-{% import ipfire.accounts as accounts %}
-
-<section class="blog-post {% if "lightningwirelabs.com" in post.tags %}lightning-wire-labs{% end %}">
-       <div class="blog-header">
-               <h4 class="card-title">
-                       <a href="/blog/{{ post.slug }}">
-                               {{ post.title }}
-                       </a>
-               </h4>
-
-               <p class="small text-muted">
-                       {{ _("by") }}
-
-                       {% if isinstance(post.author, accounts.Account) %}
-                               <a href="/users/{{ post.author.uid }}">{{ post.author.name }}</a>,
-                       {% else %}
-                               <strong>{{ post.author }}</strong>,
-                       {% end %}
-
-                       {% if post.is_published() %}
-                               {% if post.updated_at and post.updated_at > post.published_at %}
-                                       {{ locale.format_date(post.published_at, shorter=True, relative=False) }},
-                                       {{ _("Updated %s") % locale.format_date(post.updated_at, shorter=True) }}
-                               {% else %}
-                                       {{ locale.format_date(post.published_at, shorter=True, relative=False) }}
-                               {% end %}
-                       {% elif post.published_at %}
-                               <span class="text-danger">{{ _("Scheduled to be published %s") % locale.format_date(post.published_at, relative=False) }}</span>
-                       {% else %}
-                               {{ _("Not published") }}
-                       {% end %}
-               </p>
-       </div>
-
-       {% if not post.is_published() and post.is_editable(current_user) %}
-               <div class="row">
-                       <div class="col-12 col-md-6 mb-3">
-                               <div class="d-grid">
-                                       <a class="btn btn-success" href="/post/{{ post.slug }}/edit">
-                                               <span class="fas fa-edit mr-2"></span> {{ _("Edit") }}
-                                       </a>
-                               </div>
-                       </div>
-
-                       <div class="col-12 col-md-6 mb-3">
-                               <div class="d-grid">
-                                       <a class="btn btn-primary" href="/post/{{ post.slug }}/publish">
-                                               <span class="fas fa-book-reader mr-2"></span> {{ _("Publish") }}
-                                       </a>
-                               </div>
-                       </div>
-               </div>
-       {% end %}
-
-       <div class="blog-content">
-               {% raw post.html %}
-       </div>
-
-       <div class="btn-toolbar justify-content-center">
-               {% if "lightningwirelabs.com" in post.tags and post.link %}
-                       <a class="btn btn-lwl" href="{{ post.link }}">
-                               Go to Lightning Wire Labs <span class="fas fa-external-link-alt ml-2"></span>
-                       </a>
-               {% end %}
-
-               {% if post.release %}
-                       <a class="btn btn-primary" href="/downloads/{{ post.release.slug }}">
-                               {{ _("Download") }}
-                       </a>
-               {% end %}
-
-               {% if post.release or "donate" in post.tags %}
-                       <a class="btn btn-outline-primary ml-2" href="/donate">
-                               {{ _("Donate") }}
-                       </a>
-               {% end %}
-       </div>
-</section>
index f642261222ad6dd1aa08b519c091007a548477dd..43fe0bef85dab661814a165dd51825429946fd0e 100644 (file)
@@ -66,7 +66,6 @@ class Application(tornado.web.Application):
                                # Blog
                                "BlogHistoryNavigation": blog.HistoryNavigationModule,
                                "BlogList"             : blog.ListModule,
-                               "BlogPost"             : blog.PostModule,
 
                                # Boot
                                "BootMenuConfig"       : boot.MenuConfigModule,
index 20d2d74d7f9782c88b0c2f3b560ce876dce6467f..710bc5fa5a8573355efd996b58aa2fa08ef8dd01 100644 (file)
@@ -259,8 +259,3 @@ class ListModule(ui_modules.UIModule):
        def render(self, posts, relative=False, show_author=True):
                return self.render_string("blog/modules/list.html",
                        posts=posts, relative=relative, show_author=show_author)
-
-
-class PostModule(ui_modules.UIModule):
-       def render(self, post):
-               return self.render_string("blog/modules/post.html", post=post)