]> git.ipfire.org Git - ipfire.org.git/commitdiff
blog: Move the subscribe option into the header
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 4 Mar 2026 16:52:01 +0000 (16:52 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 4 Mar 2026 16:52:01 +0000 (16:52 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/blog/index.html

index 3d883e1304ac50531798907e7bd82ff56bc405d0..f17e82401b87d75238c41e7399aa3ba5803508ce 100644 (file)
        <section class="hero is-medium">
                <div class="hero-body">
                        <div class="container">
-                               <h1 class="title">
-                                       IPFire <span class="has-text-primary">Blog</span>
-                               </h1>
+                               <div class="columns is-vcentered">
+                                       <div class="column">
+                                               <h1 class="title">
+                                                       IPFire <span class="has-text-primary">Blog</span>
+                                               </h1>
 
-                               <h5 class="subtitle is-5">
-                                       {% if q %}
-                                               {{ _("Search Results for '%s'") % q }}
-                                       {% else %}
-                                               Releases, security updates, and stories from the IPFire community
+                                               <h5 class="subtitle is-5">
+                                                       {% if q %}
+                                                               {{ _("Search Results for '%s'") % q }}
+                                                       {% else %}
+                                                               Releases, security updates, and stories from the IPFire community
+                                                       {% end %}
+                                               </h5>
+                                       </div>
+
+                                       {# Encourage people to subscribe #}
+                                       {% if not current_user or not current_user.consents_to_promotional_emails %}
+                                               <div class="column is-one-quarter">
+                                                       <div class="card">
+                                                               <div class="card-content">
+                                                                       <div class="block">
+                                                                               <p class="heading">
+                                                                                       Newsletter
+                                                                               </p>
+
+                                                                               <p>
+                                                                                       <small>
+                                                                                               Get new posts and release notes delivered
+                                                                                               straight to your inbox. No spam.
+                                                                                       </small>
+                                                                               </p>
+                                                                       </div>
+
+                                                                       {# Show a button to sign up for anonymous users #}
+                                                                       {% if not current_user %}
+                                                                               <div class="block">
+                                                                                       <a class="button is-primary is-small is-fullwidth wrap-text" href="/join">
+                                                                                               <span class="icon">
+                                                                                                       <i class="fa-solid fa-envelope"></i>
+                                                                                               </span>
+                                                                                               <span>{{ _("Join Now & Subscribe") }}</span>
+                                                                                       </a>
+                                                                               </div>
+
+                                                                       {# Show a button to subscribe if users are logged in, but not yet subscribed #}
+                                                                       {% elif current_user and not current_user.consents_to_promotional_emails %}
+                                                                               <div class="block">
+                                                                                       <a class="button is-success is-fullwidth" href="/subscribe">
+                                                                                               <span class="icon">
+                                                                                                       <i class="fa-solid fa-envelope"></i>
+                                                                                               </span>
+                                                                                               <span>{{ _("Subscribe") }}</span>
+                                                                                       </a>
+                                                                               </div>
+                                                                       {% end %}
+                                                               </div>
+                                                       </div>
+                                               </div>
                                        {% end %}
-                               </h5>
+                               </div>
                        </div>
                </div>
        </section>
 
        <section class="section">
                <div class="container">
-                       <div class="columns">
-                               <div class="column">
-                                       {% if q and not posts %}
-                                               <div class="notification">
-                                                       {{ _("No Results Found For '%s'") % q }}
-                                               </div>
-                                       {% end %}
-
-                                       {% module BlogList(posts, latest=latest_post) %}
+                       {% if q and not posts %}
+                               <div class="notification">
+                                       {{ _("No Results Found For '%s'") % q }}
                                </div>
+                       {% end %}
 
-                               {# Encourage people to subscribe #}
-                               {% if not current_user or not current_user.consents_to_promotional_emails %}
-                                       <div class="column is-one-quarter">
-                                               <div class="card">
-                                                       <div class="card-content">
-                                                               <div class="block">
-                                                                       <p class="heading">
-                                                                               Newsletter
-                                                                       </p>
-
-                                                                       <p>
-                                                                               <small>
-                                                                                       Get new posts and release notes delivered
-                                                                                       straight to your inbox. No spam.
-                                                                               </small>
-                                                                       </p>
-                                                               </div>
-
-                                                               {# Show a button to sign up for anonymous users #}
-                                                               {% if not current_user %}
-                                                                       <div class="block">
-                                                                               <a class="button is-primary is-small is-fullwidth wrap-text" href="/join">
-                                                                                       <span class="icon">
-                                                                                               <i class="fa-solid fa-envelope"></i>
-                                                                                       </span>
-                                                                                       <span>{{ _("Join Now & Subscribe") }}</span>
-                                                                               </a>
-                                                                       </div>
-
-                                                               {# Show a button to subscribe if users are logged in, but not yet subscribed #}
-                                                               {% elif current_user and not current_user.consents_to_promotional_emails %}
-                                                                       <div class="block">
-                                                                               <a class="button is-success is-fullwidth" href="/subscribe">
-                                                                                       <span class="icon">
-                                                                                               <i class="fa-solid fa-envelope"></i>
-                                                                                       </span>
-                                                                                       <span>{{ _("Subscribe") }}</span>
-                                                                               </a>
-                                                                       </div>
-                                                               {% end %}
-                                                       </div>
-                                               </div>
-                                       </div>
-                               {% end %}
-                       </div>
+                       {% module BlogList(posts, latest=latest_post) %}
 
                        {# Show links to older years... #}
                        {% module BlogHistoryNavigation() %}