</div>
</div>
</section>
-
- <section class="hero">
- <div class="hero-body">
- <div class="container">
- <h4 class="title is-4">
- <a class="has-text-inherit" href="/blog">
- {{ _("Recent News From The IPFire Blog") }}
- </a>
- </h4>
-
- <div class="buttons are-small">
- {# Show a button to subscribe if users are not subscribed, yet #}
- {% if not current_user or not current_user.consents_to_promotional_emails %}
- <a class="button is-light" href="/subscribe">
- <span class="icon">
- <i class="fa-solid fa-envelope"></i>
- </span>
- <span>
- {{ _("Subscribe to our Newsletter") }}
- </span>
- </a>
- {% end %}
-
- {# Always show a button to subscribe to the RSS feed #}
- <a class="button is-light" href="/blog/feed.xml">
- <span class="icon">
- <i class="fas fa-rss"></i>
- </span>
- <span>
- {{ _("Subscribe to our RSS Feed") }}
- </span>
- </a>
- </div>
-
- {# List the most recent posts #}
- {% for i, post in enumerate(posts) %}
- <div class="block">
- {# Highlight the first three posts #}
- {% if i < 3 %}
- <h5 class="title is-5">
- <a href="/blog/{{ post.slug }}">
- {{ post.title }}
- </a>
- </h5>
-
- <h6 class="subtitle is-6">
- <small class="has-text-grey">
- {{ locale.format_date(post.published_at, shorter=True) }}
-
- {% if post.author %}
- {{ _("by %s") % post.author }}
- {% end %}
- </small>
- </h6>
-
- {# Show the first couple of lines for the first three posts #}
- <div class="content">
- {{ post.excerpt }}
- </div>
-
- {# All other posts will just get a headline #}
- {% else %}
- <h6 class="title is-6">
- <a href="/blog/{{ post.slug }}">
- {{ post.title }}
- </a>
- </h6>
-
- <h6 class="subtitle is-6">
- <small class="has-text-grey">
- {{ locale.format_date(post.published_at, shorter=True) }}
-
- {% if post.author %}
- {{ _("by %s") % post.author }}
- {% end %}
- </small>
- </h6>
- {% end %}
- </div>
- {% end %}
- </div>
- </div>
- </section>
{% end block %}
# Get the latest release.
latest_release = self.releases.get_latest()
- # Fetch the latest blog posts
- posts = self.backend.blog.get_newest(limit=10)
-
- self.render("index.html", latest_release=latest_release, posts=posts)
+ self.render("index.html", latest_release=latest_release)
class StaticHandler(base.AnalyticsMixin, base.BaseHandler):