From: Michael Tremer Date: Tue, 10 Oct 2023 10:42:21 +0000 (+0000) Subject: location: Move on to the main page X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d9f7b6e59de83235a4a18b754374b148858d8564;p=ipfire.org.git location: Move on to the main page Signed-off-by: Michael Tremer --- diff --git a/src/templates/location/base.html b/src/templates/location/base.html index 815f28b6..030954f3 100644 --- a/src/templates/location/base.html +++ b/src/templates/location/base.html @@ -2,7 +2,7 @@ {% block content %}

- {{ address }} + {{ address }}

diff --git a/src/templates/location/index.html b/src/templates/location/index.html index d1947cd2..dd4ea4db 100644 --- a/src/templates/location/index.html +++ b/src/templates/location/index.html @@ -18,7 +18,7 @@ {{ _("Unfortunately we do not know where you are visiting us from.") }} {% end %} - {{ _("Learn More") }} + {{ _("Learn More") }}

@@ -52,8 +52,8 @@

diff --git a/src/templates/location/lookup.html b/src/templates/location/lookup.html index 59cea88f..71e44933 100644 --- a/src/templates/location/lookup.html +++ b/src/templates/location/lookup.html @@ -42,7 +42,7 @@ diff --git a/src/web/__init__.py b/src/web/__init__.py index adcebde9..b710bcc2 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -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