changeset 1309:59f7fb43e39c

Design: used generic layout for error pages.
author Valentin Bartenev <vbart@nginx.com>
date Fri, 26 Sep 2014 20:02:47 +0400
parents f0383f5cfbb8
children fd567779aac1
files GNUmakefile xsls/error.xsls
diffstat 2 files changed, 9 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/GNUmakefile	Fri Sep 26 19:12:57 2014 +0400
+++ b/GNUmakefile	Fri Sep 26 20:02:47 2014 +0400
@@ -151,12 +151,9 @@
 
 $(OUT)/404.html:							\
 		xml/404.xml						\
-		xml/menu.xml						\
+		$(COMMON_DEPS)						\
 		dtd/error.dtd						\
-		xslt/error.xslt						\
-		xslt/dirname.xslt					\
-		xslt/menu.xslt						\
-		xslt/ga.xslt
+		xslt/error.xslt
 	$(call XSLT, xslt/error.xslt, $<, $@)
 
 $(OUT)/%.html:	xml/%.xml						\
--- a/xsls/error.xsls	Fri Sep 26 19:12:57 2014 +0400
+++ b/xsls/error.xsls	Fri Sep 26 20:02:47 2014 +0400
@@ -15,46 +15,32 @@
   -->
 X:param XML = "'../xml'";
 X:param YEAR;
+X:param ORIGIN;
 X:param TRANS;
 
 X:var LINK = "/error/@link";
 X:var LANG = "/error/@lang";
 
 X:include href = "dirname.xslt";
+X:include href = "link.xslt";
+X:include href = "style.xslt";
+X:include href = "body.xslt";
 X:include href = "menu.xslt";
 X:include href = "ga.xslt";
+X:include href = "content.xslt";
 
 
 X:template = "/error" {
     <html><head><title> !{@name} </title>
 
-    <style type="text/css">!{ normalize-space('
-        body  { background:   white;
-                color:        black;
-                font-family:  Georgia, serif; }
-        ') }
-    </style>
+    !style (lang="@lang")
 
     !ga ()
 
     </head>
 
-    <body>
-    <table width="100%">
-    <tr>
-        <td width="70%"><center><h1> !{@name} </h1></center></td>
-        <td rowspan="2" align="right" valign="top">
-            <img src="/nginx.gif" alt="nginx"/><br/>
+    !body (lang="@lang")
 
-            <br/>
-            <br/>
-
-            !! "document(concat($XML, '/menu.xml'))
-                         /menus/menu[@lang = current()/@lang]/item";
-        </td>
-    </tr>
-    </table>
-    </body>
     </html>
 }