Fix code highlighting

This commit is contained in:
Paulus Schoutsen 2015-10-27 23:50:52 -07:00
parent 02ed6b6e3a
commit 75bb815796
8 changed files with 610 additions and 318 deletions

View File

@ -14,6 +14,7 @@ group :development do
gem 'stringex', '~> 1.4.0' gem 'stringex', '~> 1.4.0'
gem 'execjs' gem 'execjs'
gem 'therubyracer', :platforms => :ruby gem 'therubyracer', :platforms => :ruby
gem 'coderay'
end end
group :jekyll_plugins do group :jekyll_plugins do

132
Gemfile.lock Normal file
View File

@ -0,0 +1,132 @@
GEM
remote: https://rubygems.org/
specs:
RedCloth (4.2.9)
chunky_png (1.3.4)
coderay (1.1.0)
colorator (0.1)
compass (0.12.7)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.2.19)
execjs (2.6.0)
ffi (1.9.10)
fssm (0.2.10)
haml (4.0.7)
tilt
jekyll (3.0.0)
colorator (~> 0.1)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 3.0)
mercenary (~> 0.3.3)
rouge (~> 1.7)
safe_yaml (~> 1.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (1.3.0)
sass (~> 3.2)
jekyll-sitemap (0.9.0)
jekyll-time-to-read (0.1.1)
jekyll
jekyll-watch (1.3.0)
listen (~> 3.0)
kramdown (1.9.0)
libv8 (3.16.14.13)
liquid (3.0.6)
listen (3.0.3)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
mercenary (0.3.5)
octopress (3.0.11)
jekyll (>= 2.0)
mercenary (~> 0.3.2)
octopress-deploy
octopress-escape-code (~> 2.0)
octopress-hooks (~> 2.0)
redcarpet (~> 3.0)
titlecase
octopress-code-highlighter (4.2.6)
colorator (~> 0.1)
octopress-hooks
octopress-codefence (1.6.1)
octopress-code-highlighter (~> 4.2)
octopress-hooks (~> 2.1)
octopress-deploy (1.3.0)
colorator
octopress-escape-code (2.0.6)
octopress-hooks (~> 2.0)
octopress-filters (1.4.0)
jekyll
octopress-hooks (~> 2.0)
rubypants-unicode
titlecase
octopress-hooks (2.6.1)
jekyll (>= 2.0)
octopress-include-tag (1.1.3)
jekyll (>= 2.0)
octopress-tag-helpers (~> 1.0)
octopress-tag-helpers (1.0.8)
jekyll (>= 2.0)
posix-spawn (0.3.11)
pygments.rb (0.6.3)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.2.0)
rack (1.6.4)
rack-protection (1.5.3)
rack
rake (10.4.2)
rb-fsevent (0.9.6)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
rdiscount (2.1.8)
redcarpet (3.3.3)
ref (2.0.0)
rouge (1.10.1)
rubypants (0.2.0)
rubypants-unicode (0.2.5)
safe_yaml (1.0.4)
sass (3.2.19)
sass-globbing (1.0.0)
sass (>= 3.1)
sinatra (1.4.6)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
stringex (1.4.0)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
tilt (2.0.1)
titlecase (0.1.1)
yajl-ruby (1.2.1)
PLATFORMS
ruby
DEPENDENCIES
RedCloth (~> 4.2.9)
coderay
compass (~> 0.12.2)
execjs
haml (~> 4.0)
jekyll (~> 3.0)
jekyll-paginate
jekyll-sitemap
jekyll-time-to-read
octopress (~> 3.0)
octopress-codefence
octopress-filters
octopress-include-tag
pygments.rb (~> 0.6.3)
rake (~> 10.0)
rb-fsevent (~> 0.9)
rdiscount (~> 2.0)
rubypants (~> 0.2.0)
sass-globbing (~> 1.0.0)
sinatra (~> 1.4.2)
stringex (~> 1.4.0)
therubyracer
BUNDLED WITH
1.10.6

View File

@ -32,12 +32,26 @@ destination: public/
plugins_dir: plugins plugins_dir: plugins
code_dir: downloads/code code_dir: downloads/code
category_dir: blog/categories category_dir: blog/categories
markdown: redcarpet markdown: kramdown
redcarpet: kramdown:
extensions: ["no_intra_emphasis", "fenced_code_blocks", "autolink", "tables", "with_toc_data"] input: GFM
auto_ids: false
footnote_nr: 1
entity_output: as_char
toc_levels: 1..6
smart_quotes: lsquo,rsquo,ldquo,rdquo
enable_coderay: true
highlighter: pygments coderay:
coderay_wrap: div
coderay_line_numbers: nil
coderay_line_number_start: 1
coderay_tab_width: 4
coderay_bold_every: 10
coderay_css: class
highlighter: rouge
gems: gems:
- jekyll-time-to-read - jekyll-time-to-read

View File

@ -2,7 +2,7 @@
@import "partials/navigation"; @import "partials/navigation";
@import "partials/blog"; @import "partials/blog";
@import "partials/sharing"; @import "partials/sharing";
@import "partials/syntax"; // @import "partials/syntax";
@import "partials/archive"; @import "partials/archive";
@import "partials/sidebar"; @import "partials/sidebar";
@import "partials/footer"; @import "partials/footer";

144
sass/custom/_coderay.scss Normal file
View File

@ -0,0 +1,144 @@
code {
background: #fff;
font-size: .8em;
line-height: 1.5em;
color: #555;
border: 1px solid #ddd;
@include border-radius(.4em);
padding: 0 .3em;
}
.CodeRay {
background-color: #FFF;
border: 1px solid #CCC;
font-family: Monaco, "Courier New", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace;
color: #000;
padding: 1em 0px 1em 1em;
font-size: 12px;
margin-bottom: 16px;
}
.CodeRay pre {
margin: 0px;
}
div.CodeRay { }
span.CodeRay { white-space: pre; border: 0px; padding: 2px }
table.CodeRay { border-collapse: collapse; width: 100%; padding: 2px }
table.CodeRay td {
padding: 1em 0.5em;
vertical-align: top;
}
.CodeRay .line-numbers, .CodeRay .no {
background-color: #ECECEC;
color: #AAA;
text-align: right;
}
.CodeRay .line-numbers a {
color: #AAA;
}
.CodeRay .line-numbers tt { font-weight: bold }
.CodeRay .line-numbers .highlighted { color: red }
.CodeRay .line { display: block; float: left; width: 100%; }
.CodeRay span.line-numbers { padding: 0px 4px }
.CodeRay .code { width: 100% }
ol.CodeRay { font-size: 10pt }
ol.CodeRay li { white-space: pre }
.CodeRay .code pre { overflow: auto }
.CodeRay .debug { color:white ! important; background:blue ! important; }
.CodeRay .annotation { color:#007 }
.CodeRay .attribute-name { color:#f08 }
.CodeRay .attribute-value { color:#700 }
.CodeRay .binary { color:#509; font-weight:bold }
.CodeRay .comment { color:#998; font-style: italic;}
.CodeRay .char { color:#04D }
.CodeRay .char .content { color:#04D }
.CodeRay .char .delimiter { color:#039 }
.CodeRay .class { color:#458; font-weight:bold }
.CodeRay .complex { color:#A08; font-weight:bold }
.CodeRay .constant { color:teal; }
.CodeRay .color { color:#0A0 }
.CodeRay .class-variable { color:#369 }
.CodeRay .decorator { color:#B0B; }
.CodeRay .definition { color:#099; font-weight:bold }
.CodeRay .directive { color:#088; font-weight:bold }
.CodeRay .delimiter { color:black }
.CodeRay .doc { color:#970 }
.CodeRay .doctype { color:#34b }
.CodeRay .doc-string { color:#D42; font-weight:bold }
.CodeRay .escape { color:#666; font-weight:bold }
.CodeRay .entity { color:#800; font-weight:bold }
.CodeRay .error { color:#F00; background-color:#FAA }
.CodeRay .exception { color:#C00; font-weight:bold }
.CodeRay .filename { color:#099; }
.CodeRay .function { color:#900; font-weight:bold }
.CodeRay .global-variable { color:teal; font-weight:bold }
.CodeRay .hex { color:#058; font-weight:bold }
.CodeRay .integer { color:#099; }
.CodeRay .include { color:#B44; font-weight:bold }
.CodeRay .inline { color: black }
.CodeRay .inline .inline { background: #ccc }
.CodeRay .inline .inline .inline { background: #bbb }
.CodeRay .inline .inline-delimiter { color: #D14; }
.CodeRay .inline-delimiter { color: #D14; }
.CodeRay .important { color:#f00; }
.CodeRay .interpreted { color:#B2B; font-weight:bold }
.CodeRay .instance-variable { color:teal }
.CodeRay .label { color:#970; font-weight:bold }
.CodeRay .local-variable { color:#963 }
.CodeRay .octal { color:#40E; font-weight:bold }
.CodeRay .operator { }
.CodeRay .predefined-constant { font-weight:bold }
.CodeRay .predefined { color:#369; font-weight:bold }
.CodeRay .preprocessor { color:#579; }
.CodeRay .pseudo-class { color:#00C; font-weight:bold }
.CodeRay .predefined-type { color:#074; font-weight:bold }
.CodeRay .reserved, .keyword { color:#000; font-weight:bold }
.CodeRay .key { color: #808; }
.CodeRay .key .delimiter { color: #606; }
.CodeRay .key .char { color: #80f; }
.CodeRay .value { color: #088; }
.CodeRay .regexp { background-color:#fff0ff }
.CodeRay .regexp .content { color:#808 }
.CodeRay .regexp .delimiter { color:#404 }
.CodeRay .regexp .modifier { color:#C2C }
.CodeRay .regexp .function { color:#404; font-weight: bold }
.CodeRay .string { color: #D20; }
.CodeRay .string .string { }
.CodeRay .string .string .string { background-color:#ffd0d0 }
.CodeRay .string .content { color: #D14; }
.CodeRay .string .char { color: #D14; }
.CodeRay .string .delimiter { color: #D14; }
.CodeRay .shell { color:#D14 }
.CodeRay .shell .content { }
.CodeRay .shell .delimiter { color:#D14 }
.CodeRay .symbol { color:#990073 }
.CodeRay .symbol .content { color:#A60 }
.CodeRay .symbol .delimiter { color:#630 }
.CodeRay .tag { color:#070 }
.CodeRay .tag-special { color:#D70; font-weight:bold }
.CodeRay .type { color:#339; font-weight:bold }
.CodeRay .variable { color:#036 }
.CodeRay .insert { background: #afa; }
.CodeRay .delete { background: #faa; }
.CodeRay .change { color: #aaf; background: #007; }
.CodeRay .head { color: #f8f; background: #505 }
.CodeRay .insert .insert { color: #080; font-weight:bold }
.CodeRay .delete .delete { color: #800; font-weight:bold }
.CodeRay .change .change { color: #66f; }
.CodeRay .head .head { color: #f4f; }

View File

@ -360,4 +360,4 @@ p.note {
max-height: 97px; max-height: 97px;
} }
} }
} }

View File

@ -1,333 +1,333 @@
// This file is just a butchered version fo the one included in the default Octopress theme. // // This file is just a butchered version fo the one included in the default Octopress theme.
// It could most definitely do with some cleaning up in the future. // // It could most definitely do with some cleaning up in the future.
@mixin selection($bg, $color: inherit, $text-shadow: none){ // @mixin selection($bg, $color: inherit, $text-shadow: none){
* { // * {
&::-moz-selection { background: $bg; color: $color; text-shadow: $text-shadow; } // &::-moz-selection { background: $bg; color: $color; text-shadow: $text-shadow; }
&::-webkit-selection { background: $bg; color: $color; text-shadow: $text-shadow; } // &::-webkit-selection { background: $bg; color: $color; text-shadow: $text-shadow; }
&::selection { background: $bg; color: $color; text-shadow: $text-shadow; } // &::selection { background: $bg; color: $color; text-shadow: $text-shadow; }
} // }
} // }
$base03: #002b36 !default; //darkest blue // $base03: #002b36 !default; //darkest blue
$base02: #073642 !default; //dark blue // $base02: #073642 !default; //dark blue
$base01: #586e75 !default; //darkest gray // $base01: #586e75 !default; //darkest gray
$base00: #657b83 !default; //dark gray // $base00: #657b83 !default; //dark gray
$base0: #839496 !default; //medium gray // $base0: #839496 !default; //medium gray
$base1: #93a1a1 !default; //medium light gray // $base1: #93a1a1 !default; //medium light gray
$base2: #eee8d5 !default; //cream // $base2: #eee8d5 !default; //cream
$base3: #fdf6e3 !default; //white // $base3: #fdf6e3 !default; //white
$solar-yellow: #b58900 !default; // $solar-yellow: #b58900 !default;
$solar-orange: #cb4b16 !default; // $solar-orange: #cb4b16 !default;
$solar-red: #dc322f !default; // $solar-red: #dc322f !default;
$solar-magenta: #d33682 !default; // $solar-magenta: #d33682 !default;
$solar-violet: #6c71c4 !default; // $solar-violet: #6c71c4 !default;
$solar-blue: #268bd2 !default; // $solar-blue: #268bd2 !default;
$solar-cyan: #2aa198 !default; // $solar-cyan: #2aa198 !default;
$solar-green: #859900 !default; // $solar-green: #859900 !default;
$solarized: dark !default; // $solarized: dark !default;
@if $solarized == light { // @if $solarized == light {
$_base03: $base03; // $_base03: $base03;
$_base02: $base02; // $_base02: $base02;
$_base01: $base01; // $_base01: $base01;
$_base00: $base00; // $_base00: $base00;
$_base0: $base0; // $_base0: $base0;
$_base1: $base1; // $_base1: $base1;
$_base2: $base2; // $_base2: $base2;
$_base3: $base3; // $_base3: $base3;
$base03: $_base3; // $base03: $_base3;
$base02: $_base2; // $base02: $_base2;
$base01: $_base1; // $base01: $_base1;
$base00: $_base0; // $base00: $_base0;
$base0: $_base00; // $base0: $_base00;
$base1: $_base01; // $base1: $_base01;
$base2: $_base02; // $base2: $_base02;
$base3: $_base03; // $base3: $_base03;
} // }
/* non highlighted code colors */ // /* non highlighted code colors */
$pre-bg: $base03 !default; // $pre-bg: $base03 !default;
$pre-border: darken($base02, 5) !default; // $pre-border: darken($base02, 5) !default;
$pre-color: $base1 !default; // $pre-color: $base1 !default;
$noise-bg: image-url('noise.png') top left !default; // $noise-bg: image-url('noise.png') top left !default;
$sans: "Helvetica Neue", Arial, sans-serif !default; // $sans: "Helvetica Neue", Arial, sans-serif !default;
$mono: Menlo, Monaco, "Andale Mono", "lucida console", "Courier New", monospace !default; // $mono: Menlo, Monaco, "Andale Mono", "lucida console", "Courier New", monospace !default;
.sans { font-family: $sans; } // .sans { font-family: $sans; }
.mono { font-family: $mono; } // .mono { font-family: $mono; }
.highlight { // .highlight {
table {margin-bottom: 0;} // table {margin-bottom: 0;}
.gutter, .code { // .gutter, .code {
padding: 0; // padding: 0;
} // }
.gutter { // .gutter {
.line-number { // .line-number {
display: block; // display: block;
} // }
} // }
} // }
.highlight, html .gist .gist-file .gist-syntax .gist-highlight { // .highlight, html .gist .gist-file .gist-syntax .gist-highlight {
table td.code { width: 100%; } // table td.code { width: 100%; }
border: 1px solid $pre-border !important; // border: 1px solid $pre-border !important;
} // }
.highlight .line-numbers, html .gist .gist-file .gist-syntax .highlight .line_numbers { // .highlight .line-numbers, html .gist .gist-file .gist-syntax .highlight .line_numbers {
text-align: right; // text-align: right;
font-size: 13px; // font-size: 13px;
line-height: 1.45em; // line-height: 1.45em;
@if $solarized == light { // @if $solarized == light {
background: lighten($base03, 1) $noise-bg !important; // background: lighten($base03, 1) $noise-bg !important;
border-right: 1px solid darken($base02, 2) !important; // border-right: 1px solid darken($base02, 2) !important;
@include box-shadow(lighten($base03, 2) -1px 0 inset); // @include box-shadow(lighten($base03, 2) -1px 0 inset);
text-shadow: lighten($base02, 2) 0 -1px; // text-shadow: lighten($base02, 2) 0 -1px;
} @else { // } @else {
background: $base02 $noise-bg !important; // background: $base02 $noise-bg !important;
border-right: 1px solid darken($base03, 2) !important; // border-right: 1px solid darken($base03, 2) !important;
@include box-shadow(lighten($base02, 2) -1px 0 inset); // @include box-shadow(lighten($base02, 2) -1px 0 inset);
text-shadow: darken($base02, 10) 0 -1px; // text-shadow: darken($base02, 10) 0 -1px;
} // }
span { color: $base01 !important; } // span { color: $base01 !important; }
padding: .8em !important; // padding: .8em !important;
@include border-radius(0); // @include border-radius(0);
} // }
figure.code, .gist-file, pre { // figure.code, .gist-file, pre {
@include box-shadow(rgba(#000, .06) 0 0 10px); // @include box-shadow(rgba(#000, .06) 0 0 10px);
.highlight pre { @include box-shadow(none); } // .highlight pre { @include box-shadow(none); }
} // }
.gist .highlight, figure.code .highlight { // .gist .highlight, figure.code .highlight {
@include selection(adjust-color($base03, $lightness: 23%, $saturation: -65%), $text-shadow: $base03 0 1px); // @include selection(adjust-color($base03, $lightness: 23%, $saturation: -65%), $text-shadow: $base03 0 1px);
} // }
html .gist .gist-file { // html .gist .gist-file {
margin-bottom: 1.8em; // margin-bottom: 1.8em;
position: relative; // position: relative;
border: none; // border: none;
padding-top: image-height("code_bg.png") !important; // padding-top: image-height("code_bg.png") !important;
.highlight { // .highlight {
margin-bottom: 0; // margin-bottom: 0;
} // }
.gist-syntax { // .gist-syntax {
border-bottom: 0 !important; // border-bottom: 0 !important;
background: none !important; // background: none !important;
.gist-highlight { // .gist-highlight {
background: $base03 !important; // background: $base03 !important;
} // }
.highlight pre { // .highlight pre {
@extend .pre-code; // @extend .pre-code;
padding: 0; // padding: 0;
} // }
} // }
.gist-meta { // .gist-meta {
padding: .6em 0.8em; // padding: .6em 0.8em;
border: 1px solid lighten($base02, 2) !important; // border: 1px solid lighten($base02, 2) !important;
color: $base01; // color: $base01;
font-size: .7em !important; // font-size: .7em !important;
@if $solarized == light { // @if $solarized == light {
background: lighten($base03, 2) $noise-bg; // background: lighten($base03, 2) $noise-bg;
border: 1px solid $pre-border !important; // border: 1px solid $pre-border !important;
border-top: 1px solid lighten($base03, 2) !important; // border-top: 1px solid lighten($base03, 2) !important;
} @else { // } @else {
background: $base02 $noise-bg; // background: $base02 $noise-bg;
} // }
@extend .sans; // @extend .sans;
line-height: 1.5em; // line-height: 1.5em;
a { // a {
color: mix($base1, $base01) !important; // color: mix($base1, $base01) !important;
&:hover { color: $base1 !important; } // &:hover { color: $base1 !important; }
} // }
a[href*='#file'] { // a[href*='#file'] {
position: absolute; top: 0; left:0; right:-10px; // position: absolute; top: 0; left:0; right:-10px;
color: #474747 !important; // color: #474747 !important;
@extend .code-title; // @extend .code-title;
&:hover { color: $link-color !important; } // &:hover { color: $link-color !important; }
} // }
a[href*=raw]{ // a[href*=raw]{
@extend .download-source; // @extend .download-source;
top: .4em; // top: .4em;
} // }
} // }
} // }
pre { // pre {
background: $pre-bg $noise-bg; // background: $pre-bg $noise-bg;
@include border-radius(.4em); // @include border-radius(.4em);
@extend .mono; // @extend .mono;
border: 1px solid $pre-border; // border: 1px solid $pre-border;
line-height: 1.45em; // line-height: 1.45em;
font-size: 13px; // font-size: 13px;
margin-bottom: 2.1em; // margin-bottom: 2.1em;
padding: .8em 1em; // padding: .8em 1em;
color: $pre-color; // color: $pre-color;
overflow: auto; // overflow: auto;
} // }
h3.filename { // h3.filename {
@extend .code-title; // @extend .code-title;
+ pre { @include border-radius(0px); } // + pre { @include border-radius(0px); }
} // }
p, li { // p, li {
code { // code {
@extend .mono; // @extend .mono;
display: inline-block; // display: inline-block;
white-space: no-wrap; // white-space: no-wrap;
background: #fff; // background: #fff;
font-size: .8em; // font-size: .8em;
line-height: 1.5em; // line-height: 1.5em;
color: #555; // color: #555;
border: 1px solid #ddd; // border: 1px solid #ddd;
@include border-radius(.4em); // @include border-radius(.4em);
padding: 0 .3em; // padding: 0 .3em;
margin: -1px 0; // margin: -1px 0;
} // }
pre code { font-size: 1em !important; background: none; border: none; } // pre code { font-size: 1em !important; background: none; border: none; }
} // }
.pre-code { // .pre-code {
font-family: $mono !important; // font-family: $mono !important;
overflow: scroll; // overflow: scroll;
overflow-y: hidden; // overflow-y: hidden;
display: block; // display: block;
padding: .8em; // padding: .8em;
overflow-x: auto; // overflow-x: auto;
line-height: 1.45em; // line-height: 1.45em;
background: $base03 $noise-bg !important; // background: $base03 $noise-bg !important;
color: $base1 !important; // color: $base1 !important;
span { color: $base1 !important; } // span { color: $base1 !important; }
span { font-style: normal !important; font-weight: normal !important; } // span { font-style: normal !important; font-weight: normal !important; }
.c { color: $base01 !important; font-style: italic !important; } /* Comment */ // .c { color: $base01 !important; font-style: italic !important; } /* Comment */
.cm { color: $base01 !important; font-style: italic !important; } /* Comment.Multiline */ // .cm { color: $base01 !important; font-style: italic !important; } /* Comment.Multiline */
.cp { color: $base01 !important; font-style: italic !important; } /* Comment.Preproc */ // .cp { color: $base01 !important; font-style: italic !important; } /* Comment.Preproc */
.c1 { color: $base01 !important; font-style: italic !important; } /* Comment.Single */ // .c1 { color: $base01 !important; font-style: italic !important; } /* Comment.Single */
.cs { color: $base01 !important; font-weight: bold !important; font-style: italic !important; } /* Comment.Special */ // .cs { color: $base01 !important; font-weight: bold !important; font-style: italic !important; } /* Comment.Special */
.err { color: $solar-red !important; background: none !important; } /* Error */ // .err { color: $solar-red !important; background: none !important; } /* Error */
.k { color: $solar-orange !important; } /* Keyword */ // .k { color: $solar-orange !important; } /* Keyword */
.o { color: $base1 !important; font-weight: bold !important; } /* Operator */ // .o { color: $base1 !important; font-weight: bold !important; } /* Operator */
.p { color: $base1 !important; } /* Operator */ // .p { color: $base1 !important; } /* Operator */
.ow { color: $solar-cyan !important; font-weight: bold !important; } /* Operator.Word */ // .ow { color: $solar-cyan !important; font-weight: bold !important; } /* Operator.Word */
.gd { color: $base1 !important; background-color: mix($solar-red, $base03, 25%) !important; display: inline-block; } /* Generic.Deleted */ // .gd { color: $base1 !important; background-color: mix($solar-red, $base03, 25%) !important; display: inline-block; } /* Generic.Deleted */
.gd .x { color: $base1 !important; background-color: mix($solar-red, $base03, 35%) !important; display: inline-block; } /* Generic.Deleted.Specific */ // .gd .x { color: $base1 !important; background-color: mix($solar-red, $base03, 35%) !important; display: inline-block; } /* Generic.Deleted.Specific */
.ge { color: $base1 !important; font-style: italic !important; } /* Generic.Emph */ // .ge { color: $base1 !important; font-style: italic !important; } /* Generic.Emph */
//.gr { color: #aa0000 } /* Generic.Error */ // //.gr { color: #aa0000 } /* Generic.Error */
.gh { color: $base01 !important; } /* Generic.Heading */ // .gh { color: $base01 !important; } /* Generic.Heading */
.gi { color: $base1 !important; background-color: mix($solar-green, $base03, 20%) !important; display: inline-block; } /* Generic.Inserted */ // .gi { color: $base1 !important; background-color: mix($solar-green, $base03, 20%) !important; display: inline-block; } /* Generic.Inserted */
.gi .x { color: $base1 !important; background-color: mix($solar-green, $base03, 40%) !important; display: inline-block; } /* Generic.Inserted.Specific */ // .gi .x { color: $base1 !important; background-color: mix($solar-green, $base03, 40%) !important; display: inline-block; } /* Generic.Inserted.Specific */
//.go { color: #888888 } /* Generic.Output */ // //.go { color: #888888 } /* Generic.Output */
//.gp { color: #555555 } /* Generic.Prompt */ // //.gp { color: #555555 } /* Generic.Prompt */
.gs { color: $base1 !important; font-weight: bold !important; } /* Generic.Strong */ // .gs { color: $base1 !important; font-weight: bold !important; } /* Generic.Strong */
.gu { color: $solar-violet !important; } /* Generic.Subheading */ // .gu { color: $solar-violet !important; } /* Generic.Subheading */
//.gt { color: #aa0000 } /* Generic.Traceback */ // //.gt { color: #aa0000 } /* Generic.Traceback */
.kc { color: $solar-green !important; font-weight: bold !important; } /* Keyword.Constant */ // .kc { color: $solar-green !important; font-weight: bold !important; } /* Keyword.Constant */
.kd { color: $solar-blue !important; } /* Keyword.Declaration */ // .kd { color: $solar-blue !important; } /* Keyword.Declaration */
.kp { color: $solar-orange !important; font-weight: bold !important; } /* Keyword.Pseudo */ // .kp { color: $solar-orange !important; font-weight: bold !important; } /* Keyword.Pseudo */
.kr { color: $solar-magenta !important; font-weight: bold !important; } /* Keyword.Reserved */ // .kr { color: $solar-magenta !important; font-weight: bold !important; } /* Keyword.Reserved */
.kt { color: $solar-cyan !important; } /* Keyword.Type */ // .kt { color: $solar-cyan !important; } /* Keyword.Type */
.n { color: $solar-blue !important; } // .n { color: $solar-blue !important; }
.na { color: $solar-blue !important; } /* Name.Attribute */ // .na { color: $solar-blue !important; } /* Name.Attribute */
.nb { color: $solar-green !important; } /* Name.Builtin */ // .nb { color: $solar-green !important; } /* Name.Builtin */
.nc { color: $solar-magenta !important;} /* Name.Class */ // .nc { color: $solar-magenta !important;} /* Name.Class */
.no { color: $solar-yellow !important; } /* Name.Constant */ // .no { color: $solar-yellow !important; } /* Name.Constant */
//.ni { color: #800080 } /* Name.Entity */ // //.ni { color: #800080 } /* Name.Entity */
.nl { color: $solar-green !important; } // .nl { color: $solar-green !important; }
.ne { color: $solar-blue !important; font-weight: bold !important; } /* Name.Exception */ // .ne { color: $solar-blue !important; font-weight: bold !important; } /* Name.Exception */
.nf { color: $solar-blue !important; font-weight: bold !important; } /* Name.Function */ // .nf { color: $solar-blue !important; font-weight: bold !important; } /* Name.Function */
.nn { color: $solar-yellow !important; } /* Name.Namespace */ // .nn { color: $solar-yellow !important; } /* Name.Namespace */
.nt { color: $solar-blue !important; font-weight: bold !important; } /* Name.Tag */ // .nt { color: $solar-blue !important; font-weight: bold !important; } /* Name.Tag */
.nx { color: $solar-yellow !Important; } // .nx { color: $solar-yellow !Important; }
//.bp { color: #999999 } /* Name.Builtin.Pseudo */ // //.bp { color: #999999 } /* Name.Builtin.Pseudo */
//.vc { color: #008080 } /* Name.Variable.Class */ // //.vc { color: #008080 } /* Name.Variable.Class */
.vg { color: $solar-blue !important; } /* Name.Variable.Global */ // .vg { color: $solar-blue !important; } /* Name.Variable.Global */
.vi { color: $solar-blue !important; } /* Name.Variable.Instance */ // .vi { color: $solar-blue !important; } /* Name.Variable.Instance */
.nv { color: $solar-blue !important; } /* Name.Variable */ // .nv { color: $solar-blue !important; } /* Name.Variable */
//.w { color: #bbbbbb } /* Text.Whitespace */ // //.w { color: #bbbbbb } /* Text.Whitespace */
.mf { color: $solar-cyan !important; } /* Literal.Number.Float */ // .mf { color: $solar-cyan !important; } /* Literal.Number.Float */
.m { color: $solar-cyan !important; } /* Literal.Number */ // .m { color: $solar-cyan !important; } /* Literal.Number */
.mh { color: $solar-cyan !important; } /* Literal.Number.Hex */ // .mh { color: $solar-cyan !important; } /* Literal.Number.Hex */
.mi { color: $solar-cyan !important; } /* Literal.Number.Integer */ // .mi { color: $solar-cyan !important; } /* Literal.Number.Integer */
//.mo { color: #009999 } /* Literal.Number.Oct */ // //.mo { color: #009999 } /* Literal.Number.Oct */
.s { color: $solar-cyan !important; } /* Literal.String */ // .s { color: $solar-cyan !important; } /* Literal.String */
//.sb { color: #d14 } /* Literal.String.Backtick */ // //.sb { color: #d14 } /* Literal.String.Backtick */
//.sc { color: #d14 } /* Literal.String.Char */ // //.sc { color: #d14 } /* Literal.String.Char */
.sd { color: $solar-cyan !important; } /* Literal.String.Doc */ // .sd { color: $solar-cyan !important; } /* Literal.String.Doc */
.s2 { color: $solar-cyan !important; } /* Literal.String.Double */ // .s2 { color: $solar-cyan !important; } /* Literal.String.Double */
.se { color: $solar-red !important; } /* Literal.String.Escape */ // .se { color: $solar-red !important; } /* Literal.String.Escape */
//.sh { color: #d14 } /* Literal.String.Heredoc */ // //.sh { color: #d14 } /* Literal.String.Heredoc */
.si { color: $solar-blue !important; } /* Literal.String.Interpol */ // .si { color: $solar-blue !important; } /* Literal.String.Interpol */
//.sx { color: #d14 } /* Literal.String.Other */ // //.sx { color: #d14 } /* Literal.String.Other */
.sr { color: $solar-cyan !important; } /* Literal.String.Regex */ // .sr { color: $solar-cyan !important; } /* Literal.String.Regex */
.s1 { color: $solar-cyan !important; } /* Literal.String.Single */ // .s1 { color: $solar-cyan !important; } /* Literal.String.Single */
//.ss { color: #990073 } /* Literal.String.Symbol */ // //.ss { color: #990073 } /* Literal.String.Symbol */
//.il { color: #009999 } /* Literal.Number.Integer.Long */ // //.il { color: #009999 } /* Literal.Number.Integer.Long */
div { .gd, .gd .x, .gi, .gi .x { display: inline-block; width: 100%; }} // div { .gd, .gd .x, .gi, .gi .x { display: inline-block; width: 100%; }}
} // }
.highlight, .gist-highlight { // .highlight, .gist-highlight {
pre { background: none; @include border-radius(0px); border: none; padding: 0; margin-bottom: 0; } // pre { background: none; @include border-radius(0px); border: none; padding: 0; margin-bottom: 0; }
margin-bottom: 1.8em; // margin-bottom: 1.8em;
background: $base03; // background: $base03;
overflow-y: hidden; // overflow-y: hidden;
overflow-x: auto; // overflow-x: auto;
} // }
$solar-scroll-bg: rgba(#fff, .15); // $solar-scroll-bg: rgba(#fff, .15);
$solar-scroll-thumb: rgba(#fff, .2); // $solar-scroll-thumb: rgba(#fff, .2);
@if $solarized == light { // @if $solarized == light {
$solar-scroll-bg: rgba(#000, .15); // $solar-scroll-bg: rgba(#000, .15);
$solar-scroll-thumb: rgba(#000, .15); // $solar-scroll-thumb: rgba(#000, .15);
} // }
pre, .highlight, .gist-highlight { // pre, .highlight, .gist-highlight {
&::-webkit-scrollbar { height: .5em; background: $solar-scroll-bg; } // &::-webkit-scrollbar { height: .5em; background: $solar-scroll-bg; }
&::-webkit-scrollbar-thumb:horizontal { background: $solar-scroll-thumb; -webkit-border-radius: 4px; border-radius: 4px } // &::-webkit-scrollbar-thumb:horizontal { background: $solar-scroll-thumb; -webkit-border-radius: 4px; border-radius: 4px }
} // }
.highlight code { // .highlight code {
@extend .pre-code; background: #000; // @extend .pre-code; background: #000;
} // }
figure.code { // figure.code {
background: none; // background: none;
padding: 0; // padding: 0;
border: 0; // border: 0;
margin-bottom: 1.5em; // margin-bottom: 1.5em;
pre { margin-bottom: 0; } // pre { margin-bottom: 0; }
figcaption { // figcaption {
position: relative; // position: relative;
@extend .code-title; // @extend .code-title;
a { @extend .download-source; } // a { @extend .download-source; }
} // }
.highlight { // .highlight {
margin-bottom: 0; // margin-bottom: 0;
} // }
} // }
.code-title { // .code-title {
text-align: center; // text-align: center;
font-size: 13px; // font-size: 13px;
line-height: 2em; // line-height: 2em;
text-shadow: #cbcccc 0 1px 0; // text-shadow: #cbcccc 0 1px 0;
color: #474747; // color: #474747;
font-weight: normal; // font-weight: normal;
margin-bottom: 0; // margin-bottom: 0;
@include border-radius(5px 5px 0 0); // @include border-radius(5px 5px 0 0);
font-family: "Helvetica Neue", Arial, "Lucida Grande", "Lucida Sans Unicode", Lucida, sans-serif; // font-family: "Helvetica Neue", Arial, "Lucida Grande", "Lucida Sans Unicode", Lucida, sans-serif;
background: #aaaaaa image-url("code_bg.png") top repeat-x; // background: #aaaaaa image-url("code_bg.png") top repeat-x;
border: 1px solid #565656; // border: 1px solid #565656;
border-top-color: #cbcbcb; // border-top-color: #cbcbcb;
border-left-color: #a5a5a5; // border-left-color: #a5a5a5;
border-right-color: #a5a5a5; // border-right-color: #a5a5a5;
border-bottom: 0; // border-bottom: 0;
} // }
.download-source { // .download-source {
position: absolute; right: .8em; // position: absolute; right: .8em;
color: #666 !important; // color: #666 !important;
z-index: 1; // z-index: 1;
font-size: 13px; // font-size: 13px;
text-shadow: #cbcccc 0 1px 0; // text-shadow: #cbcccc 0 1px 0;
padding-left: 3em; // padding-left: 3em;
} // }

View File

@ -1,2 +1,3 @@
@import 'oscailte/oscailte'; @import 'oscailte/oscailte';
@import 'custom/paulus'; @import 'custom/paulus';
@import 'custom/coderay';