From 5328d2e1f92b47368df0e8c7d6475d4f421ca726 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Mon, 2 Jan 2017 17:59:29 -0500 Subject: [PATCH] Stubs for map and intel. --- calefaction/modules/intel.py | 16 ++++++++++++++-- calefaction/modules/map.py | 16 ++++++++++++++-- templates/intel/intel.mako | 7 +++++++ templates/intel/navitem.mako | 5 +++++ templates/map/map.mako | 7 +++++++ templates/map/navitem.mako | 5 +++++ 6 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 templates/intel/intel.mako create mode 100644 templates/intel/navitem.mako create mode 100644 templates/map/map.mako create mode 100644 templates/map/navitem.mako diff --git a/calefaction/modules/intel.py b/calefaction/modules/intel.py index b4f37df..96f465e 100644 --- a/calefaction/modules/intel.py +++ b/calefaction/modules/intel.py @@ -1,6 +1,18 @@ # -*- coding: utf-8 -*- -# ... +from flask_mako import render_template + +from ._provided import blueprint + +def home(): + """Render and return the main intel page.""" + return render_template("intel/intel.mako") def navitem(): - return "Intel" + """Render and return the navigation item for this module.""" + return render_template("intel/navitem.mako").decode("utf8") + +@blueprint.rroute("/intel") +def intel(): + """Render and return the main intel page.""" + return home() diff --git a/calefaction/modules/map.py b/calefaction/modules/map.py index 72ec6f8..4fd4f11 100644 --- a/calefaction/modules/map.py +++ b/calefaction/modules/map.py @@ -1,6 +1,18 @@ # -*- coding: utf-8 -*- -# ... +from flask_mako import render_template + +from ._provided import blueprint + +def home(): + """Render and return the main map page.""" + return render_template("map/map.mako") def navitem(): - return "Map" + """Render and return the navigation item for this module.""" + return render_template("map/navitem.mako").decode("utf8") + +@blueprint.rroute("/map") +def map(): + """Render and return the main map page.""" + return home() diff --git a/templates/intel/intel.mako b/templates/intel/intel.mako new file mode 100644 index 0000000..48031ab --- /dev/null +++ b/templates/intel/intel.mako @@ -0,0 +1,7 @@ +<%inherit file="../_default.mako"/> +<%block name="title"> + ${self.support.maketitle("Intel")} + +

Intel

+## TODO +

No intel available yet!

diff --git a/templates/intel/navitem.mako b/templates/intel/navitem.mako new file mode 100644 index 0000000..341b9ac --- /dev/null +++ b/templates/intel/navitem.mako @@ -0,0 +1,5 @@ +% if request.url_rule.endpoint == "intel.intel": + Intel +% else: + Intel +% endif diff --git a/templates/map/map.mako b/templates/map/map.mako new file mode 100644 index 0000000..4dadc8b --- /dev/null +++ b/templates/map/map.mako @@ -0,0 +1,7 @@ +<%inherit file="../_default.mako"/> +<%block name="title"> + ${self.support.maketitle("Map")} + +

Map

+## TODO +

No map available yet!

diff --git a/templates/map/navitem.mako b/templates/map/navitem.mako new file mode 100644 index 0000000..7f0b45d --- /dev/null +++ b/templates/map/navitem.mako @@ -0,0 +1,5 @@ +% if request.url_rule.endpoint == "map.map": + Map +% else: + Map +% endif