# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1280810663 18000 # Node ID 329a9d17be88fabd7988816d5666d8740cece656 # Parent 139e4b8ffb171bbd1d00ed767926f5d7f28c3a10 Implement/fix js for snippets and make whiteboxes all same width diff -r 139e4b8ffb17 -r 329a9d17be88 static/djangodocs.css --- a/static/djangodocs.css Sat Jul 31 23:16:23 2010 -0500 +++ b/static/djangodocs.css Mon Aug 02 23:44:23 2010 -0500 @@ -71,6 +71,7 @@ padding: 10px; margin-top: 1em; margin-bottom: 1em; + width: 90%; } #copyright {margin-left: 1em;} diff -r 139e4b8ffb17 -r 329a9d17be88 templates/index.djhtml --- a/templates/index.djhtml Sat Jul 31 23:16:23 2010 -0500 +++ b/templates/index.djhtml Mon Aug 02 23:44:23 2010 -0500 @@ -2,17 +2,17 @@ {% block content %}
-

- Welcome -

-
-

- Agora Octave is a place dedicated for rapid collaboration related - to GNU Octave. You - can browse our code submissions - or contribute your own. -

-
+

+ Welcome +

+
+

+ Agora Octave is a place dedicated for rapid collaboration related + to GNU Octave. You + can browse our code submissions + or contribute your own. +

+

diff -r 139e4b8ffb17 -r 329a9d17be88 templates/snippet/base.djhtml --- a/templates/snippet/base.djhtml Sat Jul 31 23:16:23 2010 -0500 +++ b/templates/snippet/base.djhtml Mon Aug 02 23:44:23 2010 -0500 @@ -1,1 +1,1 @@ -{% extends "base.djhtml" %} +{% extends "whitebox.djhtml" %} diff -r 139e4b8ffb17 -r 329a9d17be88 templates/snippet/snippet_details.djhtml --- a/templates/snippet/snippet_details.djhtml Sat Jul 31 23:16:23 2010 -0500 +++ b/templates/snippet/snippet_details.djhtml Mon Aug 02 23:44:23 2010 -0500 @@ -42,124 +42,159 @@ {% load snippet_tags %} {% block content %} - + +

Snippet view

+ +
+
+ + + +

+ {% if snippet.title %} + {{ snippet.title }} + {% else %} + {% trans "Snippet" %} #{{ snippet.id}} + {% endif %} + + {% if snippet.author %} + {% blocktrans with snippet.author as author %} + by {{ author }} + {% endblocktrans %} + {% endif %} + +

+ +
-
-
- TTL: - - {{ snippet.expires|timeuntil }} - — - {% if snippet.pk|in_list:request.session.snippet_list %} - - Delete now! - - — - {% endif %} - {% trans "Wordwrap" %} -
-

- {% if snippet.title %} - {{ snippet.title }} - {% else %} - {% trans "Snippet" %} #{{ snippet.id}} - {% endif %} - - {% if snippet.author %} - {% blocktrans with snippet.author as author %} - by {{ author }} - {% endblocktrans %} - {% endif %} - -

+
+ TTL: + + {{ snippet.expires|timeuntil }} + — + {% if snippet.pk|in_list:request.session.snippet_list %} + + Delete now! + + — + {% endif %} + {% trans "Wordwrap" %} +
+ +
-
-
- - - +
- {# this has to look like this due to the pre tags #} -
{% for l in lines %}{{ forloop.counter }} 
+      
+ + + + - -
+ {# this has to look like this due to the pre tags #} +
{% for l in lines %}{{ forloop.counter }} 
+{% endfor %}
+
+ {# this has to look like this due to the pre tags #} +
{% for line in snippet.content_splitted %}{% if line %}{{ line|safe }}{% else %} {% endif %}
 {% endfor %}
- -
- {# this has to look like this due to the pre tags #} -
{% for line in snippet.content_splitted %}{% if line %}{{ line|safe }}{% else %} {% endif %}
-{% endfor %}
-
+ +
+
+ +
{#whitebox#} + +
{# info #} + +
+

{% trans "Write an answer" %} →

+
- -

{% trans "Write an answer" %} →

-
{% endblock %} -{% block sidebar %} -

{% trans "History" %}

+{% block content-related %} +
+ +

{% trans "History" %}

+ +
-
-
- {% for tree_item,structure in tree|tree_info %} - {% if structure.new_level %} - - {% endfor %} - {% endfor %} -
- -
-
-
+
+ + +
{# whitebox #} + +
{# info #} -

{% trans "Options" %}

-

- - {% trans "View raw" %} - -

-{% endblock sidebar %} +
+

{% trans "Options" %}

+ +{% endblock content-related %} {% block script_footer %} diff -r 139e4b8ffb17 -r 329a9d17be88 templates/snippet/snippet_details.js --- a/templates/snippet/snippet_details.js Sat Jul 31 23:16:23 2010 -0500 +++ b/templates/snippet/snippet_details.js Mon Aug 02 23:44:23 2010 -0500 @@ -8,9 +8,9 @@ $("div.accordion").accordion({ autoHeight: false, - header: 'h2', + header: 'h3', animation: 'bounceslide', - duration: 2000, + duration: 2000 }); /** @@ -21,7 +21,7 @@ a: $("input[name=a]:checked").val(), b: $("input[name=b]:checked").val() }, function(data){ - $('#diff').djhtml(data).slideDown('fast'); + $('#diff').html(data).slideDown('fast'); }); return false; }); diff -r 139e4b8ffb17 -r 329a9d17be88 templates/snippet/snippet_diff.djhtml --- a/templates/snippet/snippet_diff.djhtml Sat Jul 31 23:16:23 2010 -0500 +++ b/templates/snippet/snippet_diff.djhtml Mon Aug 02 23:44:23 2010 -0500 @@ -1,13 +1,17 @@ {% load i18n %} -

- ({% trans "Close" %}) - {% blocktrans with fileA.get_absolute_url as filea_url and fileB.get_absolute_url as fileb_url and fileA.id as filea_id and fileB.id as fileb_id %} - Diff between - Snippet #{{ filea_id }} - and - Snippet #{{ fileb_id }} - {% endblocktrans %} -

+
+
+

+ ({% trans "Close" %}) + {% blocktrans with fileA.get_absolute_url as filea_url and fileB.get_absolute_url as fileb_url and fileA.id as filea_id and fileB.id as fileb_id %} + Diff between + Snippet #{{ filea_id }} + and + Snippet #{{ fileb_id }} + {% endblocktrans %} +

-
{{ difftext|safe }}
+
{{ difftext|safe }}
+
+