]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/commitdiff
index.html now uses jinja2 master.html.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Wed, 27 Dec 2017 22:31:12 +0000 (22:31 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Wed, 27 Dec 2017 22:31:12 +0000 (22:31 +0000)
git-svn-id: http://www.winterrodeln.org/svn/wradmin/trunk@2756 7aebc617-e5e2-0310-91dc-80fb5f6d2477

wradmin/templates/index.html
wradmin/templates/master.html

index 8182ff6b3c6fcae4d5f058b5b707bbe3cc7e15c6..5a449fbf2436b30e5b3d22e5098b67382c7579c6 100644 (file)
@@ -1,11 +1,7 @@
-<!doctype html>
-<html>
+{% extends "master.html" %}
+{% block title %}Hauptmenü{% endblock %}
 
-<head>
-    <title>Hauptmenü</title>
-</head>
-
-<body>
+{% block content %}
 <h2>Hauptmenü</h2>
 
 <p>Willkommen auf den Administrationsseiten von Winterrodeln.</p>
     <li><a href="{{url_for('bericht_list')}}">Rodelbahnberichte</a></li>
     <li><a href="{{url_for('gasthaus_list')}}">Gasthäuser</a></li>
     <li><a href="{{url_for('coordtool_index')}}">Koordinaten-Rechner</a></li>
-    <!-- <li><a href="url_for('wrgpxtool')">Winterrodeln-GPX Datei Werkzeuge</a></li> -->
 </ul>
 
 <ul>
     <li><a href="{{h.wiki()}}">Winterrodeln-Hauptseite</a></li>
     <li><a href="{{h.forum()}}">Forum</a></li>
 </ul>
-
-</body>
-</html>
+{% endblock %}
index 98a82aaec31fab5c4e44a20d917b557d70a4ffb2..a64cd9e4b4bcae9b413e156dc2372abc1f10aa8b 100644 (file)
@@ -1,37 +1,39 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
-    xmlns:py="http://genshi.edgewall.org/"
-    xmlns:xi="http://www.w3.org/2001/XInclude"
-    py:strip="True">
-
-<head py:match="head" py:attrs="select('@*')">
+<!doctype html>
+<html>
+
+<head>
+    {% block head %}
+    <title>{% block title %}{% endblock %}</title>
     <meta content="text/html; charset=UTF-8" http-equiv="content-type" />
     <meta name="robots" content="noindex, nofollow" />
-    <link rel="stylesheet" type="text/css" media="screen" href="${h.url('/style.css')}" />
-    <link rel="shortcut icon" href="${h.url('/favicon.png')}" />
-    <meta py:replace="select('*|text()')" />
+    <link rel="stylesheet" type="text/css" media="screen" href="{{url_for('static', filename='style.css')}}" />
+    <link rel="shortcut icon" href="{{url_for('static', filename='favicon.png')}}" />
+    {% endblock %}
 </head>
 
 
-<body py:match="body" py:attrs="select('@*')">
-<h1 id="header"><img src="${h.url('/titlebanner.png')}" alt="Winterrodeln Administration"/></h1>
+<body>
+<h1 id="header"><img src="{{url_for('static', filename='titlebanner.png')}}" alt="Winterrodeln Administration"/></h1>
 
 <ul id="mainmenu">
-    <li><a href="${h.url(controller='rodelbahn', action='index')}">Übersicht</a></li>
-    <li><a href="${h.url(controller='rodelbahn', action='list')}">Rodelbahnen</a></li>
-    <li><a href="${h.url(controller='bericht', action='list')}">Rodelbahnberichte</a></li>
-    <li><a href="${h.url(controller='gasthaus', action='list')}">Gasthäuser</a></li>
+    <li><a href="{{url_for('index')}}">Übersicht</a></li>
+    <li><a href="{{url_for('rodelbahn_list')}}">Rodelbahnen</a></li>
+    <li><a href="{{url_for('bericht_list')}}">Rodelbahnberichte</a></li>
+    <li><a href="{{url_for('gasthaus_list')}}">Gasthäuser</a></li>
 </ul>
 
-<div py:for="message in get_flashed_messages()" class="flash">$message</div>
+{% with messages = get_flashed_messages() %}
+{% for message in messages %}
+<div class="flash">{{message}}</div>
+{% endfor %}
+{% endwith %}
 
 <div id="content">
-${select('*|text()')}
+{% block content %}
+{% endblock %}
 </div>
 
-<div id="footer"><img src="${h.url('/philipp_spitzer.png')}" alt="Philipp Spitzer"/></div>
+<div id="footer"><img src="{{url_for('static', filename='philipp_spitzer.png')}}" alt="Philipp Spitzer"/></div>
 </body>
 
 </html>