]> git.ipfire.org Git - ipfire.org.git/commitdiff
location: Move on to the main page
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 10 Oct 2023 10:42:21 +0000 (10:42 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 10 Oct 2023 10:42:21 +0000 (10:42 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/location/base.html
src/templates/location/index.html
src/templates/location/lookup.html
src/web/__init__.py

index 815f28b62863a35b9d8de47d460c6ea6540c1a03..030954f31aec556d70cee8536bdcd894ce364a7e 100644 (file)
@@ -2,7 +2,7 @@
 
 {% block content %}
        <h1 class="text-center my-5">
-               <a class="text-white" href="/lookup/{{ address }}">{{ address }}</a>
+               <a class="text-white" href="/projects/location/lookup/{{ address }}">{{ address }}</a>
        </h1>
 
        <section>
index d1947cd25956da64e963d5d5b0e41f81a00bf311..dd4ea4dbd07d5506fe7226c0ca54c26042a9347f 100644 (file)
@@ -18,7 +18,7 @@
                                        {{ _("Unfortunately we do not know where you are visiting us from.") }}
                                {% end %}
 
-                               <a href="/lookup/{{ address }}">{{ _("Learn More") }}</a>
+                               <a href="/projects/location/lookup/{{ address }}">{{ _("Learn More") }}</a>
                        </p>
                </div>
        </div>
@@ -52,8 +52,8 @@
                        </p>
 
                        <div class="btn-toolbar">
-                               <a class="btn btn-secondary mr-2" href="/how-to-use">{{ _("How To Use") }}</a>
-                               <a class="btn btn-primary" href="https://www.ipfire.org/donate">
+                               <a class="btn btn-secondary mr-2" href="/projects/location/how-to-use">{{ _("How To Use") }}</a>
+                               <a class="btn btn-primary" href="/donate">
                                        {{ _("Donate") }}
                                </a>
                        </div>
index 59cea88fb46a9ea3e8e652df88788b5631c011b5..71e44933bef90b441a22785e5b37f6007ecbfb45 100644 (file)
@@ -42,7 +42,7 @@
                        </dl>
 
                        <div class="d-grid">
-                               <a class="btn btn-light" href="/lookup/{{ address }}/blacklists">
+                               <a class="btn btn-light" href="/projects/location/lookup/{{ address }}/blacklists">
                                        {{ _("Blacklist Status") }}
                                </a>
                        </div>
index adcebde9382b37276d9e034239ffedfd8fa99490..b710bcc2f7b031ec9ed949ec5c006d8941c53ec6 100644 (file)
@@ -166,6 +166,13 @@ class Application(tornado.web.Application):
                        (r"/password\-reset", auth.PasswordResetInitiationHandler),
                        (r"/password\-reset/([a-z_][a-z0-9_-]{0,31})/(\w+)", auth.PasswordResetHandler),
 
+                       # Projects
+                       (r"/projects/location", location.IndexHandler),
+                       (r"/projects/location/download", StaticHandler, { "template" : "../location/download.html" }),
+                       (r"/projects/location/how\-to\-use", StaticHandler, { "template" : "../location/how-to-use.html" }),
+                       (r"/projects/location/lookup/(.+)/blacklists", location.BlacklistsHandler),
+                       (r"/projects/location/lookup/(.+)", location.LookupHandler),
+
                        # Single-Sign-On for Discourse
                        (r"/sso/discourse", auth.SSODiscourse),
 
@@ -315,14 +322,7 @@ class Application(tornado.web.Application):
 
                # location.ipfire.org
                self.add_handlers(r"location\.([a-z]+\.dev\.)?ipfire\.org", [
-                       (r"/", location.IndexHandler),
-                       (r"/download", StaticHandler, { "template" : "../location/download.html" }),
-                       (r"/how\-to\-use", StaticHandler, { "template" : "../location/how-to-use.html" }),
-                       (r"/lookup/(.+)/blacklists", location.BlacklistsHandler),
-                       (r"/lookup/(.+)", location.LookupHandler),
-
-                       # Serve any static files
-                       (r"/static/(.*)", tornado.web.StaticFileHandler, { "path" : self.settings.get("static_path") }),
+                       (r"/(.*)", tornado.web.RedirectHandler, { "url" : "https://www.ipfire.org/projects/location/{0}" }),
                ])
 
                # geoip.ipfire.org