Skip to content

Commit 2ae27bf

Browse files
committed
Cheatsheet styling
1 parent f8c2786 commit 2ae27bf

19 files changed

+556
-94
lines changed

_includes/headertop.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313

1414
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
1515

16-
<!-- Custom stylesheet -->
16+
<!-- Custom stylesheet -->
1717
<link href="{{ site.baseurl }}/resources/css/unslider-dots.css" rel="stylesheet" type="text/css">
1818
<link href="{{ site.baseurl }}/resources/css/unslider.css" rel="stylesheet" type="text/css">
19-
<link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/solarized-dark.min.css" rel="stylesheet" type="text/css">
19+
<link rel="stylesheet" href="{{ site.baseurl }}/resources/css/highlightjs.css" type="text/css" />
2020
<link rel="stylesheet" href="{{ site.baseurl }}/resources/css/style.css" type="text/css" />
2121
<link rel="stylesheet" href="{{ site.baseurl }}/resources/css/vendor/codemirror.css" type="text/css" />
2222
<link rel="stylesheet" href="{{ site.baseurl }}/resources/css/vendor/monokai.css" type="text/css" />

_layouts/cheatsheet.html

+10-16
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
---
2-
layout: inner-page-no-masthead
2+
layout: inner-page-parent
33
---
44

5-
{% include cheatsheet-header.txt %}
6-
<div class="wrapper">
7-
<div class="bottom">
8-
<div class="container">
9-
<div class="row">
10-
<div class="span13">
11-
{{ content }}
12-
</div>
13-
14-
</div>
15-
16-
</div>
17-
</div>
18-
<div class="push"></div>
19-
</div>
5+
<section class="full-width">
6+
<div class="wrap">
7+
<div class="content-primary cheatsheet">
8+
<div class="inner-box">
9+
{{content}}
10+
</div>
11+
</div>
12+
</div>
13+
</section>

_sass/layout/cheatsheet.scss

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// CHEATSHEET
2+
//------------------------------------------------
3+
//------------------------------------------------
4+
5+
.content-primary.cheatsheet {
6+
code {
7+
font-family: 'Consolas';
8+
}
9+
10+
pre.highlight {
11+
margin: 0;
12+
code {
13+
padding: 0;
14+
background: #fff;
15+
border: 0;
16+
}
17+
}
18+
19+
.h2 {
20+
display: block;
21+
font-size: $font-size-h2;
22+
font-weight: $font-black;
23+
color: $gray-darker;
24+
padding-top: 26px;
25+
}
26+
27+
h6 {
28+
color: $base-font-color-light;
29+
font-family: $base-font-family;
30+
text-transform: uppercase;
31+
font-size: $font-size-small;
32+
}
33+
34+
.label {
35+
display: inline-block;
36+
// position: absolute;
37+
// right: 0;
38+
position: relative;
39+
// float: right;
40+
top: 3px;
41+
color: #fff;
42+
text-transform: uppercase;
43+
font-size: 11px;
44+
font-weight: 700;
45+
padding: 1px 5px;
46+
}
47+
48+
.important {
49+
background: $brand-primary;
50+
}
51+
52+
.success {
53+
background: $brand-secondary;
54+
}
55+
}

cheatsheets/index.md

+344-76
Large diffs are not rendered by default.

resources/css/highlightjs.css

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
/*
2+
3+
github.com style (c) Vasily Polovnyov <[email protected]>
4+
5+
*/
6+
7+
.hljs {
8+
font-family: 'Consolas';
9+
display: block;
10+
overflow-x: auto;
11+
padding: 0.5em;
12+
color: #333;
13+
background: #fdfdf7;
14+
border-radius: 3px;
15+
border: 1px solid #e7e7d6;
16+
}
17+
18+
.hljs-comment,
19+
.hljs-quote {
20+
color: #998;
21+
font-style: italic;
22+
}
23+
24+
.hljs-keyword,
25+
.hljs-selector-tag,
26+
.hljs-subst {
27+
color: #333;
28+
font-weight: bold;
29+
}
30+
31+
.hljs-number,
32+
.hljs-literal,
33+
.hljs-variable,
34+
.hljs-template-variable,
35+
.hljs-tag .hljs-attr {
36+
color: #008080;
37+
}
38+
39+
.hljs-string,
40+
.hljs-doctag {
41+
color: #da322f;
42+
}
43+
44+
.hljs-title,
45+
.hljs-section,
46+
.hljs-selector-id {
47+
color: #900;
48+
font-weight: bold;
49+
}
50+
51+
.hljs-subst {
52+
font-weight: normal;
53+
}
54+
55+
.hljs-type,
56+
.hljs-class .hljs-title {
57+
color: #2f8ad2;
58+
font-weight: bold;
59+
}
60+
61+
.hljs-tag,
62+
.hljs-name,
63+
.hljs-attribute {
64+
color: #000080;
65+
font-weight: normal;
66+
}
67+
68+
.hljs-regexp,
69+
.hljs-link {
70+
color: #859a00;
71+
}
72+
73+
.hljs-symbol,
74+
.hljs-bullet {
75+
color: #990073;
76+
}
77+
78+
.hljs-built_in,
79+
.hljs-builtin-name {
80+
color: #2f8ad2;
81+
}
82+
83+
.hljs-meta {
84+
color: #93a1a1;
85+
font-weight: bold;
86+
}
87+
88+
.hljs-deletion {
89+
background: #fdd;
90+
}
91+
92+
.hljs-addition {
93+
background: #dfd;
94+
}
95+
96+
.hljs-emphasis {
97+
font-style: italic;
98+
}
99+
100+
.hljs-strong {
101+
font-weight: bold;
102+
}

resources/css/monospace.css

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
---
3+
4+
@font-face {
5+
font-family: 'Consolas';
6+
src: url('{{ site.baseurl }}/resources/glyphs/Consolas.eot');
7+
src: url('{{ site.baseurl }}/resources/glyphs/Consolas.eot?#iefix') format('embedded-opentype'),
8+
url('{{ site.baseurl }}/resources/glyphs/Consolas.woff') format('woff'),
9+
url('{{ site.baseurl }}/resources/glyphs/Consolas.ttf') format('truetype');
10+
font-weight: normal;
11+
font-style: normal;
12+
}
13+
14+
@font-face {
15+
font-family: 'Consolas';
16+
src: url('{{ site.baseurl }}/resources/glyphs/Consolas-BoldItalic.eot');
17+
src: url('{{ site.baseurl }}/resources/glyphs/Consolas-BoldItalic.eot?#iefix') format('embedded-opentype'),
18+
url('{{ site.baseurl }}/resources/glyphs/Consolas-BoldItalic.woff') format('woff'),
19+
url('{{ site.baseurl }}/resources/glyphs/Consolas-BoldItalic.ttf') format('truetype');
20+
font-weight: bold;
21+
font-style: italic;
22+
}
23+
24+
@font-face {
25+
font-family: 'Consolas';
26+
src: url('{{ site.baseurl }}/resources/glyphs/Consolas-Italic.eot');
27+
src: url('{{ site.baseurl }}/resources/glyphs/Consolas-Italic.eot?#iefix') format('embedded-opentype'),
28+
url('{{ site.baseurl }}/resources/glyphs/Consolas-Italic.woff') format('woff'),
29+
url('{{ site.baseurl }}/resources/glyphs/Consolas-Italic.ttf') format('truetype');
30+
font-weight: normal;
31+
font-style: italic;
32+
}
33+
34+
@font-face {
35+
font-family: 'Consolas';
36+
src: url('{{ site.baseurl }}/resources/glyphs/Consolas-Bold.eot');
37+
src: url('{{ site.baseurl }}/resources/glyphs/Consolas-Bold.eot?#iefix') format('embedded-opentype'),
38+
url('{{ site.baseurl }}/resources/glyphs/Consolas-Bold.woff') format('woff'),
39+
url('{{ site.baseurl }}/resources/glyphs/Consolas-Bold.ttf') format('truetype');
40+
font-weight: bold;
41+
font-style: normal;
42+
}

resources/css/style.scss

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
@import 'layout/navigation';
2727
@import 'layout/doc-navigation';
2828
@import 'layout/twitter-feed';
29+
@import 'layout/cheatsheet';
2930
@import 'layout/ides';
3031
@import 'layout/nutshell';
3132
@import 'layout/overviews';

resources/glyphs/Consolas-Bold.eot

94.9 KB
Binary file not shown.

resources/glyphs/Consolas-Bold.ttf

94.7 KB
Binary file not shown.

resources/glyphs/Consolas-Bold.woff

58.1 KB
Binary file not shown.
105 KB
Binary file not shown.
104 KB
Binary file not shown.
65 KB
Binary file not shown.

resources/glyphs/Consolas-Italic.eot

98.6 KB
Binary file not shown.

resources/glyphs/Consolas-Italic.ttf

98.5 KB
Binary file not shown.

resources/glyphs/Consolas-Italic.woff

61.9 KB
Binary file not shown.

resources/glyphs/Consolas.eot

93 KB
Binary file not shown.

resources/glyphs/Consolas.ttf

92.9 KB
Binary file not shown.

resources/glyphs/Consolas.woff

57.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)