summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/views/expo.py4
-rw-r--r--templates/editexpopage.html2
-rw-r--r--templates/menu.html13
3 files changed, 16 insertions, 3 deletions
diff --git a/core/views/expo.py b/core/views/expo.py
index 65b6812..330733e 100644
--- a/core/views/expo.py
+++ b/core/views/expo.py
@@ -174,8 +174,10 @@ def expowebpage(request, expowebpath, path):
menumatch = re.match(r'(.*)<ul id="links">', body, re.DOTALL + re.IGNORECASE)
if menumatch:
has_menu = True
+
+ handbook = path.startswith("handbook")
return render(request, 'expopage.html', {'editable': editable, 'path': path, 'title': title,
- 'body': body, 'homepage': (path == "index.htm"), 'has_menu': has_menu})
+ 'body': body, 'homepage': (path == "index.htm"), 'has_menu': has_menu, 'handbook': handbook})
def mediapage(request, subpath=None, doc_root=None):
'''This is for special prefix paths /photos/ /site_media/, /static/ etc.
diff --git a/templates/editexpopage.html b/templates/editexpopage.html
index d66c9ca..ef3aa20 100644
--- a/templates/editexpopage.html
+++ b/templates/editexpopage.html
@@ -86,7 +86,7 @@
var previewFrame = document.getElementById('preview');
var preview = previewFrame.contentDocument || previewFrame.contentWindow.document;
preview.open();
- preview.write("<html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /><link rel='stylesheet' type='text/css' href='/css/main2.css' /></head><body>");
+ preview.write("<html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /><link rel='stylesheet' type='text/css' href='/css/main2.css' /> <style type=text/css>body{max-width: none;margin-left: 15px;margin-right: 15px;}</style></head><body>");
preview.write(editor.getValue());
preview.write("</body></html>");
preview.close();
diff --git a/templates/menu.html b/templates/menu.html
index ec93869..b02bf76 100644
--- a/templates/menu.html
+++ b/templates/menu.html
@@ -1,7 +1,17 @@
{% if not homepage %}
+<div id="menu">
<ul id="links">
<li><a href="/index.htm">Home</a></li>
-<li><a href="/handbook/index.htm">Handbook</a></li>
+<li><a href="/handbook/index.htm">Handbook</a>
+{% if handbook %}
+<ul>
+ <li><a href="/handbook/rig/rigit.html">Rigging guide</a></li>
+ <li><a href="/handbook/survey/index.htm">Surveying guide</a></li>
+ <li><a href="/handbook/look4.htm">Prospecting guide</a></li>
+ <li><a href="/handbook/rescue.htm">Rescue guide</a></li>
+ <li><a href="/handbook/photo.htm">Photography guide</a></li>
+</ul>
+{% endif%}</li>
<li><a href="/handbook/computing/onlinesystems.html">Online systems</a></li>
<li><a href="/caves">Caves</a></li>
<li><a href="/infodx.htm">Site index</a></li>
@@ -14,4 +24,5 @@
{% if editable %}<li><a href="{% url "editexpopage" path %}" class="editlink"><strong>Edit this page</strong></a></li>{% endif %}
{% if cave_editable %}<li><a href="{% url "edit_cave" cave.slug %}" class="editlink"><strong>Edit this cave</strong></a></li>{% endif %}
</ul>
+</div>
{% endif %}