Switch to Roboto Mono for code

This commit is contained in:
Ryan Watters
2017-02-27 20:22:40 -06:00
parent cc6aef2731
commit be081676e6
81 changed files with 64 additions and 50 deletions
-2
View File
@@ -108,8 +108,6 @@ Bloggers often want to include GitHub gists when writing posts. Let's suppose we
https://gist.github.com/spf13/7896402
```
###
We can embed the gist in our content via username and gist ID pulled from the URL:
```golang
+2
View File
@@ -2,5 +2,7 @@
{{$icon := index (split $file ".") 1 }}
<div class="code-copy" id="{{$file | urlize}}">
<div class="code-copy-header output"><div class="action-buttons"></div><span class="filename" title="{{$file}}">{{$file}}</span><i class="icon-{{$icon}}"></i></div>
<div class="code-copy-content output-content">
{{- .Inner -}}
</div>
</div>
View File
+1 -1
View File
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+16 -23
View File
@@ -35,30 +35,23 @@ $output-example-color:$hugo-blue;
$body-bg-color:$hugo-white;
//Typography
$base-font-size: 18px;
$base-font-family: 'muli',
$helvetica;
$heading-font-family: $base-font-family;
$base-font-color: #222222;
$base-line-height-content: 1.6;
$base-font-bold-color: $base-font-color;
$systemfonts: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbols";
// Font Families
$base-font-family: 'muli',$helvetica;
$heading-font-family: $base-font-family;
$code-font-family:'robotomono',courier,monospace;
// Font Weights
$base-font-weight: 300;
$base-font-bold-weight: 600;
$base-font-bold-color: $base-font-color;
$heading-font-weight: 800;
$systemfonts: -apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
Oxygen,
Ubuntu,
Cantarell,
"Fira Sans",
"Droid Sans",
"Helvetica Neue",
Arial,
sans-serif,
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbols";
$heading-font-weight: 600;
$code-font-base-weight: $base-font-weight;
$code-font-bold-weight: 500;
//Anchors (in body copy)
$default-anchor-color:$base-font-color;
$default-anchor-underline-color:$hugo-pink;
@@ -69,9 +62,9 @@ $base-button-color: $hugo-blue;
$base-button-text-color: $hugo-white;
$button-border-radius: .25em;
//Codeblocks
$code-font-family:'courierprime',
courier,
monospace;
// $code-font-family:'courierprime',courier,monospace;
$code-tooltip-bg-color: $hugo-pink;
$code-block-base-font-color: #ffffff;
$code-block-background-color: $hugo-black;
@@ -23,10 +23,10 @@ body {
}
body {
font-size: 90%;
font-size: 93%;
overflow-x:hidden;
@include MQ(M) {
font-size: 95%;
font-size: 97%;
}
@include MQ(L) {
font-size: 100%;
@@ -1,15 +1,17 @@
@include fonts('muli', $weights: 100 300 400 600 700 800, $italic: true);
@include fonts('courierprime', $weights: 400 700, $italic: true);
@include fonts('robotomono', $weights: 200 300 400 500 700, $italic: false);
h1,
h2,
h3,
h4 {
h4,
h5,
h6 {
font-family: $heading-font-family;
font-weight: $heading-font-weight;
margin: 0px;
line-height: 1.4;
position: relative;
> code {
> code, > a {
font-weight: $heading-font-weight;
}
}
@@ -35,8 +37,9 @@ h1.page-title {
margin-left: -.15em;
margin-right: .15em;
}
&.commands,&.functions {
font-family:$code-font-family;
&.commands,
&.functions {
font-family: $code-font-family;
}
}
@@ -71,13 +74,14 @@ h4 {
h5 {
font-size: 1em;
font-weight: bold;
font-weight: $heading-font-weight;
margin-bottom: 1em;
color:$base-font-color;
color: $base-font-color;
}
//used throughout the "functions" section to render titles in the base code font family
.functions, .commands {
.functions,
.commands {
font-family: $code-font-family;
font-weight: $base-font-weight;
color: inherit;
@@ -85,7 +89,8 @@ h5 {
//just for function section page titles that include the word "and":
//in templates, a conditional statement checks for section=functions, and if so, replaces "and" in title/linktitle with <em>and</em>
.functions, .commands {
.functions,
.commands {
> em {
font-style: normal;
font-family: $base-font-family;
@@ -1,6 +1,6 @@
a {
color: $default-anchor-underline-color;
font-weight: $default-anchor-weight;
font-weight: inherit;
@include on-event($self: true) {
text-decoration: none;
cursor: pointer;
@@ -3,7 +3,8 @@ code,
pre {
font-family: $code-font-family;
margin: 0px;
color: $inline-code-text-color;
font-weight:$code-font-base-weight;
color:inherit;
}
.body-copy > pre {
@@ -31,23 +32,27 @@ pre {
td,
li {
code {
font-size: .9em;
font-size: .85em;
display: inline-block;
color: $inline-code-text-color;
font-family: $code-font-family;
color: inherit;
font-family: "robotomono", courier, monospace;
padding-left: .25em;
padding-right: .25em;
text-transform: none;
line-height: 1.2;
margin-bottom: .15em;
margin-top: 0px;
padding-top: .1em;
vertical-align: bottom;
//darken code background color for non-retina displays
background-color: darken($inline-code-background-color, 5%);
padding-top: 3px;
vertical-align: middle;
background-color: #ededed;
border: none;
outline: none;
z-index: -1;
padding-bottom: 3px;
border: none;
outline: none;
z-index: -1;
background-color: darken($inline-code-background-color, 5%);
@include MQ(retina) {
//lighten code background color for retina displays
background-color: $inline-code-background-color;
@@ -91,6 +96,12 @@ div.code-copy {
&.input {
padding-bottom: 24px;
}
.code-copy-content {
padding-top:.5em;
&.output-content {
padding-bottom:.5em;
}
}
}
p + .code-copy {
@@ -118,7 +129,7 @@ button.download-button {
height: 1.5em;
border-width: 0px;
border-radius: 0px;
font-weight: bold;
font-weight: $code-font-bold-weight;
color: $code-copy-button-text-color;
font-size: 14px;
width: 80px;
@@ -137,6 +148,13 @@ button.download-button {
position: absolute;
}
}
h1,h2,h3,h4,h5,h6 {
code {
font-weight: $code-font-bold-weight;
font-size:.95em;
}
}
//hide copy button on iPad and iPhone
button.copy-button {
@include MQ(retinaPortrait) {
@@ -203,8 +221,6 @@ button.copy-button {
}
}
div.code-copy {
position: relative;
@include card(3);