Skip to content
Browse files

lotsa work

  • Loading branch information...
1 parent e5afbfe commit a040186d8959a422bf7a7df94a3123eba54a32ff @yanick committed
Showing with 8,826 additions and 152 deletions.
  1. +2 −0 Makefile.PL
  2. +13 −0 TODO
  3. +34 −6 galuga.conf
  4. +3 −0 lib/Galuga.pm
  5. +44 −0 lib/Galuga/Controller/CSS.pm
  6. +55 −5 lib/Galuga/Controller/Entry.pm
  7. +59 −2 lib/Galuga/Controller/Root.pm
  8. +22 −23 lib/Galuga/Controller/Tag.pm
  9. +7 −5 lib/Galuga/Schema/Result/Entries.pm
  10. +0 −51 root/autohandler
  11. +22 −4 root/{static → css}/galuga.css
  12. +17 −0 root/entries.mason
  13. +30 −0 root/entry/disqus.mason
  14. +35 −19 root/entry/index.mason
  15. +22 −22 root/page.mason
  16. +7 −0 root/right_column.mason
  17. BIN root/static/favicon.png
  18. +165 −0 root/static/syntax_highlight/LGPL-LICENSE
  19. +20 −0 root/static/syntax_highlight/MIT-LICENSE
  20. +120 −0 root/static/syntax_highlight/compass/_theme_template.scss
  21. +14 −0 root/static/syntax_highlight/compass/config.rb
  22. +216 −0 root/static/syntax_highlight/compass/shCore.scss
  23. +2 −0 root/static/syntax_highlight/compass/shCoreDefault.scss
  24. +2 −0 root/static/syntax_highlight/compass/shCoreDjango.scss
  25. +2 −0 root/static/syntax_highlight/compass/shCoreEclipse.scss
  26. +2 −0 root/static/syntax_highlight/compass/shCoreEmacs.scss
  27. +2 −0 root/static/syntax_highlight/compass/shCoreFadeToGrey.scss
  28. +2 −0 root/static/syntax_highlight/compass/shCoreMDUltra.scss
  29. +2 −0 root/static/syntax_highlight/compass/shCoreMidnight.scss
  30. +2 −0 root/static/syntax_highlight/compass/shCoreRDark.scss
  31. +7 −0 root/static/syntax_highlight/compass/shThemeDefault.scss
  32. +36 −0 root/static/syntax_highlight/compass/shThemeDjango.scss
  33. +48 −0 root/static/syntax_highlight/compass/shThemeEclipse.scss
  34. +32 −0 root/static/syntax_highlight/compass/shThemeEmacs.scss
  35. +36 −0 root/static/syntax_highlight/compass/shThemeFadeToGrey.scss
  36. +32 −0 root/static/syntax_highlight/compass/shThemeMDUltra.scss
  37. +32 −0 root/static/syntax_highlight/compass/shThemeMidnight.scss
  38. +32 −0 root/static/syntax_highlight/compass/shThemeRDark.scss
  39. +17 −0 root/static/syntax_highlight/scripts/shAutoloader.js
  40. +59 −0 root/static/syntax_highlight/scripts/shBrushAS3.js
  41. +75 −0 root/static/syntax_highlight/scripts/shBrushAppleScript.js
  42. +59 −0 root/static/syntax_highlight/scripts/shBrushBash.js
  43. +65 −0 root/static/syntax_highlight/scripts/shBrushCSharp.js
  44. +100 −0 root/static/syntax_highlight/scripts/shBrushColdFusion.js
  45. +97 −0 root/static/syntax_highlight/scripts/shBrushCpp.js
  46. +91 −0 root/static/syntax_highlight/scripts/shBrushCss.js
  47. +55 −0 root/static/syntax_highlight/scripts/shBrushDelphi.js
  48. +41 −0 root/static/syntax_highlight/scripts/shBrushDiff.js
  49. +52 −0 root/static/syntax_highlight/scripts/shBrushErlang.js
  50. +67 −0 root/static/syntax_highlight/scripts/shBrushGroovy.js
  51. +52 −0 root/static/syntax_highlight/scripts/shBrushJScript.js
  52. +57 −0 root/static/syntax_highlight/scripts/shBrushJava.js
  53. +58 −0 root/static/syntax_highlight/scripts/shBrushJavaFX.js
  54. +72 −0 root/static/syntax_highlight/scripts/shBrushPerl.js
  55. +88 −0 root/static/syntax_highlight/scripts/shBrushPhp.js
  56. +33 −0 root/static/syntax_highlight/scripts/shBrushPlain.js
  57. +74 −0 root/static/syntax_highlight/scripts/shBrushPowerShell.js
  58. +64 −0 root/static/syntax_highlight/scripts/shBrushPython.js
  59. +55 −0 root/static/syntax_highlight/scripts/shBrushRuby.js
  60. +94 −0 root/static/syntax_highlight/scripts/shBrushSass.js
  61. +51 −0 root/static/syntax_highlight/scripts/shBrushScala.js
  62. +66 −0 root/static/syntax_highlight/scripts/shBrushSql.js
  63. +56 −0 root/static/syntax_highlight/scripts/shBrushVb.js
  64. +69 −0 root/static/syntax_highlight/scripts/shBrushXml.js
  65. +17 −0 root/static/syntax_highlight/scripts/shCore.js
  66. +17 −0 root/static/syntax_highlight/scripts/shLegacy.js
  67. +130 −0 root/static/syntax_highlight/src/shAutoloader.js
  68. +1,721 −0 root/static/syntax_highlight/src/shCore.js
  69. +157 −0 root/static/syntax_highlight/src/shLegacy.js
  70. +226 −0 root/static/syntax_highlight/styles/shCore.css
  71. +328 −0 root/static/syntax_highlight/styles/shCoreDefault.css
  72. +331 −0 root/static/syntax_highlight/styles/shCoreDjango.css
  73. +339 −0 root/static/syntax_highlight/styles/shCoreEclipse.css
  74. +324 −0 root/static/syntax_highlight/styles/shCoreEmacs.css
  75. +328 −0 root/static/syntax_highlight/styles/shCoreFadeToGrey.css
  76. +324 −0 root/static/syntax_highlight/styles/shCoreMDUltra.css
  77. +324 −0 root/static/syntax_highlight/styles/shCoreMidnight.css
  78. +324 −0 root/static/syntax_highlight/styles/shCoreRDark.css
  79. +117 −0 root/static/syntax_highlight/styles/shThemeDefault.css
  80. +120 −0 root/static/syntax_highlight/styles/shThemeDjango.css
  81. +128 −0 root/static/syntax_highlight/styles/shThemeEclipse.css
  82. +113 −0 root/static/syntax_highlight/styles/shThemeEmacs.css
  83. +117 −0 root/static/syntax_highlight/styles/shThemeFadeToGrey.css
  84. +113 −0 root/static/syntax_highlight/styles/shThemeMDUltra.css
  85. +113 −0 root/static/syntax_highlight/styles/shThemeMidnight.css
  86. +113 −0 root/static/syntax_highlight/styles/shThemeRDark.css
  87. +22 −0 root/syntax_highlight.mason
  88. +6 −2 root/tag/index.mason
  89. +13 −0 root/widgets/cpan_author.mason
  90. +5 −1 root/widgets/recent_entries.mason
  91. +12 −0 root/widgets/tags.mason
  92. +31 −0 root/widgets/twitter.mason
  93. +52 −9 script/populate_blog.pl
  94. +7 −3 t/controller_Entry.t
  95. +9 −0 t/controller_css.t
View
2 Makefile.PL
@@ -9,6 +9,8 @@ use Module::Install::Catalyst; # Complain loudly if you don't have
name 'Galuga';
all_from 'lib/Galuga.pm';
+requires 'DateTime::Format::SQLite';
+requires 'DateTime::Format::DateParse';
requires 'Catalyst::Runtime' => '5.80022';
requires 'Catalyst::Plugin::ConfigLoader';
requires 'Catalyst::Plugin::Static::Simple';
View
13 TODO
@@ -0,0 +1,13 @@
+* See all entries
+* Tag cloud
+* attachments to entries
+* add filters to entries
+* put entry template
+* related tags in tag page
+* export as ebook?
+* Art Nouveau fonts
+* widgets
+ CPAN modules
+ Ohloh stack
+ Twitter
+ Github
View
40 galuga.conf
@@ -5,14 +5,42 @@ tagline Hacker, hacker coding bright.
db dbi:SQLite:dbname=/home/yanick/work/perl-modules/Galuga/db.sqlite
+blog_root __HOME__/blog_entries
+
+blog_url http://babyl.dyndns.or/techblog
+
+blog_author yanick@babyl.dyndns.org (Yanick Champoux)
+
<View::Mason>
template_extension .mason
</View::Mason>
- <Model::DB>
- <connect_info>
- dsn dbi:SQLite:dbname=/home/yanick/work/perl-modules/Galuga/db.sqlite
- </connect_info>
- user_defined_schema_accessor foo
- </Model::DB>
+<Model::DB>
+ <connect_info>
+ dsn dbi:SQLite:dbname=/home/yanick/work/perl-modules/Galuga/db.sqlite
+ </connect_info>
+ user_defined_schema_accessor foo
+</Model::DB>
+
+<widgets>
+<cpan_author>
+ dist XML::XSS
+ dist XML::XPathScript
+ dist Dancer::Template::Mason
+ dist Dist::Release
+ dist Games::Perlwar
+ dist Git::CPAN::Patch
+ dist GitStore
+ dist Language::l33t
+ dist NetPacket
+ dist Pod::Manual
+ dist Task::BeLike::YANICK
+ dist Test::Pod::Snippets
+ dist Test::Wrapper
+ dist WWW::Ohloh
+</cpan_author>
+<twitter>
+ username yenzie
+</twitter>
+</widgets>
View
3 lib/Galuga.pm
@@ -37,6 +37,9 @@ __PACKAGE__->config(
# Disable deprecated behavior needed by old applications
disable_component_resolution_regex_fallback => 1,
default_view => 'Mason',
+ static => {
+ ignore_dirs => [ 'css' ],
+ },
);
# Start the application
View
44 lib/Galuga/Controller/CSS.pm
@@ -0,0 +1,44 @@
+package Galuga::Controller::CSS;
+use Moose;
+use namespace::autoclean;
+
+BEGIN {extends 'Catalyst::Controller'; }
+
+=head1 NAME
+
+Galuga::Controller::css - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 index
+
+=cut
+
+sub general_style :Path('galuga.css') :Args(0) {
+ my ( $self, $c ) = @_;
+
+ $c->stash->{template} = 'css/galuga.css';
+}
+
+
+=head1 AUTHOR
+
+Yanick Champoux,,,
+
+=head1 LICENSE
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+__PACKAGE__->meta->make_immutable;
+
+1;
View
60 lib/Galuga/Controller/Entry.pm
@@ -2,6 +2,8 @@ package Galuga::Controller::Entry;
use Moose;
use namespace::autoclean;
+use List::MoreUtils qw/ uniq /;
+
BEGIN {extends 'Catalyst::Controller'; }
=head1 NAME
@@ -21,17 +23,65 @@ Catalyst Controller.
=cut
-sub index :Path :Args(1) {
+sub base :Chained('') :PathPart( 'entry' ) :CaptureArgs(1) {
my ( $self, $c, $url ) = @_;
my $rs = $c->model('DB::Entries')->find({ url => $url }) or die;
-
$c->stash->{entry} = $rs;
- my $module = 'Galuga::Format::' . $rs->format;
- eval "use $module";
+ $c->stash->{url} = $url;
+}
+
+sub files :Chained('base') :PathPart( 'files' ) :Args(1) {
+ my ( $self, $c, $filename ) = @_;
+
+ $c->serve_static_file(
+ join '/',
+ $c->config->{blog_root},
+ $c->stash->{entry}->path,
+ 'files',
+ $filename
+ );
+}
+
+
+sub index :Chained('base') :PathPart('') :Args(0) {
+ my ( $self, $c ) = @_;
+
+ my $url = $c->stash->{url};
+
+ my $tags = $c->model('DB::Tags')->search({}, {
+ group_by => 'tag',
+ select => [
+ 'tag',
+ { count => 'entry_path' }
+ ],
+ as => [ qw/ tag nbr_entries / ],
+ } );
+
+ $c->stash->{tags} = [ $tags->all ];
+
+
+ my $rs = $c->stash->{entry};
+
+ my $body = $rs->body;
+
+ # __ENTRY_DIR__
+ $body =~ s#__ENTRY_DIR__# $c->uri_for( "/entry/$url/files" ) #eg;
+
+ my @syntax;
+ while ( $body =~ m#<pre \s+ code=(['"])(.*?)\1#xg ) {
+ push @syntax, $2;
+ }
+
+ while ( $body =~ m#<pre \s+ class=(['"])brush:\s+(.*?);?\1#xg ) {
+ push @syntax, $2;
+ }
+
+ $c->stash->{syntax_highlight} = [ uniq @syntax ];
+
+ $c->stash->{body} = $body;
- $c->stash->{body} = $module->render( $rs->body );
}
View
61 lib/Galuga/Controller/Root.pm
@@ -2,6 +2,9 @@ package Galuga::Controller::Root;
use Moose;
use namespace::autoclean;
+use XML::Feed;
+use XML::Atom::SimpleFeed;
+
BEGIN { extends 'Catalyst::Controller' }
#
@@ -26,11 +29,65 @@ The root page (/)
=cut
+sub entries :Path( 'entries' ) :Args(0) {
+ my ( $self, $c ) = @_;
+
+
+ my $tags = $c->model('DB::Tags')->search({}, {
+ group_by => 'tag',
+ select => [
+ 'tag',
+ { count => 'entry_path' }
+ ],
+ as => [ qw/ tag nbr_entries / ],
+ } );
+
+ $c->stash->{tags} = [ $tags->all ];
+ # the whole she-bang
+
+ $c->stash->{entries} = [ $c->model('DB::Entries')->search({},{order_by=>{
+ '-desc' => 'created' } } )->all ];
+}
+
sub index :Path :Args(0) {
my ( $self, $c ) = @_;
- # Hello World
- $c->response->body( $c->welcome_message );
+ my $entry = $c->model('DB::Entries')->search({},
+ { order_by => { '-desc' => 'created' }, limit => 1 }
+ );
+
+ $c->go( '/entry/index', [ $entry->next->url ] );
+}
+
+sub feed :Path('atom.xml') :Args(0) {
+ my ( $self, $c ) = @_;
+
+ # get the last 10 entries and wrap'em
+ my @entries = $c->model('DB::Entries')->search({},
+ { order_by => { '-desc' => 'created' }, limit => 10 }
+ );
+
+ my $feed = XML::Atom::SimpleFeed->new(
+ title => $c->config->{blog_url},
+ link => $c->config->{blog_url},
+ updated => $entries[0]->created->iso8601,
+ author => $c->config->{blog_author},
+ );
+
+ for ( @entries ) {
+ $feed->add_entry(
+ title => $_->title,
+ link => $c->uri_for( '/entry', $_->url ),
+ content => {
+ type => 'xhtml',
+ content => $_->body,
+ },
+ updated => $_->created->iso8601,
+ );
+ }
+
+ $c->res->content_type( 'application/atom+xml' );
+ $c->res->body( $feed->as_string );
}
=head2 default
View
45 lib/Galuga/Controller/Tag.pm
@@ -2,7 +2,7 @@ package Galuga::Controller::Tag;
use Moose;
use namespace::autoclean;
-BEGIN {extends 'Catalyst::Controller'; }
+BEGIN { extends 'Catalyst::Controller'; }
=head1 NAME
@@ -16,48 +16,47 @@ Catalyst Controller.
=cut
-
=head2 index
=cut
-sub index :Path :Args {
+sub index : Path : Args {
my ( $self, $c, @tags ) = @_;
- $c->log->debug( "filtering out tags: @tags" );
+ $c->log->debug("filtering out tags: @tags");
- return unless @tags;
-
-
- my $tags = $c->model('DB::Tags')->search({}, {
- group_by => 'tag',
- select => [
- 'tag',
- { count => 'entry_path' }
- ],
- as => [ qw/ tag nbr_entries / ],
- } );
+ return unless @tags;
- $c->stash->{tags} = [ $tags->all ];
+ my $tags = $c->model('DB::Tags')->search(
+ {},
+ { group_by => 'tag',
+ select => [ 'tag', { count => 'entry_path' } ],
+ as => [qw/ tag nbr_entries /],
+ } );
+ $c->stash->{tags} = [ $tags->all ];
- $c->stash->{selected_tags} = [ @tags ];
+ $c->stash->{selected_tags} = [@tags];
- my @entries = $c->model('DB::Tags')->search({})->get_column('entry_path')->all;
+ my @entries =
+ $c->model('DB::Tags')->search( {} )->get_column('entry_path')->all;
while ( @tags and @entries ) {
- @entries = $c->model('DB::Tags')->search({ tag => shift @tags,
- entry_path => { IN => \@entries
- } })->get_column('entry_path')->all
+ @entries = $c->model('DB::Tags')->search( {
+ tag => shift @tags,
+ entry_path => { IN => \@entries } }
+ )->get_column('entry_path')->all;
}
$c->stash->{entries} = [
- $c->model('DB::Entries')->search({ path => { IN => \@entries } })->all
+ $c->model('DB::Entries')->search(
+ { path => { IN => \@entries } },
+ { order_by => { '-desc' => 'created' } }
+ )->all
];
}
-
=head1 AUTHOR
Yanick Champoux,,,
View
12 lib/Galuga/Schema/Result/Entries.pm
@@ -5,6 +5,8 @@ use warnings;
use base qw/DBIx::Class::Core/;
+__PACKAGE__->load_components(qw/ Core InflateColumn::DateTime/);
+
__PACKAGE__->table( 'Entries' );
__PACKAGE__->add_columns(
@@ -33,11 +35,6 @@ __PACKAGE__->add_columns(
size => 50,
is_nullable => 0,
},
- format => {
- data_type => 'VARCHAR',
- size => 20,
- is_nullable => 0,
- },
body => {
data_type => 'TEXT',
is_nullable => 0,
@@ -50,6 +47,11 @@ __PACKAGE__->add_columns(
data_type => 'DATETIME',
is_nullable => 1,
},
+ original => {
+ data_type => 'VARCHAR',
+ size => 100,
+ is_nullable => 1,
+ },
);
__PACKAGE__->set_primary_key( 'path' );
View
51 root/autohandler
@@ -1,51 +0,0 @@
-<html>
-<head>
-<style>
-<& SELF:css_header &>
-</style>
-</head>
-<body>
-<div class="header">
-<div class="header-inner">
-<h1><% $c->config->{blog_name} %></h1>
-<div><% $c->config->{tagline} %></div>
-</div>
-</div>
-
-% $m->call_next;
-
-</body>
-</hmtl>
-
-<%method css_header>
-div.header {
- width: 100%;
- background: url("<% $c->uri_for( '/static/tyger_header.png' ) %>") no-repeat scroll right bottom #910000;
- height: 122px;
- color: white;
- padding: 1px;
-}
-
-div.header-inner {
- margin-top: 30px;
- margin-left: 20px;
-}
-
-div.header h1 {
- font-family: trebuchet ms;
- font-size: 34px;
- font-weight: bold;
- margin-bottom: 10px;
-}
-
-body {
- font-family: trebuchet ms;
- font: 13px arial,helvetica,sans-serif;
- margin: 0px;
-}
-
-a {
- color: #AB0404;
- outline: medium none;
-}
-</%method>
View
26 root/static/galuga.css → root/css/galuga.css
@@ -1,3 +1,7 @@
+div.vignette {
+ float: right;
+}
+
div.header {
width: 100%;
background: url("<% $c->uri_for( '/static/tyger_header.png' ) %>") no-repeat scroll right bottom #910000;
@@ -22,6 +26,7 @@ body {
font-family: trebuchet ms;
font: 13px arial,helvetica,sans-serif;
margin: 0px;
+ min-width: 1200px;
}
h1 a, h2 a, h3 a {
@@ -43,24 +48,37 @@ div.blog_entry {
div.blog_entry h2 {
border-bottom: solid lightgrey 1px;
+ margin-bottom: 6px;
}
div.blog_entry .tags {
border-top: solid 1px lightgrey;
margin-top: 10px;
padding-top: 3px;
+ clear: both;
}
-div.left_column {
- display: inline-block;
+div.main_body {
+// width: 1200px;
+}
+
+div.left_column, div.right_column {
+ //display: inline-block;
+ float: left;
width: 200px;
vertical-align: top;
margin-left: 20px;
+ padding-top: 25px;
+}
+
+div.left_column {
}
div.middle_column {
- display: inline-block;
- width: 800px;
+ // display: inline-block;
+ float: left;
+ //position: relative;
+ width: 700px;
margin-left: 20px;
margin-right: 20px;
}
View
17 root/entries.mason
@@ -0,0 +1,17 @@
+<%args>
+@entries
+@tags
+</%args>
+
+<&| /page.mason, %ARGS &>
+
+<h2>Blog entries</h2>
+
+<ul>
+% for my $entry ( @entries ) {
+ <li><a href="<% $c->uri_for( '/entry', $entry->url ) %>"><% $entry->title %></a></li>
+% }
+</ul>
+
+
+</&>
View
30 root/entry/disqus.mason
@@ -0,0 +1,30 @@
+<%args>
+$identifier
+</%args>
+
+<div id="disqus_thread"></div>
+<script type="text/javascript">
+ /**
+ * var disqus_identifier; [Optional but recommended: Define a unique identifier (e.g. post id or slug) for this thread]
+ */
+ var disqus_developer = 1;
+% if ( $identifier ) {
+var disqus_identifier = '<% $identifier %>';
+% }
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://hackingthyfearfulsymmetry.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+</script>
+<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript=hackingthyfearfulsymmetry">comments powered by Disqus.</a></noscript>
+<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
+
+<script type="text/javascript">
+var disqus_shortname = 'hackingthyfearfulsymmetry';
+(function () {
+ var s = document.createElement('script'); s.async = true;
+ s.src = 'http://disqus.com/forums/hackingthyfearfulsymmetry/count.js';
+ (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
+}());
+</script>
View
54 root/entry/index.mason
@@ -1,39 +1,55 @@
<%args>
$entry
+@tags
$body
+@syntax_highlight => ()
</%args>
+<&| /page.mason, %ARGS &>
+
<div class="blog_entry">
-<h2><% $entry->title %></h2>
+<h2><a href="<% $c->uri_for( '/entry', $entry->url ) %>"><% $entry->title %></a></h2>
+
+<div class="entry_info">
+% if ( my $original = $entry->original ) {
+% $original =~ /^(.*) - (.*)/;
+originally published at <a href="<% $2 %>"><% $1 %></a>
+%}
+<div style="float: right">
+created: <% $entry->created->strftime("%a, %b %e %Y") %>\
+% if ( $entry->created != $entry->last_updated ) {
+, last updated: <% $entry->last_updated->strftime("%a, %b %e %Y") %>
+% }
+</div>
+</div>
+
+
<% $body %>
+% if ( @syntax_highlight ) {
+<script type="text/javascript">
+ SyntaxHighlighter.all();
+</script>
+% }
+
<& .tags, entry => $entry &>
+
+<& disqus.mason, identifier => $entry->url &>
+
</div>
+</&>
+
+
<%def .tags>
<%args>
$entry
</%args>
<div class="tags">
<b>tags: </b>
-% $m->print( join ', ', sort $entry->tags->get_column( 'tag' )->all );
+% $m->print( join ', ',
+% map { "<a href='" . $c->uri_for( "/tag/$_" ) . "'>$_</a>" }
+% sort $entry->tags->get_column( 'tag' )->all );
</div>
</%def>
-<%method css_header>
-<& PARENT:css_header &>
-div.blog_entry {
- width: 800px;
- margin-left: 200px;
-}
-
-div.blog_entry h2 {
- border-bottom: solid lightgrey 1px;
-}
-
-div.blog_entry .tags {
- border-top: solid 1px lightgrey;
- margin-top: 10px;
- padding-top: 3px;
-}
-</%method>
View
44 root/page.mason
@@ -1,13 +1,27 @@
<%args>
@tags
+@syntax_highlight => ()
</%args>
+% my $content = $m->content;
<html>
<head>
+ <title><% $c->config->{blog_name} %></title>
+ <link rel="shortcut icon" href="<% $c->uri_for( '/static/favicon.png' ) %>" />
-<link rel="stylesheet" type="text/css" href="<% $c->uri_for( '/static/galuga.css' ) %>" />
+ <link rel="alternate"
+ type="application/atom+xml"
+ title="Recent Entries"
+ href="<% $c->uri_for( '/atom.xml' ) %>" />
+
+
+
+<link rel="stylesheet" type="text/css" href="<% $c->uri_for( '/css/galuga.css' ) %>" />
<style>
<& SELF:css_header &>
</style>
+
+<& /syntax_highlight.mason, brushes => \@syntax_highlight &>
+
</head>
<body>
<div class="header">
@@ -16,38 +30,24 @@
<div><% $c->config->{tagline} %></div>
</div>
</div>
-
+<div class="main_body">
<div class="left_column">
-<& .tagsdiv, tags => \@tags &>
+<& /widgets/tags.mason, tags => \@tags &>
<& /widgets/recent_entries.mason &>
</div>
<div class="middle_column">
-<% $m->content %>
+<% $content %>
+</div>
+
+<& right_column.mason &>
+
</div>
</body>
</hmtl>
-
<%method css_header>
-
-
</%method>
-
-<%def .tagsdiv>
-<%args>
-@tags
-</%args>
-<div class="tags_listing">
-<h3>Tags</h3>
-% for my $t ( sort { lc($a->tag) cmp lc($b->tag) } @tags ) {
-<div>
-<a href="<% $c->uri_for( '/tag' ) %>/<% $t->tag | u %>"><% $t->tag %> </a>
-
-<div class="count">(<% $t->get_column('nbr_entries') %>)</div></div>
-% }
-</div>
-</%def>
View
7 root/right_column.mason
@@ -0,0 +1,7 @@
+<div class="right_column">
+
+<& /widgets/cpan_author.mason &>
+
+<& /widgets/twitter.mason &>
+
+</div>
View
BIN root/static/favicon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
165 root/static/syntax_highlight/LGPL-LICENSE
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
View
20 root/static/syntax_highlight/MIT-LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2003, 2004 Jim Weirich
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
120 root/static/syntax_highlight/compass/_theme_template.scss
@@ -0,0 +1,120 @@
+$background: white !default;
+
+$line_alt1_background: $background !default;
+$line_alt2_background: $background !default;
+
+$line_highlighted_background: #e0e0e0 !default;
+$line_highlighted_number: black !default;
+
+$gutter_text: #afafaf !default;
+$gutter_border_color: #6ce26c !default;
+$gutter_border: 3px solid $gutter_border_color !default;
+
+$toolbar_collapsed_a: #00f !default;
+$toolbar_collapsed_a_hover: #f00 !default;
+$toolbar_collapsed_background: #fff !default;
+$toolbar_collapsed_border: 1px solid $gutter_border_color !default;
+
+$toolbar_a: #fff !default;
+$toolbar_a_hover: #000 !default;
+$toolbar_background: $gutter_border_color !default;
+$toolbar_border: none !default;
+
+$code_plain: black !default;
+$code_comments: #008200 !default;
+$code_string: blue !default;
+$code_keyword: #006699 !default;
+$code_preprocessor: gray !default;
+$code_variable: #aa7700 !default;
+$code_value: #009900 !default;
+$code_functions: #ff1493 !default;
+$code_constants: #0066cc !default;
+$code_script: $code_keyword !default;
+$code_script_background: none !default;
+$code_color1: gray !default;
+$code_color2: #ff1493 !default;
+$code_color3: red !default;
+
+$caption_color: $code_plain !default;
+
+// Interface elements.
+.syntaxhighlighter {
+ background-color: $background !important;
+
+ // Highlighed line number
+ .line {
+ &.alt1 { background-color: $line_alt1_background !important; }
+ &.alt2 { background-color: $line_alt2_background !important; }
+
+ // Highlighed line
+ &.highlighted {
+ &.alt1, &.alt2 { background-color: $line_highlighted_background !important; }
+ &.number { color: $line_highlighted_number !important; }
+ }
+ }
+
+ table {
+ caption {
+ color: $caption_color !important;
+ }
+ }
+
+ // Add border to the lines
+ .gutter {
+ color: $gutter_text !important;
+ .line {
+ border-right: $gutter_border !important;
+
+ &.highlighted {
+ background-color: $gutter_border_color !important;
+ color: $background !important;
+ }
+ }
+ }
+
+ &.printing .line .content { border: none !important; }
+
+ &.collapsed {
+ overflow: visible !important;
+
+ .toolbar {
+ color: $toolbar_collapsed_a !important;
+ background: $toolbar_collapsed_background !important;
+ border: $toolbar_collapsed_border !important;
+
+ a {
+ color: $toolbar_collapsed_a !important;
+ &:hover { color: $toolbar_collapsed_a_hover !important; }
+ }
+ }
+ }
+
+ .toolbar {
+ color: $toolbar_a !important;
+ background: $toolbar_background !important;
+ border: $toolbar_border !important;
+ a {
+ color: $toolbar_a !important;
+ &:hover { color: $toolbar_a_hover !important; }
+ }
+ }
+
+ // Actual syntax highlighter colors.
+ .plain, .plain a { color: $code_plain !important; }
+ .comments, .comments a { color: $code_comments !important; }
+ .string, .string a { color: $code_string !important; }
+ .keyword { color: $code_keyword !important; }
+ .preprocessor { color: $code_preprocessor !important; }
+ .variable { color: $code_variable !important; }
+ .value { color: $code_value !important; }
+ .functions { color: $code_functions !important; }
+ .constants { color: $code_constants !important; }
+ .script {
+ font-weight: bold !important;
+ color: $code_script !important;
+ background-color: $code_script_background !important;
+ }
+ .color1, .color1 a { color: $code_color1 !important; }
+ .color2, .color2 a { color: $code_color2 !important; }
+ .color3, .color3 a { color: $code_color3 !important; }
+}
View
14 root/static/syntax_highlight/compass/config.rb
@@ -0,0 +1,14 @@
+environment = :production
+project_type = :stand_alone
+http_path = "/"
+css_dir = "../styles"
+sass_dir = "."
+images_dir = "images"
+sass_options = {
+ :line_numbers => false,
+ :debug_info => false
+}
+
+# output_style = :compressed
+# output_style = :compact
+output_style = :expanded
View
216 root/static/syntax_highlight/compass/shCore.scss
@@ -0,0 +1,216 @@
+@mixin round_corners_custom($top, $right, $bottom, $left) {
+ -moz-border-radius: $top $right $bottom $left !important;
+ -webkit-border-radius: $top $right $bottom $left !important;
+}
+
+@mixin round_corners($radius) {
+ @include round_corners_custom($radius, $radius, $radius, $radius);
+}
+
+.syntaxhighlighter {
+ a,
+ div,
+ code,
+ table,
+ table td,
+ table tr,
+ table tbody,
+ table thead,
+ table caption,
+ textarea {
+ @include round_corners(0);
+
+ background: none !important;
+ border: 0 !important;
+ bottom: auto !important;
+ float: none !important;
+ height: auto !important;
+ left: auto !important;
+ line-height: 1.1em !important;
+ margin: 0 !important;
+ outline: 0 !important;
+ overflow: visible !important;
+ padding: 0 !important;
+ position: static !important;
+ right: auto !important;
+ text-align: left !important;
+ top: auto !important;
+ vertical-align: baseline !important;
+ width: auto !important;
+ box-sizing: content-box !important;
+ font: {
+ family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
+ weight: normal !important;
+ style: normal !important;
+ size: 1em !important;
+ }
+ min: {
+ // For IE8, FF & WebKit
+ height: inherit !important;
+ // For IE7
+ height: auto !important;
+ }
+ }
+}
+
+.syntaxhighlighter {
+ width: 100% !important;
+ margin: 1em 0 1em 0 !important;
+
+ position: relative !important;
+ overflow: auto !important;
+ font-size: 1em !important;
+
+ &.source { overflow: hidden !important; }
+
+ // set up bold and italic
+ .bold { font-weight: bold !important; }
+ .italic { font-style: italic !important; }
+
+ .line { white-space: pre !important; }
+
+ // main table and columns
+ table {
+ width: 100% !important;
+ caption {
+ text-align: left !important;
+ padding: .5em 0 0.5em 1em !important;
+ }
+
+ td.code {
+ width: 100% !important;
+
+ .container {
+ position: relative !important;
+
+ textarea {
+ box-sizing: border-box !important;
+ position: absolute !important;
+ left: 0 !important;
+ top: 0 !important;
+ width: 100% !important;
+ height: 100% !important;
+ border: none !important;
+ background: white !important;
+ padding-left: 1em !important;
+ overflow: hidden !important;
+ white-space: pre !important;
+ }
+ }
+ }
+
+ // middle spacing between line numbers and lines
+ td.gutter .line {
+ text-align: right !important;
+ padding: 0 0.5em 0 1em !important;
+ }
+
+ td.code .line {
+ padding: 0 1em !important;
+ }
+ }
+
+ &.nogutter {
+ td.code {
+ .container textarea, .line { padding-left: 0em !important; }
+ }
+ }
+
+ &.show { display: block !important; }
+
+ // Adjust some properties when collapsed
+ &.collapsed {
+ table { display: none !important; }
+
+ .toolbar {
+ padding: 0.1em 0.8em 0em 0.8em !important;
+ font-size: 1em !important;
+ position: static !important;
+ width: auto !important;
+ height: auto !important;
+
+ span {
+ display: inline !important;
+ margin-right: 1em !important;
+
+ a {
+ padding: 0 !important;
+ display: none !important;
+ &.expandSource { display: inline !important; }
+ }
+ }
+ }
+ }
+
+ // Styles for the toolbar
+ .toolbar {
+ position: absolute !important;
+ right: 1px !important;
+ top: 1px !important;
+ width: 11px !important;
+ height: 11px !important;
+ font-size: 10px !important;
+ z-index: 10 !important;
+
+ span.title { display: inline !important; }
+
+ a {
+ display: block !important;
+ text-align: center !important;
+ text-decoration: none !important;
+ padding-top: 1px !important;
+
+ &.expandSource { display: none !important; }
+ }
+ }
+
+ &.ie {
+ font-size: .9em !important;
+ padding: 1px 0 1px 0 !important;
+
+ .toolbar {
+ line-height: 8px !important;
+ a {
+ padding-top: 0px !important;
+ }
+ }
+ }
+
+ // Print view.
+ // Colors are based on the default theme without background.
+ &.printing {
+ .line.alt1 .content,
+ .line.alt2 .content,
+ .line.highlighted .number,
+ .line.highlighted.alt1 .content,
+ .line.highlighted.alt2 .content { background: none !important; }
+
+ // Gutter line numbers
+ .line {
+ .number { color: #bbbbbb !important; }
+ // Add border to the lines
+ .content { color: black !important; }
+ }
+
+ // Toolbar when visible
+ .toolbar { display: none !important; }
+ a { text-decoration: none !important; }
+ .plain, .plain a { color: black !important; }
+ .comments, .comments a { color: #008200 !important; }
+ .string, .string a { color: blue !important; }
+ .keyword {
+ color: #006699 !important;
+ font-weight: bold !important;
+ }
+ .preprocessor { color: gray !important; }
+ .variable { color: #aa7700 !important; }
+ .value { color: #009900 !important; }
+ .functions { color: #ff1493 !important; }
+ .constants { color: #0066cc !important; }
+ .script { font-weight: bold !important; }
+ .color1, .color1 a { color: gray !important; }
+ .color2, .color2 a { color: #ff1493 !important; }
+ .color3, .color3 a { color: red !important; }
+ .break, .break a { color: black !important; }
+ }
+}
View
2 root/static/syntax_highlight/compass/shCoreDefault.scss
@@ -0,0 +1,2 @@
+@import "shCore.scss";
+@import "shThemeDefault.scss";
View
2 root/static/syntax_highlight/compass/shCoreDjango.scss
@@ -0,0 +1,2 @@
+@import "shCore.scss";
+@import "shThemeDjango.scss";
View
2 root/static/syntax_highlight/compass/shCoreEclipse.scss
@@ -0,0 +1,2 @@
+@import "shCore.scss";
+@import "shThemeEclipse.scss";
View
2 root/static/syntax_highlight/compass/shCoreEmacs.scss
@@ -0,0 +1,2 @@
+@import "shCore.scss";
+@import "shThemeEmacs.scss";
View
2 root/static/syntax_highlight/compass/shCoreFadeToGrey.scss
@@ -0,0 +1,2 @@
+@import "shCore.scss";
+@import "shThemeFadeToGrey.scss";
View
2 root/static/syntax_highlight/compass/shCoreMDUltra.scss
@@ -0,0 +1,2 @@
+@import "shCore.scss";
+@import "shThemeMDUltra.scss";
View
2 root/static/syntax_highlight/compass/shCoreMidnight.scss
@@ -0,0 +1,2 @@
+@import "shCore.scss";
+@import "shThemeMidnight.scss";
View
2 root/static/syntax_highlight/compass/shCoreRDark.scss
@@ -0,0 +1,2 @@
+@import "shCore.scss";
+@import "shThemeRDark.scss";
View
7 root/static/syntax_highlight/compass/shThemeDefault.scss
@@ -0,0 +1,7 @@
+// Default Syntax Highlighter theme.
+
+@import "_theme_template.scss";
+
+.syntaxhighlighter {
+ .keyword { font-weight: bold !important; }
+}
View
36 root/static/syntax_highlight/compass/shThemeDjango.scss
@@ -0,0 +1,36 @@
+// Django SyntaxHighlighter theme
+
+$background: #0a2b1d !default;
+
+$line_highlighted_background: #233729 !default;
+$line_highlighted_number: white !default;
+
+$gutter_text: #497958 !default;
+$gutter_border_color: #41a83e !default;
+
+$toolbar_collapsed_a: #96dd3b !default;
+$toolbar_collapsed_a_hover: #fff !default;
+$toolbar_collapsed_background: #000 !default;
+
+$toolbar_a: #fff !default;
+$toolbar_a_hover: #ffe862 !default;
+
+$code_plain: #f8f8f8 !default;
+$code_comments: #336442 !default;
+$code_string: #9df39f !default;
+$code_keyword: #96dd3b !default;
+$code_preprocessor: #91bb9e !default;
+$code_variable: #ffaa3e !default;
+$code_value: #f7e741 !default;
+$code_functions: #ffaa3e !default;
+$code_constants: #e0e8ff !default;
+$code_color1: #eb939a !default;
+$code_color2: #91bb9e !default;
+$code_color3: #edef7d !default;
+
+@import "_theme_template.scss";
+
+.syntaxhighlighter {
+ .comments { font-style: italic !important; }
+ .keyword { font-weight: bold !important; }
+}
View
48 root/static/syntax_highlight/compass/shThemeEclipse.scss
@@ -0,0 +1,48 @@
+// Eclipse IDE SyntaxHighlighter color theme
+// (C) Code-House
+// :http//blog.code-house.org/2009/10/xml-i-adnotacje-kod-ogolnego-przeznaczenia-i-jpa/
+
+$background: #fff !default;
+
+$line_highlighted_background: #c3defe !default;
+$line_highlighted_number: #fff !default;
+
+$gutter_text: #787878 !default;
+$gutter_border_color: #d4d0c8 !default;
+
+$toolbar_collapsed_a: #3f5fbf !default;
+$toolbar_collapsed_a_hover: #aa7700 !default;
+$toolbar_collapsed_background: #fff !default;
+
+$toolbar_a: #a0a0a0 !default;
+$toolbar_a_hover: red !default;
+
+$code_plain: black !default;
+$code_comments: #3f5fbf !default;
+$code_string: #2a00ff !default;
+$code_keyword: #7f0055 !default;
+$code_preprocessor: #646464 !default;
+$code_variable: #aa7700 !default;
+$code_value: #009900 !default;
+$code_functions: #ff1493 !default;
+$code_constants: #0066cc !default;
+$code_color1: gray !default;
+$code_color2: #ff1493 !default;
+$code_color3: red !default;
+
+@import "_theme_template.scss";
+
+.syntaxhighlighter {
+ .keyword { font-weight: bold !important; }
+
+ .xml {
+ .keyword {
+ color: #3f7f7f !important;
+ font-weight: normal !important; }
+ .color1, .color1 a { color: #7f007f !important; }
+ .string {
+ font-style: italic !important;
+ color: #2a00ff !important;
+ }
+ }
+}
View
32 root/static/syntax_highlight/compass/shThemeEmacs.scss
@@ -0,0 +1,32 @@
+// Emacs SyntaxHighlighter theme based on theme by Joshua Emmons
+// http://www.skia.net/
+
+$background: black !default;
+
+$line_highlighted_background: #2A3133 !default;
+$line_highlighted_number: white !default;
+
+$gutter_text: #d3d3d3 !default;
+$gutter_border_color: #990000 !default;
+
+$toolbar_collapsed_a: #ebdb8d !default;
+$toolbar_collapsed_a_hover: #ff7d27 !default;
+$toolbar_collapsed_background: black !default;
+
+$toolbar_a: #fff !default;
+$toolbar_a_hover: #9ccff4 !default;
+
+$code_plain: #d3d3d3 !default;
+$code_comments: #ff7d27 !default;
+$code_string: #ff9e7b !default;
+$code_keyword: aqua !default;
+$code_preprocessor: #aec4de !default;
+$code_variable: #ffaa3e !default;
+$code_value: #009900 !default;
+$code_functions: #81cef9 !default;
+$code_constants: #ff9e7b !default;
+$code_color1: #ebdb8d !default;
+$code_color2: #ff7d27 !default;
+$code_color3: #aec4de !default;
+
+@import "_theme_template.scss";
View
36 root/static/syntax_highlight/compass/shThemeFadeToGrey.scss
@@ -0,0 +1,36 @@
+// Fade to Grey SyntaxHighlighter theme based on theme by Brasten Sager
+// :http//www.ibrasten.com/
+
+$background: #121212 !default;
+
+$line_highlighted_background: #2C2C29 !default;
+$line_highlighted_number: white !default;
+
+$gutter_text: #afafaf !default;
+$gutter_border_color: #3185b9 !default;
+
+$toolbar_collapsed_a: #3185b9 !default;
+$toolbar_collapsed_a_hover: #d01d33 !default;
+$toolbar_collapsed_background: black !default;
+
+$toolbar_a: #fff !default;
+$toolbar_a_hover: #96daff !default;
+
+$code_plain: white !default;
+$code_comments: #696854 !default;
+$code_string: #e3e658 !default;
+$code_keyword: #d01d33 !default;
+$code_preprocessor: #435a5f !default;
+$code_variable: #898989 !default;
+$code_value: #009900 !default;
+$code_functions: #aaaaaa !default;
+$code_constants: #96daff !default;
+$code_color1: #ffc074 !default;
+$code_color2: #4a8cdb !default;
+$code_color3: #96daff !default;
+
+@import "_theme_template.scss";
+
+.syntaxhighlighter {
+ .functions { font-weight: bold !important; }
+}
View
32 root/static/syntax_highlight/compass/shThemeMDUltra.scss
@@ -0,0 +1,32 @@
+// MDUltra SyntaxHighlighter theme based on Midnight Theme
+// http://www.mddev.co.uk/
+
+$background: #222222 !default;
+
+$line_highlighted_background: #253e5a !default;
+$line_highlighted_number: white !default;
+
+$gutter_text: #38566f !default;
+$gutter_border_color: #435a5f !default;
+
+$toolbar_collapsed_a: #428bdd !default;
+$toolbar_collapsed_a_hover: lime !default;
+$toolbar_collapsed_background: black !default;
+
+$toolbar_a: #aaaaff !default;
+$toolbar_a_hover: #9ccff4 !default;
+
+$code_plain: lime !default;
+$code_comments: #428bdd !default;
+$code_string: lime !default;
+$code_keyword: #aaaaff !default;
+$code_preprocessor: #8aa6c1 !default;
+$code_variable: aqua !default;
+$code_value: #f7e741 !default;
+$code_functions: #ff8000 !default;
+$code_constants: yellow !default;
+$code_color1: red !default;
+$code_color2: yellow !default;
+$code_color3: #ffaa3e !default;
+
+@import "_theme_template.scss";
View
32 root/static/syntax_highlight/compass/shThemeMidnight.scss
@@ -0,0 +1,32 @@
+// Midnight SyntaxHighlighter theme based on theme by J.D. Myers
+// http://webdesign.lsnjd.com/
+
+$background: #0f192a !default;
+
+$line_highlighted_background: #253e5a !default;
+$line_highlighted_number: #38566f !default;
+
+$gutter_text: #afafaf !default;
+$gutter_border_color: #435a5f !default;
+
+$toolbar_collapsed_a: #428bdd !default;
+$toolbar_collapsed_a_hover: #1dc116 !default;
+$toolbar_collapsed_background: #000 !default;
+
+$toolbar_a: #D1EDFF !default;
+$toolbar_a_hover: #8aa6c1 !default;
+
+$code_plain: #d1edff !default;
+$code_comments: #428bdd !default;
+$code_string: #1dc116 !default;
+$code_keyword: #b43d3d !default;
+$code_preprocessor: #8aa6c1 !default;
+$code_variable: #ffaa3e !default;
+$code_value: #f7e741 !default;
+$code_functions: #ffaa3e !default;
+$code_constants: #e0e8ff !default;
+$code_color1: #f8bb00 !default;
+$code_color2: white !default;
+$code_color3: #ffaa3e !default;
+
+@import "_theme_template.scss";
View
32 root/static/syntax_highlight/compass/shThemeRDark.scss
@@ -0,0 +1,32 @@
+// RDark SyntaxHighlighter theme based on theme by Radu Dineiu
+// http://www.vim.org/scripts/script.php?script_id=1732
+
+$background: #1b2426 !default;
+
+$line_highlighted_background: #323E41 !default;
+$line_highlighted_number: #b9bdb6 !default;
+
+$gutter_text: #afafaf !default;
+$gutter_border_color: #435a5f !default;
+
+$toolbar_collapsed_a: #5ba1cf !default;
+$toolbar_collapsed_a_hover: #5ce638 !default;
+$toolbar_collapsed_background: #000 !default;
+
+$toolbar_a: #fff !default;
+$toolbar_a_hover: #e0e8ff !default;
+
+$code_plain: #b9bdb6 !default;
+$code_comments: #878a85 !default;
+$code_string: #5ce638 !default;
+$code_keyword: #5ba1cf !default;
+$code_preprocessor: #435a5f !default;
+$code_variable: #ffaa3e !default;
+$code_value: #009900 !default;
+$code_functions: #ffaa3e !default;
+$code_constants: #e0e8ff !default;
+$code_color1: #e0e8ff !default;
+$code_color2: white !default;
+$code_color3: #ffaa3e !default;
+
+@import "_theme_template.scss";
View
17 root/static/syntax_highlight/scripts/shAutoloader.js
@@ -0,0 +1,17 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(2(){1 h=5;h.I=2(){2 n(c,a){4(1 d=0;d<c.9;d++)i[c[d]]=a}2 o(c){1 a=r.H("J"),d=3;a.K=c;a.M="L/t";a.G="t";a.u=a.v=2(){6(!d&&(!8.7||8.7=="F"||8.7=="z")){d=q;e[c]=q;a:{4(1 p y e)6(e[p]==3)B a;j&&5.C(k)}a.u=a.v=x;a.D.O(a)}};r.N.R(a)}1 f=Q,l=h.P(),i={},e={},j=3,k=x,b;5.T=2(c){k=c;j=q};4(b=0;b<f.9;b++){1 m=f[b].w?f[b]:f[b].S(/\\s+/),g=m.w();n(m,g)}4(b=0;b<l.9;b++)6(g=i[l[b].E.A]){e[g]=3;o(g)}}})();',56,56,'|var|function|false|for|SyntaxHighlighter|if|readyState|this|length|||||||||||||||||true|document||javascript|onload|onreadystatechange|pop|null|in|complete|brush|break|highlight|parentNode|params|loaded|language|createElement|autoloader|script|src|text|type|body|removeChild|findElements|arguments|appendChild|split|all'.split('|'),0,{}))
View
59 root/static/syntax_highlight/scripts/shBrushAS3.js
@@ -0,0 +1,59 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ // Created by Peter Atoria @ http://iAtoria.com
+
+ var inits = 'class interface function package';
+
+ var keywords = '-Infinity ...rest Array as AS3 Boolean break case catch const continue Date decodeURI ' +
+ 'decodeURIComponent default delete do dynamic each else encodeURI encodeURIComponent escape ' +
+ 'extends false final finally flash_proxy for get if implements import in include Infinity ' +
+ 'instanceof int internal is isFinite isNaN isXMLName label namespace NaN native new null ' +
+ 'Null Number Object object_proxy override parseFloat parseInt private protected public ' +
+ 'return set static String super switch this throw true try typeof uint undefined unescape ' +
+ 'use void while with'
+ ;
+
+ this.regexList = [
+ { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
+ { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
+ { regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers
+ { regex: new RegExp(this.getKeywords(inits), 'gm'), css: 'color3' }, // initializations
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
+ { regex: new RegExp('var', 'gm'), css: 'variable' }, // variable
+ { regex: new RegExp('trace', 'gm'), css: 'color1' } // trace
+ ];
+
+ this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags);
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['actionscript3', 'as3'];
+
+ SyntaxHighlighter.brushes.AS3 = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
View
75 root/static/syntax_highlight/scripts/shBrushAppleScript.js
@@ -0,0 +1,75 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ // AppleScript brush by David Chambers
+ // http://davidchambersdesign.com/
+ var keywords = 'after before beginning continue copy each end every from return get global in local named of set some that the then times to where whose with without';
+ var ordinals = 'first second third fourth fifth sixth seventh eighth ninth tenth last front back middle';
+ var specials = 'activate add alias AppleScript ask attachment boolean class constant delete duplicate empty exists false id integer list make message modal modified new no paragraph pi properties quit real record remove rest result reveal reverse run running save string true word yes';
+
+ this.regexList = [
+
+ { regex: /(--|#).*$/gm,
+ css: 'comments' },
+
+ { regex: /\(\*(?:[\s\S]*?\(\*[\s\S]*?\*\))*[\s\S]*?\*\)/gm, // support nested comments
+ css: 'comments' },
+
+ { regex: /"[\s\S]*?"/gm,
+ css: 'string' },
+
+ { regex: /(?:,|:|¬|'s\b|\(|\)|\{|\}|«|\b\w*»)/g,
+ css: 'color1' },
+
+ { regex: /(-)?(\d)+(\.(\d)?)?(E\+(\d)+)?/g, // numbers
+ css: 'color1' },
+
+ { regex: /(?:&(amp;|gt;|lt;)?|=||>|<||>=||<=|\*|\+|-|\/|÷|\^)/g,
+ css: 'color2' },
+
+ { regex: /\b(?:and|as|div|mod|not|or|return(?!\s&)(ing)?|equals|(is(n't| not)? )?equal( to)?|does(n't| not) equal|(is(n't| not)? )?(greater|less) than( or equal( to)?)?|(comes|does(n't| not) come) (after|before)|is(n't| not)?( in)? (back|front) of|is(n't| not)? behind|is(n't| not)?( (in|contained by))?|does(n't| not) contain|contain(s)?|(start|begin|end)(s)? with|((but|end) )?(consider|ignor)ing|prop(erty)?|(a )?ref(erence)?( to)?|repeat (until|while|with)|((end|exit) )?repeat|((else|end) )?if|else|(end )?(script|tell|try)|(on )?error|(put )?into|(of )?(it|me)|its|my|with (timeout( of)?|transaction)|end (timeout|transaction))\b/g,
+ css: 'keyword' },
+
+ { regex: /\b\d+(st|nd|rd|th)\b/g, // ordinals
+ css: 'keyword' },
+
+ { regex: /\b(?:about|above|against|around|at|below|beneath|beside|between|by|(apart|aside) from|(instead|out) of|into|on(to)?|over|since|thr(ough|u)|under)\b/g,
+ css: 'color3' },
+
+ { regex: /\b(?:adding folder items to|after receiving|choose( ((remote )?application|color|folder|from list|URL))?|clipboard info|set the clipboard to|(the )?clipboard|entire contents|display(ing| (alert|dialog|mode))?|document( (edited|file|nib name))?|file( (name|type))?|(info )?for|giving up after|(name )?extension|quoted form|return(ed)?|second(?! item)(s)?|list (disks|folder)|text item(s| delimiters)?|(Unicode )?text|(disk )?item(s)?|((current|list) )?view|((container|key) )?window|with (data|icon( (caution|note|stop))?|parameter(s)?|prompt|properties|seed|title)|case|diacriticals|hyphens|numeric strings|punctuation|white space|folder creation|application(s( folder)?| (processes|scripts position|support))?|((desktop )?(pictures )?|(documents|downloads|favorites|home|keychain|library|movies|music|public|scripts|sites|system|users|utilities|workflows) )folder|desktop|Folder Action scripts|font(s| panel)?|help|internet plugins|modem scripts|(system )?preferences|printer descriptions|scripting (additions|components)|shared (documents|libraries)|startup (disk|items)|temporary items|trash|on server|in AppleTalk zone|((as|long|short) )?user name|user (ID|locale)|(with )?password|in (bundle( with identifier)?|directory)|(close|open for) access|read|write( permission)?|(g|s)et eof|using( delimiters)?|starting at|default (answer|button|color|country code|entr(y|ies)|identifiers|items|name|location|script editor)|hidden( answer)?|open(ed| (location|untitled))?|error (handling|reporting)|(do( shell)?|load|run|store) script|administrator privileges|altering line endings|get volume settings|(alert|boot|input|mount|output|set) volume|output muted|(fax|random )?number|round(ing)?|up|down|toward zero|to nearest|as taught in school|system (attribute|info)|((AppleScript( Studio)?|system) )?version|(home )?directory|(IPv4|primary Ethernet) address|CPU (type|speed)|physical memory|time (stamp|to GMT)|replacing|ASCII (character|number)|localized string|from table|offset|summarize|beep|delay|say|(empty|multiple) selections allowed|(of|preferred) type|invisibles|showing( package contents)?|editable URL|(File|FTP|News|Media|Web) [Ss]ervers|Telnet hosts|Directory services|Remote applications|waiting until completion|saving( (in|to))?|path (for|to( (((current|frontmost) )?application|resource))?)|POSIX (file|path)|(background|RGB) color|(OK|cancel) button name|cancel button|button(s)?|cubic ((centi)?met(re|er)s|yards|feet|inches)|square ((kilo)?met(re|er)s|miles|yards|feet)|(centi|kilo)?met(re|er)s|miles|yards|feet|inches|lit(re|er)s|gallons|quarts|(kilo)?grams|ounces|pounds|degrees (Celsius|Fahrenheit|Kelvin)|print( (dialog|settings))?|clos(e(able)?|ing)|(de)?miniaturized|miniaturizable|zoom(ed|able)|attribute run|action (method|property|title)|phone|email|((start|end)ing|home) page|((birth|creation|current|custom|modification) )?date|((((phonetic )?(first|last|middle))|computer|host|maiden|related) |nick)?name|aim|icq|jabber|msn|yahoo|address(es)?|save addressbook|should enable action|city|country( code)?|formatte(r|d address)|(palette )?label|state|street|zip|AIM [Hh]andle(s)?|my card|select(ion| all)?|unsaved|(alpha )?value|entr(y|ies)|group|(ICQ|Jabber|MSN) handle|person|people|company|department|icon image|job title|note|organization|suffix|vcard|url|copies|collating|pages (across|down)|request print time|target( printer)?|((GUI Scripting|Script menu) )?enabled|show Computer scripts|(de)?activated|awake from nib|became (key|main)|call method|of (class|object)|center|clicked toolbar item|closed|for document|exposed|(can )?hide|idle|keyboard (down|up)|event( (number|type))?|launch(ed)?|load (image|movie|nib|sound)|owner|log|mouse (down|dragged|entered|exited|moved|up)|move|column|localization|resource|script|register|drag (info|types)|resigned (active|key|main)|resiz(e(d)?|able)|right mouse (down|dragged|up)|scroll wheel|(at )?index|should (close|open( untitled)?|quit( after last window closed)?|zoom)|((proposed|screen) )?bounds|show(n)?|behind|in front of|size (mode|to fit)|update(d| toolbar item)?|was (hidden|miniaturized)|will (become active|close|finish launching|hide|miniaturize|move|open|quit|(resign )?active|((maximum|minimum|proposed) )?size|show|zoom)|bundle|data source|movie|pasteboard|sound|tool(bar| tip)|(color|open|save) panel|coordinate system|frontmost|main( (bundle|menu|window))?|((services|(excluded from )?windows) )?menu|((executable|frameworks|resource|scripts|shared (frameworks|support)) )?path|(selected item )?identifier|data|content(s| view)?|character(s)?|click count|(command|control|option|shift) key down|context|delta (x|y|z)|key( code)?|location|pressure|unmodified characters|types|(first )?responder|playing|(allowed|selectable) identifiers|allows customization|(auto saves )?configuration|visible|image( name)?|menu form representation|tag|user(-| )defaults|associated file name|(auto|needs) display|current field editor|floating|has (resize indicator|shadow)|hides when deactivated|level|minimized (image|title)|opaque|position|release when closed|sheet|title(d)?)\b/g,
+ css: 'color3' },
+
+ { regex: new RegExp(this.getKeywords(specials), 'gm'), css: 'color3' },
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' },
+ { regex: new RegExp(this.getKeywords(ordinals), 'gm'), css: 'keyword' }
+ ];
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['applescript'];
+
+ SyntaxHighlighter.brushes.AppleScript = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
View
59 root/static/syntax_highlight/scripts/shBrushBash.js
@@ -0,0 +1,59 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ var keywords = 'if fi then elif else for do done until while break continue case function return in eq ne ge le';
+ var commands = 'alias apropos awk basename bash bc bg builtin bzip2 cal cat cd cfdisk chgrp chmod chown chroot' +
+ 'cksum clear cmp comm command cp cron crontab csplit cut date dc dd ddrescue declare df ' +
+ 'diff diff3 dig dir dircolors dirname dirs du echo egrep eject enable env ethtool eval ' +
+ 'exec exit expand export expr false fdformat fdisk fg fgrep file find fmt fold format ' +
+ 'free fsck ftp gawk getopts grep groups gzip hash head history hostname id ifconfig ' +
+ 'import install join kill less let ln local locate logname logout look lpc lpr lprint ' +
+ 'lprintd lprintq lprm ls lsof make man mkdir mkfifo mkisofs mknod more mount mtools ' +
+ 'mv netstat nice nl nohup nslookup open op passwd paste pathchk ping popd pr printcap ' +
+ 'printenv printf ps pushd pwd quota quotacheck quotactl ram rcp read readonly renice ' +
+ 'remsync rm rmdir rsync screen scp sdiff sed select seq set sftp shift shopt shutdown ' +
+ 'sleep sort source split ssh strace su sudo sum symlink sync tail tar tee test time ' +
+ 'times touch top traceroute trap tr true tsort tty type ulimit umask umount unalias ' +
+ 'uname unexpand uniq units unset unshar useradd usermod users uuencode uudecode v vdir ' +
+ 'vi watch wc whereis which who whoami Wget xargs yes'
+ ;
+
+ this.regexList = [
+ { regex: /^#!.*$/gm, css: 'preprocessor bold' },
+ { regex: /\/[\w-\/]+/gm, css: 'plain' },
+ { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
+ { regex: new RegExp(this.getKeywords(commands), 'gm'), css: 'functions' } // commands
+ ];
+ }
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['bash', 'shell'];
+
+ SyntaxHighlighter.brushes.Bash = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
View
65 root/static/syntax_highlight/scripts/shBrushCSharp.js
@@ -0,0 +1,65 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ var keywords = 'abstract as base bool break byte case catch char checked class const ' +
+ 'continue decimal default delegate do double else enum event explicit ' +
+ 'extern false finally fixed float for foreach get goto if implicit in int ' +
+ 'interface internal is lock long namespace new null object operator out ' +
+ 'override params private protected public readonly ref return sbyte sealed set ' +
+ 'short sizeof stackalloc static string struct switch this throw true try ' +
+ 'typeof uint ulong unchecked unsafe ushort using virtual void while';
+
+ function fixComments(match, regexInfo)
+ {
+ var css = (match[0].indexOf("///") == 0)
+ ? 'color1'
+ : 'comments'
+ ;
+
+ return [new SyntaxHighlighter.Match(match[0], match.index, css)];
+ }
+
+ this.regexList = [
+ { regex: SyntaxHighlighter.regexLib.singleLineCComments, func : fixComments }, // one line comments
+ { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
+ { regex: /@"(?:[^"]|"")*"/g, css: 'string' }, // @-quoted strings
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
+ { regex: /^\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // c# keyword
+ { regex: /\bpartial(?=\s+(?:class|interface|struct)\b)/g, css: 'keyword' }, // contextual keyword: 'partial'
+ { regex: /\byield(?=\s+(?:return|break)\b)/g, css: 'keyword' } // contextual keyword: 'yield'
+ ];
+
+ this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['c#', 'c-sharp', 'csharp'];
+
+ SyntaxHighlighter.brushes.CSharp = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
+
View
100 root/static/syntax_highlight/scripts/shBrushColdFusion.js
@@ -0,0 +1,100 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ // Contributed by Jen
+ // http://www.jensbits.com/2009/05/14/coldfusion-brush-for-syntaxhighlighter-plus
+
+ var funcs = 'Abs ACos AddSOAPRequestHeader AddSOAPResponseHeader AjaxLink AjaxOnLoad ArrayAppend ArrayAvg ArrayClear ArrayDeleteAt ' +
+ 'ArrayInsertAt ArrayIsDefined ArrayIsEmpty ArrayLen ArrayMax ArrayMin ArraySet ArraySort ArraySum ArraySwap ArrayToList ' +
+ 'Asc ASin Atn BinaryDecode BinaryEncode BitAnd BitMaskClear BitMaskRead BitMaskSet BitNot BitOr BitSHLN BitSHRN BitXor ' +
+ 'Ceiling CharsetDecode CharsetEncode Chr CJustify Compare CompareNoCase Cos CreateDate CreateDateTime CreateObject ' +
+ 'CreateODBCDate CreateODBCDateTime CreateODBCTime CreateTime CreateTimeSpan CreateUUID DateAdd DateCompare DateConvert ' +
+ 'DateDiff DateFormat DatePart Day DayOfWeek DayOfWeekAsString DayOfYear DaysInMonth DaysInYear DE DecimalFormat DecrementValue ' +
+ 'Decrypt DecryptBinary DeleteClientVariable DeserializeJSON DirectoryExists DollarFormat DotNetToCFType Duplicate Encrypt ' +
+ 'EncryptBinary Evaluate Exp ExpandPath FileClose FileCopy FileDelete FileExists FileIsEOF FileMove FileOpen FileRead ' +
+ 'FileReadBinary FileReadLine FileSetAccessMode FileSetAttribute FileSetLastModified FileWrite Find FindNoCase FindOneOf ' +
+ 'FirstDayOfMonth Fix FormatBaseN GenerateSecretKey GetAuthUser GetBaseTagData GetBaseTagList GetBaseTemplatePath ' +
+ 'GetClientVariablesList GetComponentMetaData GetContextRoot GetCurrentTemplatePath GetDirectoryFromPath GetEncoding ' +
+ 'GetException GetFileFromPath GetFileInfo GetFunctionList GetGatewayHelper GetHttpRequestData GetHttpTimeString ' +
+ 'GetK2ServerDocCount GetK2ServerDocCountLimit GetLocale GetLocaleDisplayName GetLocalHostIP GetMetaData GetMetricData ' +
+ 'GetPageContext GetPrinterInfo GetProfileSections GetProfileString GetReadableImageFormats GetSOAPRequest GetSOAPRequestHeader ' +
+ 'GetSOAPResponse GetSOAPResponseHeader GetTempDirectory GetTempFile GetTemplatePath GetTickCount GetTimeZoneInfo GetToken ' +
+ 'GetUserRoles GetWriteableImageFormats Hash Hour HTMLCodeFormat HTMLEditFormat IIf ImageAddBorder ImageBlur ImageClearRect ' +
+ 'ImageCopy ImageCrop ImageDrawArc ImageDrawBeveledRect ImageDrawCubicCurve ImageDrawLine ImageDrawLines ImageDrawOval ' +
+ 'ImageDrawPoint ImageDrawQuadraticCurve ImageDrawRect ImageDrawRoundRect ImageDrawText ImageFlip ImageGetBlob ImageGetBufferedImage ' +
+ 'ImageGetEXIFTag ImageGetHeight ImageGetIPTCTag ImageGetWidth ImageGrayscale ImageInfo ImageNegative ImageNew ImageOverlay ImagePaste ' +
+ 'ImageRead ImageReadBase64 ImageResize ImageRotate ImageRotateDrawingAxis ImageScaleToFit ImageSetAntialiasing ImageSetBackgroundColor ' +
+ 'ImageSetDrawingColor ImageSetDrawingStroke ImageSetDrawingTransparency ImageSharpen ImageShear ImageShearDrawingAxis ImageTranslate ' +
+ 'ImageTranslateDrawingAxis ImageWrite ImageWriteBase64 ImageXORDrawingMode IncrementValue InputBaseN Insert Int IsArray IsBinary ' +
+ 'IsBoolean IsCustomFunction IsDate IsDDX IsDebugMode IsDefined IsImage IsImageFile IsInstanceOf IsJSON IsLeapYear IsLocalHost ' +
+ 'IsNumeric IsNumericDate IsObject IsPDFFile IsPDFObject IsQuery IsSimpleValue IsSOAPRequest IsStruct IsUserInAnyRole IsUserInRole ' +
+ 'IsUserLoggedIn IsValid IsWDDX IsXML IsXmlAttribute IsXmlDoc IsXmlElem IsXmlNode IsXmlRoot JavaCast JSStringFormat LCase Left Len ' +
+ 'ListAppend ListChangeDelims ListContains ListContainsNoCase ListDeleteAt ListFind ListFindNoCase ListFirst ListGetAt ListInsertAt ' +
+ 'ListLast ListLen ListPrepend ListQualify ListRest ListSetAt ListSort ListToArray ListValueCount ListValueCountNoCase LJustify Log ' +
+ 'Log10 LSCurrencyFormat LSDateFormat LSEuroCurrencyFormat LSIsCurrency LSIsDate LSIsNumeric LSNumberFormat LSParseCurrency LSParseDateTime ' +
+ 'LSParseEuroCurrency LSParseNumber LSTimeFormat LTrim Max Mid Min Minute Month MonthAsString Now NumberFormat ParagraphFormat ParseDateTime ' +
+ 'Pi PrecisionEvaluate PreserveSingleQuotes Quarter QueryAddColumn QueryAddRow QueryConvertForGrid QueryNew QuerySetCell QuotedValueList Rand ' +
+ 'Randomize RandRange REFind REFindNoCase ReleaseComObject REMatch REMatchNoCase RemoveChars RepeatString Replace ReplaceList ReplaceNoCase ' +
+ 'REReplace REReplaceNoCase Reverse Right RJustify Round RTrim Second SendGatewayMessage SerializeJSON SetEncoding SetLocale SetProfileString ' +
+ 'SetVariable Sgn Sin Sleep SpanExcluding SpanIncluding Sqr StripCR StructAppend StructClear StructCopy StructCount StructDelete StructFind ' +
+ 'StructFindKey StructFindValue StructGet StructInsert StructIsEmpty StructKeyArray StructKeyExists StructKeyList StructKeyList StructNew ' +
+ 'StructSort StructUpdate Tan TimeFormat ToBase64 ToBinary ToScript ToString Trim UCase URLDecode URLEncodedFormat URLSessionFormat Val ' +
+ 'ValueList VerifyClient Week Wrap Wrap WriteOutput XmlChildPos XmlElemNew XmlFormat XmlGetNodeType XmlNew XmlParse XmlSearch XmlTransform ' +
+ 'XmlValidate Year YesNoFormat';
+
+ var keywords = 'cfabort cfajaximport cfajaxproxy cfapplet cfapplication cfargument cfassociate cfbreak cfcache cfcalendar ' +
+ 'cfcase cfcatch cfchart cfchartdata cfchartseries cfcol cfcollection cfcomponent cfcontent cfcookie cfdbinfo ' +
+ 'cfdefaultcase cfdirectory cfdiv cfdocument cfdocumentitem cfdocumentsection cfdump cfelse cfelseif cferror ' +
+ 'cfexchangecalendar cfexchangeconnection cfexchangecontact cfexchangefilter cfexchangemail cfexchangetask ' +
+ 'cfexecute cfexit cffeed cffile cfflush cfform cfformgroup cfformitem cfftp cffunction cfgrid cfgridcolumn ' +
+ 'cfgridrow cfgridupdate cfheader cfhtmlhead cfhttp cfhttpparam cfif cfimage cfimport cfinclude cfindex ' +
+ 'cfinput cfinsert cfinterface cfinvoke cfinvokeargument cflayout cflayoutarea cfldap cflocation cflock cflog ' +
+ 'cflogin cfloginuser cflogout cfloop cfmail cfmailparam cfmailpart cfmenu cfmenuitem cfmodule cfNTauthenticate ' +
+ 'cfobject cfobjectcache cfoutput cfparam cfpdf cfpdfform cfpdfformparam cfpdfparam cfpdfsubform cfpod cfpop ' +
+ 'cfpresentation cfpresentationslide cfpresenter cfprint cfprocessingdirective cfprocparam cfprocresult ' +
+ 'cfproperty cfquery cfqueryparam cfregistry cfreport cfreportparam cfrethrow cfreturn cfsavecontent cfschedule ' +
+ 'cfscript cfsearch cfselect cfset cfsetting cfsilent cfslider cfsprydataset cfstoredproc cfswitch cftable ' +
+ 'cftextarea cfthread cfthrow cftimer cftooltip cftrace cftransaction cftree cftreeitem cftry cfupdate cfwddx ' +
+ 'cfwindow cfxml cfzip cfzipparam';
+
+ var operators = 'all and any between cross in join like not null or outer some';
+
+ this.regexList = [
+ { regex: new RegExp('--(.*)$', 'gm'), css: 'comments' }, // one line and multiline comments
+ { regex: SyntaxHighlighter.regexLib.xmlComments, css: 'comments' }, // single quoted strings
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
+ { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // functions
+ { regex: new RegExp(this.getKeywords(operators), 'gmi'), css: 'color1' }, // operators and such
+ { regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
+ ];
+ }
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['coldfusion','cf'];
+
+ SyntaxHighlighter.brushes.ColdFusion = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
View
97 root/static/syntax_highlight/scripts/shBrushCpp.js
@@ -0,0 +1,97 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ // Copyright 2006 Shin, YoungJin
+
+ var datatypes = 'ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR ' +
+ 'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH ' +
+ 'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP ' +
+ 'HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY ' +
+ 'HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT ' +
+ 'HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE ' +
+ 'LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF ' +
+ 'LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR ' +
+ 'LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR ' +
+ 'PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT ' +
+ 'PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 ' +
+ 'POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR ' +
+ 'PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 ' +
+ 'PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT ' +
+ 'SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ' +
+ 'ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM ' +
+ 'char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t ' +
+ 'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS ' +
+ 'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t ' +
+ '__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t ' +