From 08b95f6aa1fd82842287d099e8c19c911d657584 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 29 Jul 2012 16:33:45 +1200 Subject: Refactor preview display pages. --- libpathod/static/pathod.css | 7 ++++ libpathod/templates/request_preview.html | 58 +++++++++++++++++++-------- libpathod/templates/request_previewform.html | 4 +- libpathod/templates/response_preview.html | 58 +++++++++++++++++++-------- libpathod/templates/response_previewform.html | 4 +- 5 files changed, 94 insertions(+), 37 deletions(-) (limited to 'libpathod') diff --git a/libpathod/static/pathod.css b/libpathod/static/pathod.css index 7ac8bc81..a37311b6 100644 --- a/libpathod/static/pathod.css +++ b/libpathod/static/pathod.css @@ -1,4 +1,5 @@ + .fronttable { } @@ -31,3 +32,9 @@ section { background: #000; color: #fff; } + +.innerlink { + text-decoration: none; + border-bottom:1px dotted; + margin-bottom: 15px; +} diff --git a/libpathod/templates/request_preview.html b/libpathod/templates/request_preview.html index 40f7771e..e4efd9d0 100644 --- a/libpathod/templates/request_preview.html +++ b/libpathod/templates/request_preview.html @@ -1,26 +1,52 @@ {% extends "frame.html" %} {% block body %} -

Preview

+ + +
+
+

Specification:

+
+
+ {% include "request_previewform.html" %} +
+
{% if syntaxerror %} -

Error: {{ syntaxerror }}

-
{{ marked }}
+
+
+

Error:

+
+
+

{{ syntaxerror }}

+
{{ marked }}
+
+
{% elif error %} -

{{ error }}

+
+
+

Error:

+
+
+

{{ error }}

+
+
{% else %} -

Spec:

- -
{{ spec }}
- -

Request:

+
+
+

Request:

+
+
+
{{ output }}
+ {% if pauses %} +

Note: pauses are skipped when generating previews!

+ {% endif %} +
+
+{% endif %} -
{{ output }}
+{% endblock %} - {% if pauses %} -

Note: pauses are skipped when generating previews!

- {% endif %} -{% endif %} -{% include "request_previewform.html" %} -{% endblock %} diff --git a/libpathod/templates/request_previewform.html b/libpathod/templates/request_previewform.html index 08cb2161..f38758ea 100644 --- a/libpathod/templates/request_previewform.html +++ b/libpathod/templates/request_previewform.html @@ -1,4 +1,4 @@ -
+
-Examples... +examples

Check out the complete language docs. Here diff --git a/libpathod/templates/response_preview.html b/libpathod/templates/response_preview.html index dd05e021..c725bcf8 100644 --- a/libpathod/templates/response_preview.html +++ b/libpathod/templates/response_preview.html @@ -1,26 +1,50 @@ {% extends "frame.html" %} {% block body %} -

Preview

+ + +
+
+

Specification:

+
+
+ {% include "response_previewform.html" %} +
+
{% if syntaxerror %} -

Error: {{ syntaxerror }}

-
{{ marked }}
+
+
+

Error:

+
+
+

{{ syntaxerror }}

+
{{ marked }}
+
+
{% elif error %} -

{{ error }}

+
+
+

Error:

+
+
+

{{ error }}

+
+
{% else %} -

Spec:

- -
{{ spec }}
- -

Response:

- -
{{ output }}
- - {% if pauses %} -

Note: pauses are skipped when generating previews!

- {% endif %} - +
+
+

Response:

+
+
+
{{ output }}
+ {% if pauses %} +

Note: pauses are skipped when generating previews!

+ {% endif %} +
+
{% endif %} -{% include "response_previewform.html" %} + {% endblock %} diff --git a/libpathod/templates/response_previewform.html b/libpathod/templates/response_previewform.html index 9934fbf7..19e28d08 100644 --- a/libpathod/templates/response_previewform.html +++ b/libpathod/templates/response_previewform.html @@ -1,4 +1,4 @@ -
+ -Examples... +examples

Check out the complete language docs. Here -- cgit v1.2.3