]> git.ipfire.org Git - ipfire.org.git/commitdiff
location: Add an index page that presents the project
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 17 Oct 2019 15:03:19 +0000 (16:03 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 18 Oct 2019 10:36:37 +0000 (11:36 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/templates/base.html
src/templates/location/index.html [new file with mode: 0644]
src/web/location.py

index d51e3c6b1c4796ead72df60a6686846319e25abf..a50e5847934ec704fb45665a1024f1640cfd5330 100644 (file)
@@ -181,6 +181,7 @@ templates_fireinfo_modulesdir = $(templates_fireinfodir)/modules
 templates_location_DATA = \
        src/templates/location/base.html \
        src/templates/location/blacklists.html \
+       src/templates/location/index.html \
        src/templates/location/lookup.html
 
 templates_locationdir = $(templatesdir)/location
index dfebe32809cbe01efa9fa1e66b27e3860b2f9c4e..568b8b7f9c90bf48883ae1df8c4fb5c7a6684f97 100644 (file)
@@ -30,6 +30,9 @@
                                                {{ _("Blog") }}
                                        {% elif hostname == "fireinfo.ipfire.org" %}
                                                {{ _("Fireinfo") }}
+                                       {% elif hostname == "location.ipfire.org" %}
+                                               {{ _("Location") }}
+                                               <span class="badge badge-primary">{{ _("BETA") }}</span>
                                        {% elif hostname == "mirrors.ipfire.org" %}
                                                {{ _("Mirrors") }}
                                        {% elif hostname == "people.ipfire.org" %}
                                                                </li>
                                                        </ul>
                                                </div>
+                                       {% elif hostname == "location.ipfire.org" %}
+                                               <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar"
+                                                               aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
+                                                       <span class="fas fa-bars"></span>
+                                               </button>
+
+                                               <div class="collapse navbar-collapse" id="navbar">
+                                                       <ul class="navbar-nav ml-auto">
+                                                               <li class="nav-item">
+                                                                       <a class="nav-link {% if request.path == "/download" %}active{% end %}" href="/download">
+                                                                               {{ _("Download") }}
+                                                                       </a>
+                                                               </li>
+                                                       </ul>
+
+                                                       <a class="btn btn-primary ml-lg-2" href="https://www.ipfire.org/donate">
+                                                               <span class="fas fa-heart"></span> {{ _("Donate") }}
+                                                       </a>
+                                               </div>
                                        {% elif hostname == "nopaste.ipfire.org" %}
                                                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar"
                                                                aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
diff --git a/src/templates/location/index.html b/src/templates/location/index.html
new file mode 100644 (file)
index 0000000..1188294
--- /dev/null
@@ -0,0 +1,137 @@
+{% extends "base.html" %}
+
+{% block head %}
+       <meta name="description" content="{{ _("A powerful location database to find people on the Internet") }}" />
+{% end block %}
+
+{% block title %}{{ _("Welcome to IPFire") }}{% end block %}
+
+{% block container %}
+       <header class="cover">
+               <div class="container d-flex h-100 align-items-center">
+                       <div class="row flex-fill">
+                               <div class="col-12 col-md-6 my-5 text-center">
+                                       <i class="fas fa-globe-europe fa-10x py-5"></i>
+
+                                       <h3>2001:678:b28::</h3>
+                               </div>
+
+                               <div class="col-12 col-md-6 align-self-center px-3">
+                                       <h1 class="display-1">{{ _("Hey you!") }}</h1>
+
+                                       <h6>{{ _("You are visiting us from") }}</h6>
+
+                                       <dl class="row">
+                                               <dt class="col-sm-3">{{ _("Country") }}</dt>
+                                               <dd class="col-sm-9">Germany</dd>
+
+                                               <dt class="col-sm-3">{{ _("Network") }}</dt>
+                                               <dd class="col-sm-9">AS204867 - Lightning Wire Labs GmbH</dd>
+                                       </dl>
+                               </div>
+                       </div>
+               </div>
+       </header>
+
+       <section class="inverse">
+               <div class="container">
+                       <div class="row mb-5">
+                               <div class="col-12">
+                                       <h1 class="mb-3">{{ _("What is IPFire Location?") }}</h1>
+
+                                       <p>
+                                               IPFire Location can be used in firewalls or other threat
+                                               detection software, load-balancers, online shops, websites,
+                                               analytics &amp; reporting tools and more to detect the
+                                               originating country by IP address.
+                                               We are proud that our software is faster than others
+                                               by maintaining a smaller memory footprint which puts it
+                                               first in performance.
+                                       </p>
+
+                                       <p>
+                                               Our daily updated database does not only have information
+                                               about the originating country of all IPv6 and IPv4 addresses.
+                                               It identifies the Autonomous System (AS) these IP
+                                               addresses belong to, as well and more...
+                                       </p>
+
+                                       <p>
+                                               <code>libloc</code> is the C/C++ library that fires our
+                                               location services and runs on *nix, Mac OS X and more.
+                                               Integration into existing software is very easy and
+                                               bindings for languages like Python and Perl are available.
+                                       </p>
+
+                                       <div class="btn-toolbar mb-5">
+                                               <a class="btn btn-primary mr-2" href="/download">{{ _("Download") }}</a>
+                                               <a class="btn btn-secondary" href="https://www.ipfire.org/donate">
+                                                       <span class="fas fa-heart"></span>  {{ _("Donate") }}
+                                               </a>
+                                       </div>
+                               </div>
+                       </div>
+
+                       <div class="row mt-5">
+                               <div class="col-md-12 col-lg-6 mb-5 d-flex">
+                                       <div class="align-self-stretch">
+                                               <span class="fas fa-biohazard fa-2x text-primary px-3"></span>
+                                       </div>
+
+                                       <div class="flex-column">
+                                               <h5 class="mb-3">{{ _("Threat Detection") }}</h5>
+
+                                               <p>
+                                                       {{ _("Location information is crucial to identify where an attacker is coming from.") }}
+                                                       <br>
+                                                       {{ _("Analyze your traffic for malicious autonomous systems and block the straight away with IPFire.") }}
+                                               </p>
+                                       </div>
+                               </div>
+
+                               <div class="col-md-12 col-lg-6 mb-5 d-flex">
+                                       <div class="align-self-stretch">
+                                               <span class="fas fa-balance-scale fa-2x text-primary px-3"></span>
+                                       </div>
+
+                                       <div class="flex-column">
+                                               <h5 class="mb-3">{{ _("Load-Balancing") }}</h5>
+
+                                               <p>
+                                                       {{ _("Redirect your users to the nearest data center to given them a better user experience with faster websites and faster downloads.") }}
+                                               </p>
+                                       </div>
+                               </div>
+
+                               <div class="col-md-12 col-lg-6 mb-5 d-flex">
+                                       <div class="align-self-stretch">
+                                               <span class="fas fa-route fa-2x text-primary px-3"></span>
+                                       </div>
+
+                                       <div class="flex-column">
+                                               <h5 class="mb-3">{{ _("Online Visitors") }}</h5>
+
+                                               <p>
+                                                       {{ _("Comply with legal requirements and show visitors the correct information depending on the country they are visiting from.") }}
+                                               </p>
+                                       </div>
+                               </div>
+
+                               <div class="col-md-12 col-lg-6 mb-5 d-flex">
+                                       <div class="align-self-stretch">
+                                               <span class="fab fa-osi fa-2x text-primary px-3"></span>
+                                       </div>
+
+                                       <div class="flex-column">
+                                               <h5 class="mb-3">{{ _("Open Source") }}</h5>
+
+                                               <p>
+                                                       {{ _("libloc is free software and relies on support from the community.") }}
+                                                       {{ _("You can support us by helping to improve our database or with your donation.") }}
+                                               </p>
+                                       </div>
+                               </div>
+                       </div>
+               </div>
+       </section>
+{% end block %}
index 6584215fccc1bbdc6b336dd9771f9ae978d1b07e..f15718bfa1ee7eab629004d3bedb15436fa705a9 100644 (file)
@@ -9,7 +9,7 @@ from . import base
 
 class IndexHandler(base.BaseHandler):
        def get(self):
-               self.redirect("/lookup/%s" % self.get_remote_ip())
+               self.render("location/index.html")
 
 
 class LookupHandler(base.BaseHandler):