Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.sass-cache
.gist-cache
.pygments-cache
.code-highlighter-cache
_deploy
public
sass.old
Expand Down
2 changes: 1 addition & 1 deletion .themes/classic/sass/_base.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "base/utilities";
@import "base/solarized";
@import "base/solarized/index";
@import "base/theme";
@import "base/typography";
@import "base/layout";
1 change: 0 additions & 1 deletion .themes/classic/sass/_partials.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
@import "partials/navigation";
@import "partials/blog";
@import "partials/sharing";
@import "partials/syntax";
@import "partials/archive";
@import "partials/sidebar";
@import "partials/footer";
145 changes: 145 additions & 0 deletions .themes/classic/sass/base/solarized/_code-highlight.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
.code-highlight {
@include octopress-highlight-style;
@include octopress-solarized-code;
}

.code-highlight-figure {
margin: 1.8em 0;
font-size: 14px;
* { box-sizing: border-box; }
}

.code-highlight-pre {
background: darken($base03, 1);
width: 100%;
margin-bottom: 0;
display: table;
}

.code-highlight-row {
display: table-row;
width: 100%;
}

.code-highlight-row {
&:before, .code-highlight-line {
padding: {left: $pre-line-padding + .8; right: $pre-line-padding + .8 }
}
&:first-child {
&:before, .code-highlight-line { padding-top: $pre-line-padding; }
}
&:last-child {
&:before, .code-highlight-line { padding-bottom: $pre-line-padding; }
}
&.numbered {
&:before, .code-highlight-line {
padding: {left: $pre-line-padding; right: $pre-line-padding }
}
&:before {
display: table-cell;
content: attr(data-line);
min-width: 1.2em;
color: $base01;
text-align: right;
line-height: 1.45em;
@if $solarized == light {
background: lighten($base03, 1);
border-right: 1px solid darken($base02, 2);
text-shadow: lighten($base02, 2) 0 -1px;
} @else {
background: $base02;
border-right: 1px solid darken($base03, 2);
box-shadow: lighten($base02, 2) -1px 0 inset;
text-shadow: darken($base02, 10) 0 -1px;
}
}
}
}

.code-highlight-line {
display: table-cell;
width: 100%;
position: relative;
z-index: 1;
}

.marked-line {
position: relative;
&.unnumbered {
}
.code-highlight-line {
&:before {
content: "";
position: absolute;
background: $marker-bg;
left: 0; top: 0; bottom: 0; right: 0;
border-right: 1px solid $marker-border;
}
}
&.unnumbered .code-highlight-line:before {
border-left: 3px solid $marker-border-left;
}
&.numbered:before {
background: $marker-bg;
border-left: 3px solid $marker-border-left;
border-right-color: darken($marker-bg, 20);
}
}

.start-marked-line {
&:before, .code-highlight-line:before {
border-top: 1px solid $marker-border;
}
}
.end-marked-line {
&:before, .code-highlight-line:before {
border-bottom: 1px solid $marker-border;
}
}

.code-highlight-table {
margin-bottom: 0;
background: $base03;
pre {
padding: .8em;
background: none;
border-radius: 0;
border: none;
margin-bottom: 0;
}
}

.code-highlight-figure {
margin: {left: 0; right: 0;}
background: none;
padding: 0;
border: 0;
pre { margin: { top: 0; bottom: 0; } }
}

.code-highlight-caption {
position: relative;
text-align: center;
line-height: 2em;
text-shadow: #fff 0 1px 0;
color: #474747;
font-weight: normal;
margin-bottom: 0;
background-color: #ccc;
background-image: linear-gradient(#ffffff, #f0f0f0 6%, #e5e5e5 90%, #e5e5e5);
border-top-left-radius: 5px;
border-top-right-radius: 5px;
font-family: "Helvetica Neue", Arial, "Lucida Grande", "Lucida Sans Unicode", Lucida, sans-serif;
border: 1px solid #cbcbcb;
+ .code-highlight { border-top: 0; }
}

.code-highlight-caption-link {
position: absolute; right: .8em;
color: #666;
z-index: 1;
text-shadow: #cbcccc 0 1px 0;
padding-left: 3em;
}


113 changes: 113 additions & 0 deletions .themes/classic/sass/base/solarized/_code-style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
$pre-line-padding: .8em !default;

%octopress-diff-bg {
content: "";
position: absolute;
z-index: -1;
left: 0; right: 0; top: 0; bottom: 0;
}

@mixin octopress-diff-bg($bg) {
&:after {
background: $bg;
@extend %octopress-diff-bg;
}
}

@mixin octopress-highlight-style {
border: 1px solid $code-highlight-border;
background: $pre-bg;
color: $base1;

span { color: $base1; }
span { font-style: normal; font-weight: normal; }

overflow: scroll;
overflow-y: hidden;
overflow-x: auto;
line-height: 1.45em;
}

@mixin octopress-solarized-code {
.c { color: $base01; font-style: italic; } /* Comment */
.cm { color: $base01; font-style: italic; } /* Comment.Multiline */
.cp { color: $base01; font-style: italic; } /* Comment.Preproc */
.c1 { color: $base01; font-style: italic; } /* Comment.Single */
.cs { /* Comment.Special */
color: $base01;
font-weight: bold;
font-style: italic; }
.err { color: $solar-red; background: none; } /* Error */
.k { color: $solar-orange; } /* Keyword */
.o { color: $base1; font-weight: bold; } /* Operator */
.p { color: $base1; } /* Operator */
.ow { color: $solar-cyan; font-weight: bold; } /* Operator.Word */
.gd {
color: $base1; /* Generic.Deleted */
@include octopress-diff-bg(mix($solar-red, $base03, 25%));
}
.gd .x { /* Generic.Deleted.Specific */
color: $base1;
@include octopress-diff-bg(mix($solar-red, $base03, 35%));
}
.ge { /* Generic.Emph */
color: $base1;
font-style: italic; }
//.gr { color: #aa0000 } /* Generic.Error */
.gh { color: $base01; } /* Generic.Heading */
.gi { /* Generic.Inserted */
color: $base1;
@include octopress-diff-bg(mix($solar-green, $base03, 20%));
}
.gi .x { /* Generic.Inserted.Specific */
color: $base1;
@include octopress-diff-bg(mix($solar-green, $base03, 40%));
}
//.go { color: #888888 } /* Generic.Output */
//.gp { color: #555555 } /* Generic.Prompt */
.gs { color: $base1; font-weight: bold; } /* Generic.Strong */
.gu { color: $solar-violet; } /* Generic.Subheading */
//.gt { color: #aa0000 } /* Generic.Traceback */
.kc { color: $solar-green; font-weight: bold; } /* Keyword.Constant */
.kd { color: $solar-blue; } /* Keyword.Declaration */
.kp { color: $solar-orange; font-weight: bold; } /* Keyword.Pseudo */
.kr { color: $solar-magenta; font-weight: bold; } /* Keyword.Reserved */
.kt { color: $solar-cyan; } /* Keyword.Type */
.n { color: $solar-blue; }
.na { color: $solar-blue; } /* Name.Attribute */
.nb { color: $solar-green; } /* Name.Builtin */
.nc { color: $solar-magenta;} /* Name.Class */
.no { color: $solar-yellow; } /* Name.Constant */
//.ni { color: #800080 } /* Name.Entity */
.nl { color: $solar-green; }
.ne { color: $solar-blue; font-weight: bold; } /* Name.Exception */
.nf { color: $solar-blue; font-weight: bold; } /* Name.Function */
.nn { color: $solar-yellow; } /* Name.Namespace */
.nt { color: $solar-blue; font-weight: bold; } /* Name.Tag */
.nx { color: $solar-yellow; }
//.bp { color: #999999 } /* Name.Builtin.Pseudo */
//.vc { color: #008080 } /* Name.Variable.Class */
.vg { color: $solar-blue; } /* Name.Variable.Global */
.vi { color: $solar-blue; } /* Name.Variable.Instance */
.nv { color: $solar-blue; } /* Name.Variable */
//.w { color: #bbbbbb } /* Text.Whitespace */
.mf { color: $solar-cyan; } /* Literal.Number.Float */
.m { color: $solar-cyan; } /* Literal.Number */
.mh { color: $solar-cyan; } /* Literal.Number.Hex */
.mi { color: $solar-cyan; } /* Literal.Number.Integer */
//.mo { color: #009999 } /* Literal.Number.Oct */
.s { color: $solar-cyan; } /* Literal.String */
//.sb { color: #d14 } /* Literal.String.Backtick */
//.sc { color: #d14 } /* Literal.String.Char */
.sd { color: $solar-cyan; } /* Literal.String.Doc */
.s2 { color: $solar-cyan; } /* Literal.String.Double */
.se { color: $solar-red; } /* Literal.String.Escape */
//.sh { color: #d14 } /* Literal.String.Heredoc */
.si { color: $solar-blue; } /* Literal.String.Interpol */
//.sx { color: #d14 } /* Literal.String.Other */
.sr { color: $solar-cyan; } /* Literal.String.Regex */
.s1 { color: $solar-cyan; } /* Literal.String.Single */
//.ss { color: #990073 } /* Literal.String.Symbol */
//.il { color: #009999 } /* Literal.Number.Integer.Long */
}

5 changes: 5 additions & 0 deletions .themes/classic/sass/base/solarized/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$solarized: light !default;
@import 'solarized';
@import 'code-style';
@import 'code-highlight';
@import 'standard-code';
57 changes: 57 additions & 0 deletions .themes/classic/sass/base/solarized/_solarized.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
$base03: #002b36 !default; //darkest blue
$base02: #073642 !default; //dark blue
$base01: #586e75 !default; //darkest gray
$base00: #657b83 !default; //dark gray
$base0: #839496 !default; //medium gray
$base1: #93a1a1 !default; //medium light gray
$base2: #f2f2f2 !default; //very light gray
$base3: #ffffff !default; //white
$solar-yellow: #b58900 !default;
$solar-orange: #cb4b16 !default;
$solar-red: #dc322f !default;
$solar-magenta: #d33682 !default;
$solar-violet: #6c71c4 !default;
$solar-blue: #268bd2 !default;
$solar-cyan: #2aa198 !default;
$solar-green: #859900 !default;

$marker: rgba(#00baff, .5) !default;
$marker-bg: rgba($marker, .13) !default;
$marker-border: rgba($marker, .13) !default;
$marker-border-left: $marker !default;

$solarized: light !default;

$solar-scroll-bg: rgba(#fff, .15);
$solar-scroll-thumb: rgba(#fff, .2);

@if $solarized == light {

$_base03: $base03;
$_base02: $base02;
$_base01: $base01;
$_base00: $base00;
$_base0: $base0;
$_base1: $base1;
$_base2: $base2;
$_base3: $base3;

$base03: $_base3;
$base02: $_base2;
$base01: $_base1;
$base00: $_base0;
$base0: $_base00;
$base1: $_base01;
$base2: $_base02;
$base3: $_base03;

$solar-scroll-bg: rgba(#000, .15);
$solar-scroll-thumb: rgba(#000, .15);

$marker-bg: rgba($marker, .05);
}

$pre-bg: $base03 !default;
$pre-border: darken($base02, 5) !default;
$pre-color: $base1 !default;
$code-highlight-border: $pre-border;
14 changes: 14 additions & 0 deletions .themes/classic/sass/base/solarized/_standard-code.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.highlight pre,
pre:not(.code-highlight-pre) {
@include octopress-highlight-style;
padding: 1em .8rem;
border-radius: .4em;
margin: 1.8em 0;
@include octopress-solarized-code;
}

pre, pre code {
* { box-sizing: border-box; }
font-size: 13px;
font-family: "PT Mono", "Source Code Pro", Inconsolata-dz, Inconsolata, Menlo, Monaco, 'Andale Mono', 'lucida console', 'Courier New', monospace;
}
Loading