diff --git a/atst/routes/__init__.py b/atst/routes/__init__.py index bc264caf..ab7ec866 100644 --- a/atst/routes/__init__.py +++ b/atst/routes/__init__.py @@ -9,3 +9,8 @@ bp = Blueprint("atst", __name__) @bp.route("/") def home(): return render_template("home.html") + + +@bp.route("/styleguide") +def styleguide(): + return render_template("styleguide.html") diff --git a/templates/styleguide.html.to b/templates/styleguide.html similarity index 82% rename from templates/styleguide.html.to rename to templates/styleguide.html index 1db19496..e803d8c6 100644 --- a/templates/styleguide.html.to +++ b/templates/styleguide.html @@ -1,8 +1,10 @@ -{% extends "base.html.to" %} +{% extends "base.html" %} + +{% from "components.html" import Alert, Modal, Icon %} {% block modal %} - {% if modalOpen() %} - {% apply modal %} + {% if g.modalOpen %} + {% call Modal() %}
We count thirty Rebel ships, Lord Vader. But they're so small they're evading our turbo-lasers! We'll have to destroy them ship to ship. Get the crews to their fighters. Luke, let me know when you're going in. I'm on my way in now... Watch yourself! There's a lot of fire coming from the right side of that deflection tower. I'm on it. Squad leaders, we've picked up a new group of signals. Enemy fighters coming your way.
@@ -12,35 +14,35 @@ Close This also closes the modal - {% end %} - {% end %} -{% end %} + {% endcall %} + {% endif %} +{% endblock %} {% block content %} -{% module Alert('A Warning Alert', +{{ Alert('A Warning Alert', message="\This is a message. It is a very important message. Please note, proper semantic markup is required here, such as paragraph tags. Don't omit paragraph tags!
\Also note the same for actions below. You'll need to include the full link markup.
\ ", actions="Open a Modal Dialog", level='warning' -) %} +) }} -{% module Alert('A Success Alert', +{{ Alert('A Success Alert', message="Congratulations! You did a thing.
", level='success' -) %} +) }} -{% module Alert('An Error Alert', +{{ Alert('An Error Alert', message="Booooo. You're the worst.
", level='error' -) %} +) }} -{% module Alert('An Info Alert', +{{ Alert('An Info Alert', message="The more you know.
" -) %} +) }}