aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Hudson2008-09-23 19:55:18 -0700
committerRob Hudson2008-09-23 19:55:18 -0700
commit7ea7e780b775680be3050a8d6eb71f63b5a1fd34 (patch)
treef19afc309117cbcdce467b762beaaddb131ca6f7
parent777e70fde5bb78e1d9e9eaf881caa801690cacc6 (diff)
downloaddjango-debug-toolbar-7ea7e780b775680be3050a8d6eb71f63b5a1fd34.tar.bz2
Updating pygments styles to better match new toolbar styles.
-rw-r--r--debug_toolbar/media/toolbar.css83
-rw-r--r--debug_toolbar/panels/sql.py2
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/sql.html4
3 files changed, 78 insertions, 11 deletions
diff --git a/debug_toolbar/media/toolbar.css b/debug_toolbar/media/toolbar.css
index 7c37f03..b1fae96 100644
--- a/debug_toolbar/media/toolbar.css
+++ b/debug_toolbar/media/toolbar.css
@@ -28,15 +28,15 @@
}
#djDebugToolbar li:hover {
- background: #487858;
+ background: #487858;
}
#djDebugToolbar li:hover a {
- color: #fff;
+ color: #fff;
}
#djDebugToolbar li:last-child {
- border-right: 1px solid #487858;
+ border-right: 1px solid #487858;
}
#djDebugToolbar #djDebugButton {
@@ -53,14 +53,13 @@
}
#djDebug a {
- color: #f7c757;
+ color: #f7c757;
}
#djDebug a:hover {
- color: #fff;
+ color: #fff;
}
-
#djDebug .panelContent {
background: #2a5738;
border-bottom: 2px solid #234f32;
@@ -90,7 +89,7 @@
}
#djDebug .panelContent p, #djDebug .panelContent table, #djDebug .panelContent ol, #djDebug .panelContent ul, #djDebug .panelContent dl {
- margin: 5px 0 15px;
+ margin: 5px 0 15px;
}
#djDebug .panelContent table {
@@ -126,4 +125,72 @@
#djDebug .row2 td {
background: #356042;
-} \ No newline at end of file
+}
+#djDebug .syntax { background: #111111; color: #ffffff }
+#djDebug .syntax .c { color: #008800; font-style: italic; background-color: #0f140f } /* Comment */
+#djDebug .syntax .err { color: #ffffff } /* Error */
+#djDebug .syntax .g { color: #ffffff } /* Generic */
+#djDebug .syntax .k { color: #fb660a; font-weight: bold } /* Keyword */
+#djDebug .syntax .l { color: #ffffff } /* Literal */
+#djDebug .syntax .n { color: #ffffff } /* Name */
+#djDebug .syntax .o { color: #ffffff } /* Operator */
+#djDebug .syntax .x { color: #ffffff } /* Other */
+#djDebug .syntax .p { color: #ffffff } /* Punctuation */
+#djDebug .syntax .cm { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Multiline */
+#djDebug .syntax .cp { color: #ff0007; font-weight: bold; font-style: italic; background-color: #0f140f } /* Comment.Preproc */
+#djDebug .syntax .c1 { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Single */
+#djDebug .syntax .cs { color: #008800; font-style: italic; background-color: #0f140f } /* Comment.Special */
+#djDebug .syntax .gd { color: #ffffff } /* Generic.Deleted */
+#djDebug .syntax .ge { color: #ffffff } /* Generic.Emph */
+#djDebug .syntax .gr { color: #ffffff } /* Generic.Error */
+#djDebug .syntax .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */
+#djDebug .syntax .gi { color: #ffffff } /* Generic.Inserted */
+#djDebug .syntax .go { color: #444444; background-color: #222222 } /* Generic.Output */
+#djDebug .syntax .gp { color: #ffffff } /* Generic.Prompt */
+#djDebug .syntax .gs { color: #ffffff } /* Generic.Strong */
+#djDebug .syntax .gu { color: #ffffff; font-weight: bold } /* Generic.Subheading */
+#djDebug .syntax .gt { color: #ffffff } /* Generic.Traceback */
+#djDebug .syntax .kc { color: #fb660a; font-weight: bold } /* Keyword.Constant */
+#djDebug .syntax .kd { color: #fb660a; font-weight: bold } /* Keyword.Declaration */
+#djDebug .syntax .kp { color: #fb660a } /* Keyword.Pseudo */
+#djDebug .syntax .kr { color: #fb660a; font-weight: bold } /* Keyword.Reserved */
+#djDebug .syntax .kt { color: #cdcaa9; font-weight: bold } /* Keyword.Type */
+#djDebug .syntax .ld { color: #ffffff } /* Literal.Date */
+#djDebug .syntax .m { color: #0086f7; font-weight: bold } /* Literal.Number */
+#djDebug .syntax .s { color: #0086d2 } /* Literal.String */
+#djDebug .syntax .na { color: #ff0086; font-weight: bold } /* Name.Attribute */
+#djDebug .syntax .nb { color: #ffffff } /* Name.Builtin */
+#djDebug .syntax .nc { color: #ffffff } /* Name.Class */
+#djDebug .syntax .no { color: #0086d2 } /* Name.Constant */
+#djDebug .syntax .nd { color: #ffffff } /* Name.Decorator */
+#djDebug .syntax .ni { color: #ffffff } /* Name.Entity */
+#djDebug .syntax .ne { color: #ffffff } /* Name.Exception */
+#djDebug .syntax .nf { color: #ff0086; font-weight: bold } /* Name.Function */
+#djDebug .syntax .nl { color: #ffffff } /* Name.Label */
+#djDebug .syntax .nn { color: #ffffff } /* Name.Namespace */
+#djDebug .syntax .nx { color: #ffffff } /* Name.Other */
+#djDebug .syntax .py { color: #ffffff } /* Name.Property */
+#djDebug .syntax .nt { color: #fb660a; font-weight: bold } /* Name.Tag */
+#djDebug .syntax .nv { color: #fb660a } /* Name.Variable */
+#djDebug .syntax .ow { color: #ffffff } /* Operator.Word */
+#djDebug .syntax .w { color: #888888 } /* Text.Whitespace */
+#djDebug .syntax .mf { color: #0086f7; font-weight: bold } /* Literal.Number.Float */
+#djDebug .syntax .mh { color: #0086f7; font-weight: bold } /* Literal.Number.Hex */
+#djDebug .syntax .mi { color: #0086f7; font-weight: bold } /* Literal.Number.Integer */
+#djDebug .syntax .mo { color: #0086f7; font-weight: bold } /* Literal.Number.Oct */
+#djDebug .syntax .sb { color: #0086d2 } /* Literal.String.Backtick */
+#djDebug .syntax .sc { color: #0086d2 } /* Literal.String.Char */
+#djDebug .syntax .sd { color: #0086d2 } /* Literal.String.Doc */
+#djDebug .syntax .s2 { color: #0086d2 } /* Literal.String.Double */
+#djDebug .syntax .se { color: #0086d2 } /* Literal.String.Escape */
+#djDebug .syntax .sh { color: #0086d2 } /* Literal.String.Heredoc */
+#djDebug .syntax .si { color: #0086d2 } /* Literal.String.Interpol */
+#djDebug .syntax .sx { color: #0086d2 } /* Literal.String.Other */
+#djDebug .syntax .sr { color: #0086d2 } /* Literal.String.Regex */
+#djDebug .syntax .s1 { color: #0086d2 } /* Literal.String.Single */
+#djDebug .syntax .ss { color: #0086d2 } /* Literal.String.Symbol */
+#djDebug .syntax .bp { color: #ffffff } /* Name.Builtin.Pseudo */
+#djDebug .syntax .vc { color: #fb660a } /* Name.Variable.Class */
+#djDebug .syntax .vg { color: #fb660a } /* Name.Variable.Global */
+#djDebug .syntax .vi { color: #fb660a } /* Name.Variable.Instance */
+#djDebug .syntax .il { color: #0086f7; font-weight: bold } /* Literal.Number.Integer.Long */
diff --git a/debug_toolbar/panels/sql.py b/debug_toolbar/panels/sql.py
index b99709f..e4e3c02 100644
--- a/debug_toolbar/panels/sql.py
+++ b/debug_toolbar/panels/sql.py
@@ -72,7 +72,7 @@ def reformat_sql(sql):
from pygments import highlight
from pygments.lexers import SqlLexer
from pygments.formatters import HtmlFormatter
- sql = highlight(sql, SqlLexer(), HtmlFormatter(noclasses=True))
+ sql = highlight(sql, SqlLexer(), HtmlFormatter())
except ImportError:
pass
return sql
diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html
index 4663047..0a8a6e0 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/sql.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html
@@ -12,8 +12,8 @@
<tr class="{% cycle 'row1' 'row2' %}">
<td>{{ query.time|floatformat:"4" }}</td>
<td><a class="remoteCall" href="/__debug__/sql_explain/?sql={{ query.raw_sql|urlencode }}&params={{ query.params|urlencode }}&time={{ query.time|floatformat:"4"|urlencode }}">EXPLAIN</a></td>
- <td>{{ query.sql|safe }}</td>
+ <td class="syntax">{{ query.sql|safe }}</td>
</tr>
{% endfor %}
</tbody>
-</table> \ No newline at end of file
+</table>