templates_dnsbl_DATA = \
src/templates/dnsbl/index.html \
- src/templates/dnsbl/list.html
+ src/templates/dnsbl/list.html \
+ src/templates/dnsbl/lists.html
templates_dnsbldir = $(templatesdir)/dnsbl
{# DNSBL #}
{% if request.path.startswith("/dnsbl") %}
+ <a class="navbar-item is-tab
+ {% if request.path.startswith("/dnsbl/lists") %}is-active{% end %}"
+ href="/dnsbl/lists">
+ {{ _("Lists") }}
+ </a>
+
<a class="navbar-item is-tab
{% if request.path.startswith("/dnsbl/how-to-use") %}is-active{% end %}"
href="/dnsbl/how-to-use">
</div>
</div>
</section>
-
- <section class="hero">
- <div class="hero-body">
- <div class="container">
- {% module DNSBLLists(lists) %}
- </div>
- </div>
- </section>
{% end block %}
--- /dev/null
+{% extends "../base.html" %}
+
+{% block head %}
+ {% module OpenGraph(
+ title=_("IPFire DNSBL - Lists"),
+ ) %}
+{% end block %}
+
+{% block title %}{{ _("IPFire DNSBL") }} - {{ _("Lists") }}{% end block %}
+
+{% block container %}
+ <section class="hero">
+ <div class="hero-body">
+ <div class="container">
+ <nav class="breadcrumb" aria-label="breadcrumbs">
+ <ul>
+ <li>
+ <a href="/dnsbl">
+ {{ _("IPFire DNSBL") }}
+ </a>
+ </li>
+
+ <li class="is-active">
+ <a href="#" aria-current="page">{{ _("Lists") }}</a>
+ </li>
+ </ul>
+ </nav>
+ </div>
+ </div>
+ </section>
+
+ <section>
+ <div class="container">
+ {% module DNSBLLists(lists) %}
+ </div>
+ </section>
+{% end block %}
(r"/location/lookup/(.+)", location.LookupHandler),
# DNSBL
- (r"/dnsbl/?", dnsbl.IndexHandler),
+ (r"/dnsbl/?", StaticHandler, { "template" : "dnsbl/index.html" }),
+ (r"/dnsbl/lists", dnsbl.ListsHandler),
(r"/dnsbl/lists/(\w+)", dnsbl.ListHandler),
(r"/dnsbl/report", dnsbl.SubmitReportHandler),
(r"/dnsbl/reports/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", dnsbl.ReportHandler),
return await self.backend.dnsbl.get_list(slug)
-class IndexHandler(base.AnalyticsMixin, BaseHandler):
+class ListsHandler(base.AnalyticsMixin, BaseHandler):
async def get(self):
# Fetch all lists
lists = await self.backend.dnsbl.get_lists()
# Render the page
- self.render("dnsbl/index.html", lists=lists)
+ self.render("dnsbl/lists.html", lists=lists)
class ListHandler(base.AnalyticsMixin, BaseHandler):