comparison static/css/code/vibrant.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
comparison
equal deleted inserted replaced
101:a8da60d611f7 102:f872c643b056
1 // Modified version of the vibrant pygments stylesheet
2 .highlight &.vibrant {
3 color: @white;
4 background: @almostBlack;
5 .box-shadow(inset 0 0 40px rgba(0, 0, 0, 0.7));
6
7 // Comments
8 .c {
9 color: #3A6EF2;
10 font-style: italic;
11 }
12
13 // Errors
14 .err {
15 color: #A61717;
16 background-color: #E3D2D2;
17 }
18
19 // Keywords
20 .k {
21 color: @white;
22 font-weight: bold;
23 }
24
25 // Operator
26 .o {
27 color: @white;
28 font-weight: bold;
29 }
30
31 // Multi-line comment
32 .cm {
33 color: #3A6EF2;
34 font-style: italic;
35 }
36
37 // Preprocessor comment
38 .cp {
39 color: #3A6EF2;
40 font-weight: bold;
41 }
42
43 // Inline comment
44 .c1 {
45 color: #3A6EF2;
46 font-style: italic;
47 }
48
49 // Special comment
50 .cs {
51 color: #3A6EF2;
52 font-weight: bold;
53 font-style: italic;
54 }
55
56 // Generic deletion
57 .gd {
58 color: @black;
59 background-color: #FFDDDD;
60 }
61
62 // Generic deletion (specific)
63 .gd .x {
64 background-color: #FFAAAA;
65 }
66
67 // Generic emphasis
68 .ge {
69 font-style: italic;
70 }
71
72 // Generic error
73 .gr {
74 color: #AA0000;
75 }
76
77 // Generic heading
78 .gh {
79 color: #999999;
80 }
81
82 // Generic insertion
83 .gi {
84 color: @black;
85 background-color: #DDFFDD;
86 }
87
88 // Generic insertion (specific)
89 .gi .x {
90 background-color: #AAFFAA;
91 }
92
93 // Generic output
94 .go {
95 color: #888;
96 }
97
98 // Generic prompt
99 .gp {
100 color: #555;
101 }
102
103 // Generic strong
104 .gs {
105 font-weight: bold;
106 }
107
108 // Generic subheading
109 .gu {
110 font-weight: #AAA;
111 }
112
113 // Generic traceback
114 .gt {
115 color: #AA0000;
116 }
117
118 // Keyword.Constant
119 .kc {
120 font-weight: bold;
121 }
122
123 // Keyword.Declaration
124 .kd {
125 font-weight: bold;
126 }
127
128 // Keyword.Pseudo
129 .kp {
130 font-weight: bold;
131 }
132
133 // Keyword.Reserved
134 .kr {
135 font-weight: bold;
136 }
137
138 // Keyword.Type
139 .kt {
140 color: #445588;
141 font-weight: bold;
142 }
143
144 // Literal.Number
145 .m {
146 color: #009999;
147 }
148
149 // Literal.String
150 .s {
151 color: #66FF00;
152 }
153
154 // Name.Attribute
155 .na {
156 color: #99CC99;
157 }
158
159 // Name.Builtin
160 .nb {
161 color: #00AA00;
162 }
163
164 // Name.Class
165 .nc {
166 color: @white;
167 font-weight: bold;
168 }
169
170 // Name.Constant
171 .no {
172 color: @white;
173 }
174
175 // Name.Entity
176 .ni {
177 color: #339999;
178 }
179
180 // Name.Exception
181 .ne {
182 color: #FF0000;
183 font-weight: bold;
184 }
185
186 // Name.Function
187 .nf {
188 color: #FFCC00;
189 font-weight: bold;
190 }
191
192 // Name.Namespace
193 .nn {
194 color: #AAA;
195 }
196
197 // Name.Tag
198 .nt {
199 color: #FF6600;
200 }
201
202 // Name.Variable
203 .nv {
204 color: #BBB;
205 }
206
207 // Operator.Word
208 .ow {
209 font-weight: bold;
210 }
211
212 // Text.Whitespace
213 .w {
214 color: #BBB;
215 }
216
217 // Literal.Number.Float
218 .mf {
219 color: #CCFF33;
220 }
221 .mh { color: #CCFF33 } /* Literal.Number.Hex */
222 .mi { color: #CCFF33 } /* Literal.Number.Integer */
223 .mo { color: #CCFF33 } /* Literal.Number.Oct */
224 .sb { background: #CCCC33; color: #000000 } /* Literal.String.Backtick */
225 .sc { color: #66FF00 } /* Literal.String.Char */
226 .sd { color: #66FF00 } /* Literal.String.Doc */
227 .s2 { color: #66FF00 } /* Literal.String.Double */
228 .se { color: #66FF00 } /* Literal.String.Escape */
229 .sh { color: #66FF00 } /* Literal.String.Heredoc */
230 .si { color: #d555555 } /* Literal.String.Interpol */
231 .sx { color: #66FF00 } /* Literal.String.Other */
232 .sr { color: #009926 } /* Literal.String.Regex */
233 .s1 { color: #66FF00 } /* Literal.String.Single */
234 .ss { color: #339999 } /* Literal.String.Symbol */
235 .bp { color: @lightBlue; font-weight: bold; } /* Name.Builtin.Pseudo */
236 .vc { color: #008080 } /* Name.Variable.Class */
237 .vg { color: #008080 } /* Name.Variable.Global */
238 .vi { color: #008080 } /* Name.Variable.Instance */
239 .il { color: #009999 } /* Literal.Number.Integer.Long */
240 }