Mercurial > agora-palash
diff static/css/code/tango.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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/static/css/code/tango.less Fri Aug 31 02:53:22 2012 -0400 @@ -0,0 +1,71 @@ +.highlight &.tango { + .hll { background-color: #ffffcc } + .c { color: #8f5902; font-style: italic } /* Comment */ + .err { color: #a40000; border: 1px solid #ef2929 } /* Error */ + .g { color: #000000 } /* Generic */ + .k { color: #204a87; font-weight: bold } /* Keyword */ + .l { color: #000000 } /* Literal */ + .n { color: #000000 } /* Name */ + .o { color: #ce5c00; font-weight: bold } /* Operator */ + .x { color: #000000 } /* Other */ + .p { color: #000000; font-weight: bold } /* Punctuation */ + .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */ + .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */ + .c1 { color: #8f5902; font-style: italic } /* Comment.Single */ + .cs { color: #8f5902; font-style: italic } /* Comment.Special */ + .gd { color: #a40000 } /* Generic.Deleted */ + .ge { color: #000000; font-style: italic } /* Generic.Emph */ + .gr { color: #ef2929 } /* Generic.Error */ + .gh { color: #000080; font-weight: bold } /* Generic.Heading */ + .gi { color: #00A000 } /* Generic.Inserted */ + .go { color: #000000; font-style: italic } /* Generic.Output */ + .gp { color: #8f5902 } /* Generic.Prompt */ + .gs { color: #000000; font-weight: bold } /* Generic.Strong */ + .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ + .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */ + .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */ + .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */ + .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */ + .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */ + .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */ + .kt { color: #204a87; font-weight: bold } /* Keyword.Type */ + .ld { color: #000000 } /* Literal.Date */ + .m { color: #0000cf; font-weight: bold } /* Literal.Number */ + .s { color: #4e9a06 } /* Literal.String */ + .na { color: #c4a000 } /* Name.Attribute */ + .nb { color: #204a87 } /* Name.Builtin */ + .nc { color: #000000 } /* Name.Class */ + .no { color: #000000 } /* Name.Constant */ + .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */ + .ni { color: #ce5c00 } /* Name.Entity */ + .ne { color: #cc0000; font-weight: bold } /* Name.Exception */ + .nf { color: #000000 } /* Name.Function */ + .nl { color: #f57900 } /* Name.Label */ + .nn { color: #000000 } /* Name.Namespace */ + .nx { color: #000000 } /* Name.Other */ + .py { color: #000000 } /* Name.Property */ + .nt { color: #204a87; font-weight: bold } /* Name.Tag */ + .nv { color: #000000 } /* Name.Variable */ + .ow { color: #204a87; font-weight: bold } /* Operator.Word */ + .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */ + .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */ + .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */ + .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */ + .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */ + .sb { color: #4e9a06 } /* Literal.String.Backtick */ + .sc { color: #4e9a06 } /* Literal.String.Char */ + .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */ + .s2 { color: #4e9a06 } /* Literal.String.Double */ + .se { color: #4e9a06 } /* Literal.String.Escape */ + .sh { color: #4e9a06 } /* Literal.String.Heredoc */ + .si { color: #4e9a06 } /* Literal.String.Interpol */ + .sx { color: #4e9a06 } /* Literal.String.Other */ + .sr { color: #4e9a06 } /* Literal.String.Regex */ + .s1 { color: #4e9a06 } /* Literal.String.Single */ + .ss { color: #4e9a06 } /* Literal.String.Symbol */ + .bp { color: #3465a4 } /* Name.Builtin.Pseudo */ + .vc { color: #000000 } /* Name.Variable.Class */ + .vg { color: #000000 } /* Name.Variable.Global */ + .vi { color: #000000 } /* Name.Variable.Instance */ + .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */ +}