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