From 823fb20c83ff9dedcc5d804f32a0f80ab1810813 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 15 Nov 2016 17:34:02 +0800 Subject: webui: Fix the issues due to the split of "header-{base,index}.html" Tornado currently do NOT support *nested* template extensions. * Rename "header-base.html" back to "header.html" * Merge the contents of "header-index.html" to "index.html" * Add new block "subtitle" to "base.html" --- fg21sim/webui/templates/base.html | 8 ++++++-- fg21sim/webui/templates/header-base.html | 33 ------------------------------- fg21sim/webui/templates/header-index.html | 22 --------------------- fg21sim/webui/templates/header.html | 33 +++++++++++++++++++++++++++++++ fg21sim/webui/templates/index.html | 16 ++++++++++++--- 5 files changed, 52 insertions(+), 60 deletions(-) delete mode 100644 fg21sim/webui/templates/header-base.html delete mode 100644 fg21sim/webui/templates/header-index.html create mode 100644 fg21sim/webui/templates/header.html (limited to 'fg21sim') diff --git a/fg21sim/webui/templates/base.html b/fg21sim/webui/templates/base.html index 1fbc75e..a7b5696 100644 --- a/fg21sim/webui/templates/base.html +++ b/fg21sim/webui/templates/base.html @@ -11,7 +11,11 @@ - {% block title %}FG21sim Web UI{% end %} + + {% block title %} + {% block subtitle %}{% end %} FG21sim Web UI + {% end %} + {% block extra_head %}{% end %} {% block css %} @@ -31,7 +35,7 @@ {% block page %} diff --git a/fg21sim/webui/templates/header-base.html b/fg21sim/webui/templates/header-base.html deleted file mode 100644 index 607b6f1..0000000 --- a/fg21sim/webui/templates/header-base.html +++ /dev/null @@ -1,33 +0,0 @@ -{# - # Copyright (c) 2016 Weitian LI - # MIT license - # - # Template of the basic header - #} - -{% block navigator %} - -{% end %} {# block navigator #} diff --git a/fg21sim/webui/templates/header-index.html b/fg21sim/webui/templates/header-index.html deleted file mode 100644 index c801040..0000000 --- a/fg21sim/webui/templates/header-index.html +++ /dev/null @@ -1,22 +0,0 @@ -{# - # Copyright (c) 2016 Weitian LI - # MIT license - # - # Header of the index page - #} - -{% extends "header-base.html" %} - -{% block header_contents %} - - - N/A - - - - -{% end %} diff --git a/fg21sim/webui/templates/header.html b/fg21sim/webui/templates/header.html new file mode 100644 index 0000000..607b6f1 --- /dev/null +++ b/fg21sim/webui/templates/header.html @@ -0,0 +1,33 @@ +{# + # Copyright (c) 2016 Weitian LI + # MIT license + # + # Template of the basic header + #} + +{% block navigator %} + +{% end %} {# block navigator #} diff --git a/fg21sim/webui/templates/index.html b/fg21sim/webui/templates/index.html index 150a060..9e47472 100644 --- a/fg21sim/webui/templates/index.html +++ b/fg21sim/webui/templates/index.html @@ -7,9 +7,19 @@ {% extends "base.html" %} -{% block header %} - {% include "header-index.html" %} -{% end %} +{% block header_contents %} + + + N/A + + + + +{% end %} {# block header_contents #} {% block main %} {% include "configs.html" %} -- cgit v1.2.2