Chris@210: module CodeRay Chris@210: module Styles Chris@210: Chris@210: class Murphy < Style Chris@210: Chris@210: register_for :murphy Chris@210: Chris@210: code_background = '#001129' Chris@210: numbers_background = code_background Chris@210: border_color = 'silver' Chris@210: normal_color = '#C0C0C0' Chris@210: Chris@210: CSS_MAIN_STYLES = <<-MAIN Chris@210: .CodeRay { Chris@210: background-color: #{code_background}; Chris@210: border: 1px solid #{border_color}; Chris@210: font-family: 'Courier New', 'Terminal', monospace; Chris@210: color: #{normal_color}; Chris@210: } Chris@210: .CodeRay pre { margin: 0px; } Chris@210: Chris@210: div.CodeRay { } Chris@210: Chris@210: span.CodeRay { white-space: pre; border: 0px; padding: 2px; } Chris@210: Chris@210: table.CodeRay { border-collapse: collapse; width: 100%; padding: 2px; } Chris@210: table.CodeRay td { padding: 2px 4px; vertical-align: top; } Chris@210: Chris@210: .CodeRay .line_numbers, .CodeRay .no { Chris@210: background-color: #{numbers_background}; Chris@210: color: gray; Chris@210: text-align: right; Chris@210: } Chris@210: .CodeRay .line_numbers tt { font-weight: bold; } Chris@210: .CodeRay .line_numbers .highlighted { color: red } Chris@210: .CodeRay .line { display: block; float: left; width: 100%; } Chris@210: .CodeRay .no { padding: 0px 4px; } Chris@210: .CodeRay .code { width: 100%; } Chris@210: Chris@210: ol.CodeRay { font-size: 10pt; } Chris@210: ol.CodeRay li { white-space: pre; } Chris@210: Chris@210: .CodeRay .code pre { overflow: auto; } Chris@210: MAIN Chris@210: Chris@210: TOKEN_COLORS = <<-'TOKENS' Chris@210: .af { color:#00C; } Chris@210: .an { color:#007; } Chris@210: .av { color:#700; } Chris@210: .aw { color:#C00; } Chris@210: .bi { color:#509; font-weight:bold; } Chris@210: .c { color:#555; background-color: black; } Chris@210: Chris@210: .ch { color:#88F; } Chris@210: .ch .k { color:#04D; } Chris@210: .ch .dl { color:#039; } Chris@210: Chris@210: .cl { color:#e9e; font-weight:bold; } Chris@210: .co { color:#5ED; font-weight:bold; } Chris@210: .cr { color:#0A0; } Chris@210: .cv { color:#ccf; } Chris@210: .df { color:#099; font-weight:bold; } Chris@210: .di { color:#088; font-weight:bold; } Chris@210: .dl { color:black; } Chris@210: .do { color:#970; } Chris@210: .ds { color:#D42; font-weight:bold; } Chris@210: .e { color:#666; font-weight:bold; } Chris@210: .er { color:#F00; background-color:#FAA; } Chris@210: .ex { color:#F00; font-weight:bold; } Chris@210: .fl { color:#60E; font-weight:bold; } Chris@210: .fu { color:#5ed; font-weight:bold; } Chris@210: .gv { color:#f84; } Chris@210: .hx { color:#058; font-weight:bold; } Chris@210: .i { color:#66f; font-weight:bold; } Chris@210: .ic { color:#B44; font-weight:bold; } Chris@210: .il { } Chris@210: .in { color:#B2B; font-weight:bold; } Chris@210: .iv { color:#aaf; } Chris@210: .la { color:#970; font-weight:bold; } Chris@210: .lv { color:#963; } Chris@210: .oc { color:#40E; font-weight:bold; } Chris@210: .of { color:#000; font-weight:bold; } Chris@210: .op { } Chris@210: .pc { color:#08f; font-weight:bold; } Chris@210: .pd { color:#369; font-weight:bold; } Chris@210: .pp { color:#579; } Chris@210: .pt { color:#66f; font-weight:bold; } Chris@210: .r { color:#5de; font-weight:bold; } Chris@210: .r, .kw { color:#5de; font-weight:bold } Chris@210: Chris@210: .ke { color: #808; } Chris@210: Chris@210: .rx { background-color:#221133; } Chris@210: .rx .k { color:#f8f; } Chris@210: .rx .dl { color:#f0f; } Chris@210: .rx .mod { color:#f0b; } Chris@210: .rx .fu { color:#404; font-weight: bold; } Chris@210: Chris@210: .s { background-color:#331122; } Chris@210: .s .s { background-color:#ffe0e0; } Chris@210: .s .s .s { background-color:#ffd0d0; } Chris@210: .s .k { color:#F88; } Chris@210: .s .dl { color:#f55; } Chris@210: Chris@210: .sh { background-color:#f0fff0; } Chris@210: .sh .k { color:#2B2; } Chris@210: .sh .dl { color:#161; } Chris@210: Chris@210: .sy { color:#Fc8; } Chris@210: .sy .k { color:#Fc8; } Chris@210: .sy .dl { color:#F84; } Chris@210: Chris@210: .ta { color:#070; } Chris@210: .tf { color:#070; font-weight:bold; } Chris@210: .ts { color:#D70; font-weight:bold; } Chris@210: .ty { color:#339; font-weight:bold; } Chris@210: .v { color:#036; } Chris@210: .xt { color:#444; } Chris@210: Chris@210: .ins { background: #afa; } Chris@210: .del { background: #faa; } Chris@210: .chg { color: #aaf; background: #007; } Chris@210: .head { color: #f8f; background: #505 } Chris@210: Chris@210: .ins .ins { color: #080; font-weight:bold } Chris@210: .del .del { color: #800; font-weight:bold } Chris@210: .chg .chg { color: #66f; } Chris@210: .head .head { color: #f4f; } Chris@210: TOKENS Chris@210: Chris@210: end Chris@210: Chris@210: end Chris@210: end