annotate static/css/code/monokai.less @ 102:f872c643b056

Updates to snippet functionality (see details) Sorry about the large commit, but it was difficult to break it up as a lot of new functionality was introduced. Most of it is specific to the snippet feature but there are some other changes as well. Commit highlights: * Added the ability to switch the syntax highlighting colour scheme when viewing a snippet. This is currently done on a per-snippet basis only, but eventually it will be possible to set a default in your profile to have all the snippets you view use that colour scheme. There are currently 8 different colour schemes, all of which were taken from the default pygments stylesheets (some were modified). * Added a "num_views" field to the Snippet model, with the field being incremented any time the snippet view is called (raw or regular view). * Created a simple "explore" view that lists the recently-posted snippets. Will implement pagination and sorting by other attributes ("popularity", for example, based on number of views) as well. * Added a post-save hook to the User model to ensure that a Profile is created for every user as soon as the User itself is created. This alleviates the need for a get_profile method that checks if the user has a profile or not and creates one if necessary. (The code is currently still there, will be cleaned up soon). * Added back the wordwrap toggling feature. Currently, if you want to enable word-wrapping, the line numbers have to be hidden in order to ensure that the lines and their numbers don't go out of sync. This will be fixed soon. * History/diff view is back * And some other minor cosmetic changes. Note: since some existing models have been changed, you'll likely need to delete the existing sqlite database before running syncdb. The alternative is to determine the necessary column changes/additions and run the SQL query yourself.
author dellsystem <ilostwaldo@gmail.com>
date Fri, 31 Aug 2012 02:53:22 -0400
parents
children 7d753658dc0e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
102
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
1 .highlight &.monokai {
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
2 background: #272822;
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
3 color: #F8F8F2;
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
4
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
5 .hll { background-color: #49483e }
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
6 .c { color: #75715e } /* Comment */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
7 .err { color: #960050; background-color: #1e0010 } /* Error */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
8 .k { color: #66d9ef } /* Keyword */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
9 .l { color: #ae81ff } /* Literal */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
10 .n { color: #f8f8f2 } /* Name */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
11 .o { color: #f92672 } /* Operator */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
12 .p { color: #f8f8f2 } /* Punctuation */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
13 .cm { color: #75715e } /* Comment.Multiline */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
14 .cp { color: #75715e } /* Comment.Preproc */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
15 .c1 { color: #75715e } /* Comment.Single */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
16 .cs { color: #75715e } /* Comment.Special */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
17 .ge { font-style: italic } /* Generic.Emph */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
18 .gs { font-weight: bold } /* Generic.Strong */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
19 .kc { color: #66d9ef } /* Keyword.Constant */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
20 .kd { color: #66d9ef } /* Keyword.Declaration */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
21 .kn { color: #f92672 } /* Keyword.Namespace */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
22 .kp { color: #66d9ef } /* Keyword.Pseudo */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
23 .kr { color: #66d9ef } /* Keyword.Reserved */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
24 .kt { color: #66d9ef } /* Keyword.Type */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
25 .ld { color: #e6db74 } /* Literal.Date */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
26 .m { color: #ae81ff } /* Literal.Number */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
27 .s { color: #e6db74 } /* Literal.String */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
28 .na { color: #a6e22e } /* Name.Attribute */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
29 .nb { color: #f8f8f2 } /* Name.Builtin */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
30 .nc { color: #a6e22e } /* Name.Class */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
31 .no { color: #66d9ef } /* Name.Constant */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
32 .nd { color: #a6e22e } /* Name.Decorator */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
33 .ni { color: #f8f8f2 } /* Name.Entity */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
34 .ne { color: #a6e22e } /* Name.Exception */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
35 .nf { color: #a6e22e } /* Name.Function */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
36 .nl { color: #f8f8f2 } /* Name.Label */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
37 .nn { color: #f8f8f2 } /* Name.Namespace */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
38 .nx { color: #a6e22e } /* Name.Other */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
39 .py { color: #f8f8f2 } /* Name.Property */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
40 .nt { color: #f92672 } /* Name.Tag */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
41 .nv { color: #f8f8f2 } /* Name.Variable */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
42 .ow { color: #f92672 } /* Operator.Word */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
43 .w { color: #f8f8f2 } /* Text.Whitespace */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
44 .mf { color: #ae81ff } /* Literal.Number.Float */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
45 .mh { color: #ae81ff } /* Literal.Number.Hex */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
46 .mi { color: #ae81ff } /* Literal.Number.Integer */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
47 .mo { color: #ae81ff } /* Literal.Number.Oct */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
48 .sb { color: #e6db74 } /* Literal.String.Backtick */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
49 .sc { color: #e6db74 } /* Literal.String.Char */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
50 .sd { color: #e6db74 } /* Literal.String.Doc */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
51 .s2 { color: #e6db74 } /* Literal.String.Double */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
52 .se { color: #ae81ff } /* Literal.String.Escape */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
53 .sh { color: #e6db74 } /* Literal.String.Heredoc */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
54 .si { color: #e6db74 } /* Literal.String.Interpol */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
55 .sx { color: #e6db74 } /* Literal.String.Other */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
56 .sr { color: #e6db74 } /* Literal.String.Regex */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
57 .s1 { color: #e6db74 } /* Literal.String.Single */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
58 .ss { color: #e6db74 } /* Literal.String.Symbol */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
59 .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
60 .vc { color: #f8f8f2 } /* Name.Variable.Class */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
61 .vg { color: #f8f8f2 } /* Name.Variable.Global */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
62 .vi { color: #f8f8f2 } /* Name.Variable.Instance */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
63 .il { color: #ae81ff } /* Literal.Number.Integer.Long */
f872c643b056 Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
64 }