Skip to content

Commit

Permalink
Add code styles.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjl committed Jan 15, 2010
1 parent d62f88a commit ba7c715
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 2 deletions.
5 changes: 4 additions & 1 deletion content/projects/hg-prompt.html
Expand Up @@ -128,7 +128,7 @@
To put it in your bash prompt, edit your `~/.bashrc` file to include something
like this:

#!bash
:::bash
hg_ps1() {
hg prompt "{ on {branch}}{ at {bookmark}}{status}" 2> /dev/null
}
Expand All @@ -139,11 +139,13 @@
repository or you won't see anything. This little prompt will give you
something like this:

:::text
steve at myhost in ~/src/hg-prompt on default at feature-bookmark?
$

How about something a little more interesting?

:::bash
hg_ps1() {
hg prompt "{[+{incoming|count}]-->}{root|basename}{/{branch}}{-->[+{outgoing|count}]}{ at {bookmark}}{status}" 2> /dev/null
}
Expand All @@ -152,6 +154,7 @@

And the result (this example assumes one incoming changeset and two outgoing):

:::text
[+1]-->hg-prompt/default-->[+2] at feature-bookmark
steve at myhost in ~/src/hg-prompt
$
Expand Down
8 changes: 7 additions & 1 deletion layout/_post.html
@@ -1,5 +1,11 @@
{% extends "skeleton/_base.html" %}

{% block extra_css %}
<link rel="stylesheet"
href="{{ site.url }}/media/css/pygments-monokai-light.css"
type="text/css" media="screen" charset="utf-8" />
{% endblock %}

{% block content %}
<div id="leaf-title">
<h1><a href="{{ page.url }}">{{ page.title|safe|typogrify }}</a></h1>
Expand All @@ -11,7 +17,7 @@ <h1><a href="{{ page.url }}">{{ page.title|safe|typogrify }}</a></h1>
{% filter typogrify %}
{% article %}
{% filter typogrify %}
{% markdown toc def_list %}
{% markdown toc def_list codehilite %}
{% block article %}{% endblock %}
{% endmarkdown %}
{% endfilter %}
Expand Down
60 changes: 60 additions & 0 deletions media/css/pygments-monokai-light.css
@@ -0,0 +1,60 @@
/* @override http://localhost:8080/media/css/pygments-monokai-light.css */
.codehilite .hll { background-color: #49483e }
.codehilite .c { color: #75715e } /* Comment */
.codehilite .err { color: #960050; background-color: #1e0010 } /* Error */
.codehilite .k { color: #00a8c8} /* Keyword */
.codehilite .l { color: #ae81ff } /* Literal */
.codehilite .n { color: #111111 } /* Name */
.codehilite .o { color: #f92672 } /* Operator */
.codehilite .p { color: #111111 } /* Punctuation */
.codehilite .cm { color: #75715e } /* Comment.Multiline */
.codehilite .cp { color: #75715e } /* Comment.Preproc */
.codehilite .c1 { color: #75715e } /* Comment.Single */
.codehilite .cs { color: #75715e } /* Comment.Special */
.codehilite .ge { font-style: italic } /* Generic.Emph */
.codehilite .gs { font-weight: bold } /* Generic.Strong */
.codehilite .kc { color: #00a8c8 } /* Keyword.Constant */
.codehilite .kd { color: #00a8c8 } /* Keyword.Declaration */
.codehilite .kn { color: #f92672 } /* Keyword.Namespace */
.codehilite .kp { color: #00a8c8 } /* Keyword.Pseudo */
.codehilite .kr { color: #00a8c8 } /* Keyword.Reserved */
.codehilite .kt { color: #00a8c8 } /* Keyword.Type */
.codehilite .ld { color: #d88200 } /* Literal.Date */
.codehilite .m { color: #ae81ff } /* Literal.Number */
.codehilite .s { color: #d88200} /* Literal.String */
.codehilite .na { color: #75af00 } /* Name.Attribute */
.codehilite .nb { color: #111111 } /* Name.Builtin */
.codehilite .nc { color: #75af00 } /* Name.Class */
.codehilite .no { color: #00a8c8 } /* Name.Constant */
.codehilite .nd { color: #75af00 } /* Name.Decorator */
.codehilite .ni { color: #111111 } /* Name.Entity */
.codehilite .ne { color: #75af00 } /* Name.Exception */
.codehilite .nf { color: #75af00} /* Name.Function */
.codehilite .nl { color: #111111 } /* Name.Label */
.codehilite .nn { color: #111111} /* Name.Namespace */
.codehilite .nx { color: #75af00 } /* Name.Other */
.codehilite .py { color: #111111 } /* Name.Property */
.codehilite .nt { color: #f92672 } /* Name.Tag */
.codehilite .nv { color: #111111 } /* Name.Variable */
.codehilite .ow { color: #f92672 } /* Operator.Word */
.codehilite .w { color: #111111 } /* Text.Whitespace */
.codehilite .mf { color: #ae81ff } /* Literal.Number.Float */
.codehilite .mh { color: #ae81ff } /* Literal.Number.Hex */
.codehilite .mi { color: #ae81ff } /* Literal.Number.Integer */
.codehilite .mo { color: #ae81ff } /* Literal.Number.Oct */
.codehilite .sb { color: #d88200 } /* Literal.String.Backtick */
.codehilite .sc { color: #d88200 } /* Literal.String.Char */
.codehilite .sd { color: #d88200 } /* Literal.String.Doc */
.codehilite .s2 { color: #d88200 } /* Literal.String.Double */
.codehilite .se { color: #8045FF } /* Literal.String.Escape */
.codehilite .sh { color: #d88200 } /* Literal.String.Heredoc */
.codehilite .si { color: #d88200 } /* Literal.String.Interpol */
.codehilite .sx { color: #d88200 } /* Literal.String.Other */
.codehilite .sr { color: #d88200 } /* Literal.String.Regex */
.codehilite .s1 { color: #d88200 } /* Literal.String.Single */
.codehilite .ss { color: #d88200 } /* Literal.String.Symbol */
.codehilite .bp { color: #111111 } /* Name.Builtin.Pseudo */
.codehilite .vc { color: #111111 } /* Name.Variable.Class */
.codehilite .vg { color: #111111 } /* Name.Variable.Global */
.codehilite .vi { color: #111111 } /* Name.Variable.Instance */
.codehilite .il { color: #ae81ff } /* Literal.Number.Integer.Long */

0 comments on commit ba7c715

Please sign in to comment.