Skip to content

Commit

Permalink
Add coderay stylesheets to posts
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDoktar committed May 11, 2010
1 parent 1252941 commit 6a18ec1
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/posts/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
= stylesheet "coderay"

%h1= @post.title
%span= @post.published_on
%p
~ @post.body
~ raw textilize_and_highlight @post.body

%p
= link_to "Edit", [:edit, @post]
Expand Down
105 changes: 105 additions & 0 deletions public/stylesheets/coderay.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
div.code { position: relative; }
.CodeRay {
font-family: 'Courier New', 'Terminal', monospace;
color: #100;
}
.CodeRay pre { margin: 0 }

div.CodeRay { line-height: 1.5em; margin-bottom: 1.35714285714285714286em;}

span.CodeRay { white-space: pre; border: 0; padding: .14285714285714285714em }

table.CodeRay { border-collapse: collapse; width: 100%; padding: .14285714285714285714em }
table.CodeRay td { padding: .14285714285714285714em .28571428571428571428em; vertical-align: top }

.CodeRay .line_numbers, .CodeRay .no {
background-color: #def;
color: gray;
text-align: right;
}
.CodeRay .line_numbers tt { font-weight: bold }
.CodeRay .no { padding: 0 .28571428571428571428em }
.CodeRay .code { padding: 1.5em; padding-top: 0px; border: 0.07142857142857142857em solid silver;
-moz-border-radius: .35714285714285714285em; -webkit-border-radius: .35714285714285714285em;
border-radius: .35714285714285714285em; background-color: #F0F0F0; }

ol.CodeRay { font-size: 1em }
ol.CodeRay li { white-space: pre }

.CodeRay .code pre { overflow: auto }

.CodeRay .af { color:#00C }
.CodeRay .an { color:#007 }
.CodeRay .av { color:#700 }
.CodeRay .aw { color:#C00 }
.CodeRay .bi { color:#509; font-weight:bold }
.CodeRay .c { color:#888 }

.CodeRay .ch { color:#04D }
.CodeRay .ch .k { color:#04D }
.CodeRay .ch .dl { color:#039 }

.CodeRay .cl { color:#B06; font-weight:bold }
.CodeRay .co { color:#036; font-weight:bold }
.CodeRay .cr { color:#0A0 }
.CodeRay .cv { color:#369 }
.CodeRay .df { color:#099; font-weight:bold }
.CodeRay .di { color:#088; font-weight:bold }
.CodeRay .dl { color:black }
.CodeRay .do { color:#970 }
.CodeRay .ds { color:#D42; font-weight:bold }
.CodeRay .e { color:#666; font-weight:bold }
.CodeRay .en { color:#800; font-weight:bold }
.CodeRay .er { color:#F00; background-color:#FAA }
.CodeRay .ex { color:#F00; font-weight:bold }
.CodeRay .fl { color:#60E; font-weight:bold }
.CodeRay .fu { color:#06B; font-weight:bold }
.CodeRay .gv { color:#d70; font-weight:bold }
.CodeRay .hx { color:#058; font-weight:bold }
.CodeRay .i { color:#00D; font-weight:bold }
.CodeRay .ic { color:#B44; font-weight:bold }

.CodeRay .il { background: #eee }
.CodeRay .il .il { background: #ddd }
.CodeRay .il .il .il { background: #ccc }
.CodeRay .il .dl { font-weight: bold ! important; color: #888 ! important }

.CodeRay .in { color:#B2B; font-weight:bold }
.CodeRay .iv { color:#33B }
.CodeRay .la { color:#970; font-weight:bold }
.CodeRay .lv { color:#963 }
.CodeRay .oc { color:#40E; font-weight:bold }
.CodeRay .on { color:#000; font-weight:bold }
.CodeRay .op { }
.CodeRay .pc { color:#038; font-weight:bold }
.CodeRay .pd { color:#369; font-weight:bold }
.CodeRay .pp { color:#579 }
.CodeRay .pt { color:#339; font-weight:bold }
.CodeRay .r { color:#080; font-weight:bold }

.CodeRay .rx { background-color:#fff0ff }
.CodeRay .rx .k { color:#808 }
.CodeRay .rx .dl { color:#404 }
.CodeRay .rx .mod { color:#C2C }
.CodeRay .rx .fu { color:#404; font-weight: bold }

.CodeRay .s { background-color:#fff0f0 }
.CodeRay .s .s { background-color:#ffe0e0 }
.CodeRay .s .s .s { background-color:#ffd0d0 }
.CodeRay .s .k { color:#D20 }
.CodeRay .s .dl { color:#710 }

.CodeRay .sh { background-color:#f0fff0 }
.CodeRay .sh .k { color:#2B2 }
.CodeRay .sh .dl { color:#161 }

.CodeRay .sy { color:#A60 }
.CodeRay .sy .k { color:#A60 }
.CodeRay .sy .dl { color:#630 }

.CodeRay .ta { color:#070 }
.CodeRay .tf { color:#070; font-weight:bold }
.CodeRay .ts { color:#D70; font-weight:bold }
.CodeRay .ty { color:#339; font-weight:bold }
.CodeRay .v { color:#036 }
.CodeRay .xt { color:#444 }

0 comments on commit 6a18ec1

Please sign in to comment.