]> git.ipfire.org Git - ipfire.org.git/blobdiff - src/templates/download/release.html
CSS: Replace btn-block with buttons wrapped in d-grid
[ipfire.org.git] / src / templates / download / release.html
index 98fbcb7fa24d87b509a07d9aa30d9473cf179238..566292fdb35928db235a714ba4c6e4ca33c73725 100644 (file)
@@ -3,56 +3,63 @@
 {% block title %}{{ release }}{% end block %}
 
 {% block container %}
-       <section>
+       <div class="header">
                <div class="container">
-                       <h6 class="mb-0">{{ _("Download") }}</h6>
+                       <h1>{{ _("Download") }}</h1>
 
-                       <h1 class="mb-0">{{ release }}</h1>
+                       <p class="text-muted">
+                               IPFire is free to download for everyone... XXX
+                       </p>
+               </div>
+       </div>
+
+       <div class="container">
+               <section>
+                       <h2>{{ release }}</h2>
 
-                       <h6 class="mb-5">
+                       <p class="text-muted">
                                {{ _("Released %s") % locale.format_date(release.published, relative=True, shorter=True) }}
 
                                {% if release.blog %}
                                        &bull;
-                                       <a href="https://blog.ipfire.org/post/{{ release.blog.slug }}">{{ _("Release Notes") }}</a>
+                                       <a href="/blog/{{ release.blog.slug }}">{{ _("Release Notes") }}</a>
                                {% end %}
-                       </h6>
-
-                       {% for arch in release.primary_arches %}
-                               <div class="my-5">
-                                       <h5>{{ arch }}</h5>
-
-                                       <ul class="list-group">
-                                               {% for file in release.get_files_by_arch(arch) %}
-                                                       <li class="list-group-item">
-                                                               <div class="d-flex w-100 justify-content-between">
-                                                                       <a href="{{ file.url }}">{{ _(file.desc) }}</a>
-
-                                                                       {% if file.size >= 1024 * 1024 %}
-                                                                               <span class="text-muted">{{ format_size(file.size) }}</span>
-                                                                       {% end %}
-                                                               </div>
-
-                                                               <ul class="list-inline text-muted small mb-0 d-none d-md-block">
-                                                                       <li class="list-inline-item">
-                                                                               {{ "%s: %s" % ("SHA256" if file.sha256 else "SHA1", file.sha256 or file.sha1) }}
-                                                                       </li>
-
-                                                                       {% if file.torrent_url %}
-                                                                               <li class="list-inline-item">
-                                                                                       <a href="{{ file.torrent_url }}">
-                                                                                               <i class="fas fa-download"></i> {{ _("Torrent Download") }}
-                                                                                       </a>
-                                                                               </li>
-                                                                       {% end %}
-                                                               </ul>
-                                                       </li>
-                                               {% end %}
-                                       </ul>
-                               </div>
-                       {% end %}
-               </div>
-       </section>
+                       </p>
+
+                       <div class="card-deck">
+                               {% for arch in release.arches %}
+                                       <div class="card">
+                                               <div class="card-body">
+                                                       <h6 class="card-title mb-0">
+                                                               {{ arch }}
+
+                                                               {% if arch in release.experimental_arches %}
+                                                                       <span class="badge bg-success">{{ _("Experimental") }}</span>
+                                                               {% elif arch in release.secondary_arches %}
+                                                                       <span class="badge bg-warning">{{ _("Legacy") }}</span>
+                                                               {% end %}
+                                                       </h6>
+                                               </div>
+
+                                               <div class="list-group list-group-flush">
+                                                       {% for file in release.get_files_by_arch(arch) %}
+                                                               <a class="list-group-item list-group-item-action
+                                                                               d-flex justify-content-between align-items-center download-splash" href="{{ file.url }}">
+                                                                       <span>
+                                                                               <i class="fas fa-download text-primary"></i> {{ _(file.desc) }}
+                                                                       </span>
+
+                                                                       <span class="text-muted small">
+                                                                               {{ format_size(file.size) }}
+                                                                       </span>
+                                                               </a>
+                                                       {% end %}
+                                               </div>
+                                       </div>
+                               {% end %}
+                       </div>
+               </section>
+       </div>
 
        <section class="inverse">
                <div class="container">
                </div>
        </section>
 
-       {% if release.secondary_arches %}
+       <div class="container">
                <section>
-                       <div class="container">
-                               <h3>{{ _("Secondary Architectures") }}</h3>
-
-                               {% for arch in release.secondary_arches %}
-                                       <div class="my-5">
-                                               <h5>
-                                                       {{ arch }}
-
-                                                       {% if arch in release.experimental_arches %}
-                                                               <span class="badge badge-success small">{{ _("Experimental") }}</span>
-                                                       {% else %}
-                                                               <span class="badge badge-warning small">{{ _("Legacy") }}</span>
-                                                       {% end %}
-                                               </h5>
-
-                                               <ul class="list-group">
-                                                       {% for file in release.get_files_by_arch(arch) %}
-                                                               <li class="list-group-item">
-                                                                       <div class="d-flex w-100 justify-content-between">
-                                                                               <a href="{{ file.url }}">{{ _(file.desc) }}</a>
-
-                                                                               {% if file.size >= 1024 * 1024 %}
-                                                                                       <span class="text-muted">{{ format_size(file.size) }}</span>
-                                                                               {% end %}
-                                                                       </div>
-
-                                                                       <ul class="list-inline text-muted small mb-0 d-none d-md-block">
-                                                                               <li class="list-inline-item">
-                                                                                       {{ "%s: %s" % ("SHA256" if file.sha256 else "SHA1", file.sha256 or file.sha1) }}
-                                                                               </li>
-
-                                                                               {% if file.torrent_url %}
-                                                                                       <li class="list-inline-item">
-                                                                                               <a href="{{ file.torrent_url }}">
-                                                                                                       <i class="fas fa-download"></i> {{ _("Torrent Download") }}
-                                                                                               </a>
-                                                                                       </li>
-                                                                               {% end %}
-                                                                       </ul>
-                                                               </li>
-                                                       {% end %}
-                                               </ul>
-                                       </div>
-                               {% end %}
+                       <p>
+                               {{ _("All downloads will be served from one of our mirror servers that are sponsored by various organisations from all around the world to help us make IPFire available for everyone") }}
+                       </p>
+
+                       <div class="d-grid">
+                               <a class="btn btn-light" href="/download/mirrors">
+                                       {{ _("Browse Mirrors") }}
+                               </a>
                        </div>
                </section>
-       {% end %}
+       </div>
 {% end block %}
+
+{% block javascript %}
+       <script type="text/javascript">
+               $("a.download-splash").click(function(e) {
+                       e.preventDefault();
+
+                       window.location = "/download/thank-you?file=" + this.href;
+               });
+       </script>
+{% end %}