Mercurial > piecrust2
changeset 469:f14796cbab0f 2.0.0a12
cm: Fix wrong directory for utilities.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 14 Jul 2015 23:02:38 -0700 |
parents | 1038dba7b46e |
children | c582746cb7eb |
files | util/build/generate_messages.cmd util/build/generate_messages.sh util/build/messages/config.yml util/build/messages/pages/_index.html util/build/messages/pages/critical.html util/build/messages/pages/error.html util/build/messages/pages/error404.html util/build/messages/templates/default.html util/build/messages/templates/error.html util/generate_messages.cmd util/generate_messages.sh util/messages/config.yml util/messages/pages/_index.html util/messages/pages/critical.html util/messages/pages/error.html util/messages/pages/error404.html util/messages/templates/default.html util/messages/templates/error.html |
diffstat | 18 files changed, 148 insertions(+), 148 deletions(-) [+] |
line wrap: on
line diff
--- a/util/build/generate_messages.cmd Mon Jul 13 08:17:45 2015 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -@echo off -setlocal - -set CUR_DIR=%~dp0 -set CHEF=%CUR_DIR%..\bin\chef -set OUT_DIR=%CUR_DIR%..\piecrust\resources\messages -set ROOT_DIR=%CUR_DIR%messages - -%CHEF% --root=%ROOT_DIR% bake -o %OUT_DIR% -del %OUT_DIR%\index.html -
--- a/util/build/generate_messages.sh Mon Jul 13 08:17:45 2015 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -#!/bin/sh - -CUR_DIR="$( cd "$( dirname "$0" )" && pwd )" -CHEF=${CUR_DIR}/../bin/chef -OUT_DIR=${CUR_DIR}/../piecrust/resources/messages -ROOT_DIR=${CUR_DIR}/messages - -$CHEF --root=$ROOT_DIR bake -o $OUT_DIR -rm ${OUT_DIR}/index.html
--- a/util/build/messages/config.yml Mon Jul 13 08:17:45 2015 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -site: - title: PieCrust System Messages
--- a/util/build/messages/pages/_index.html Mon Jul 13 08:17:45 2015 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ ---- -title: PieCrust System Messages ---- - -Here are the **PieCrust** system message pages: - -* [Requirements Not Met]({{ pcurl('requirements') }}) -* [Error]({{ pcurl('error') }}) -* [Not Found]({{ pcurl('error404') }}) -* [Critical Error]({{ pcurl('critical') }}) - -This very page you're reading, however, is only here for convenience.
--- a/util/build/messages/pages/critical.html Mon Jul 13 08:17:45 2015 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ ---- -title: The Whole Kitchen Burned Down! -layout: error ---- -Something critically bad happened, and **PieCrust** needs to shut down. It's probably our fault. -
--- a/util/build/messages/pages/error.html Mon Jul 13 08:17:45 2015 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ ---- -title: The Cake Just Burned! -layout: error ---- -
--- a/util/build/messages/pages/error404.html Mon Jul 13 08:17:45 2015 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ ---- -title: Can't find the sugar! -layout: error ---- -It looks like the page you were trying to access does not exist around here. Try going somewhere else. -
--- a/util/build/messages/templates/default.html Mon Jul 13 08:17:45 2015 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -<!doctype html> -<html> -<head> - <title>{{ page.title }}</title> - <meta name="generator" content="PieCrust" /> - <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Lobster"> - <style> - body { - margin: 0; - padding: 1em; - background: #eee; - color: #000; - font-family: Georgia, serif; - } - h1 { - font-size: 4.5em; - font-family: Lobster, 'Trebuchet MS', Verdana, sans-serif; - text-align: center; - font-weight: bold; - margin-top: 0; - color: #333; - text-shadow: 0px 2px 5px rgba(0,0,0,0.3); - } - h2 { - font-size: 2.5em; - font-family: 'Lobster', 'Trebuchet MS', Verdana, sans-serif; - } - code { - background: #ddd; - padding: 0 0.2em; - } - #preamble { - font-size: 1.2em; - font-style: italic; - text-align: center; - margin-bottom: 0; - } - #container { - margin: 0 20%; - } - #content { - margin: 2em 1em; - } - .error-details { - color: #d11; - } - .note { - margin: 3em; - color: #888; - font-style: italic; - } - </style> -</head> -<body> - <div id="container"> - <div id="header"> - <p id="preamble">A Message From The Kitchen:</p> - <h1>{{ page.title }}</h1> - </div> - <hr /> - <div id="content"> - {% block content %} - {{ content|safe }} - {% endblock %} - </div> - <hr /> - {% block footer %}{% endblock %} - </div> -</body> -</html>
--- a/util/build/messages/templates/error.html Mon Jul 13 08:17:45 2015 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -{% extends "default.html" %} - -{% block content %} -{{content|safe}} - -{# The following is `raw` because we want it to be in the - produced page, so it can then be templated on the fly - with the error messages #} -{% raw %} -{% if details %} -<div class="error-details"> - <p>Error details:</p> - <ul> - {% for desc in details %} - <li>{{ desc }}</li> - {% endfor %} - </ul> -</div> -{% endif %} -{% endraw %} -{% endblock %} - -{% block footer %} -{% pcformat 'textile' %} -p(note). You're seeing this because something wrong happend. To see detailed errors with callstacks, run chef with the @--debug@ parameter, append @?!debug@ to the URL, or initialize the @PieCrust@ object with @{'debug': true}@. On the other hand, to see you custom error pages, set the @site/display_errors@ setting to @false@. -{% endpcformat %} -{% endblock %}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/util/generate_messages.cmd Tue Jul 14 23:02:38 2015 -0700 @@ -0,0 +1,11 @@ +@echo off +setlocal + +set CUR_DIR=%~dp0 +set CHEF=%CUR_DIR%..\bin\chef +set OUT_DIR=%CUR_DIR%..\piecrust\resources\messages +set ROOT_DIR=%CUR_DIR%messages + +%CHEF% --root=%ROOT_DIR% bake -o %OUT_DIR% +del %OUT_DIR%\index.html +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/util/generate_messages.sh Tue Jul 14 23:02:38 2015 -0700 @@ -0,0 +1,9 @@ +#!/bin/sh + +CUR_DIR="$( cd "$( dirname "$0" )" && pwd )" +CHEF=${CUR_DIR}/../bin/chef +OUT_DIR=${CUR_DIR}/../piecrust/resources/messages +ROOT_DIR=${CUR_DIR}/messages + +$CHEF --root=$ROOT_DIR bake -o $OUT_DIR +rm ${OUT_DIR}/index.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/util/messages/config.yml Tue Jul 14 23:02:38 2015 -0700 @@ -0,0 +1,2 @@ +site: + title: PieCrust System Messages
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/util/messages/pages/_index.html Tue Jul 14 23:02:38 2015 -0700 @@ -0,0 +1,12 @@ +--- +title: PieCrust System Messages +--- + +Here are the **PieCrust** system message pages: + +* [Requirements Not Met]({{ pcurl('requirements') }}) +* [Error]({{ pcurl('error') }}) +* [Not Found]({{ pcurl('error404') }}) +* [Critical Error]({{ pcurl('critical') }}) + +This very page you're reading, however, is only here for convenience.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/util/messages/pages/critical.html Tue Jul 14 23:02:38 2015 -0700 @@ -0,0 +1,6 @@ +--- +title: The Whole Kitchen Burned Down! +layout: error +--- +Something critically bad happened, and **PieCrust** needs to shut down. It's probably our fault. +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/util/messages/pages/error.html Tue Jul 14 23:02:38 2015 -0700 @@ -0,0 +1,5 @@ +--- +title: The Cake Just Burned! +layout: error +--- +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/util/messages/pages/error404.html Tue Jul 14 23:02:38 2015 -0700 @@ -0,0 +1,6 @@ +--- +title: Can't find the sugar! +layout: error +--- +It looks like the page you were trying to access does not exist around here. Try going somewhere else. +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/util/messages/templates/default.html Tue Jul 14 23:02:38 2015 -0700 @@ -0,0 +1,70 @@ +<!doctype html> +<html> +<head> + <title>{{ page.title }}</title> + <meta name="generator" content="PieCrust" /> + <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Lobster"> + <style> + body { + margin: 0; + padding: 1em; + background: #eee; + color: #000; + font-family: Georgia, serif; + } + h1 { + font-size: 4.5em; + font-family: Lobster, 'Trebuchet MS', Verdana, sans-serif; + text-align: center; + font-weight: bold; + margin-top: 0; + color: #333; + text-shadow: 0px 2px 5px rgba(0,0,0,0.3); + } + h2 { + font-size: 2.5em; + font-family: 'Lobster', 'Trebuchet MS', Verdana, sans-serif; + } + code { + background: #ddd; + padding: 0 0.2em; + } + #preamble { + font-size: 1.2em; + font-style: italic; + text-align: center; + margin-bottom: 0; + } + #container { + margin: 0 20%; + } + #content { + margin: 2em 1em; + } + .error-details { + color: #d11; + } + .note { + margin: 3em; + color: #888; + font-style: italic; + } + </style> +</head> +<body> + <div id="container"> + <div id="header"> + <p id="preamble">A Message From The Kitchen:</p> + <h1>{{ page.title }}</h1> + </div> + <hr /> + <div id="content"> + {% block content %} + {{ content|safe }} + {% endblock %} + </div> + <hr /> + {% block footer %}{% endblock %} + </div> +</body> +</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/util/messages/templates/error.html Tue Jul 14 23:02:38 2015 -0700 @@ -0,0 +1,27 @@ +{% extends "default.html" %} + +{% block content %} +{{content|safe}} + +{# The following is `raw` because we want it to be in the + produced page, so it can then be templated on the fly + with the error messages #} +{% raw %} +{% if details %} +<div class="error-details"> + <p>Error details:</p> + <ul> + {% for desc in details %} + <li>{{ desc }}</li> + {% endfor %} + </ul> +</div> +{% endif %} +{% endraw %} +{% endblock %} + +{% block footer %} +{% pcformat 'textile' %} +p(note). You're seeing this because something wrong happend. To see detailed errors with callstacks, run chef with the @--debug@ parameter, append @?!debug@ to the URL, or initialize the @PieCrust@ object with @{'debug': true}@. On the other hand, to see you custom error pages, set the @site/display_errors@ setting to @false@. +{% endpcformat %} +{% endblock %}