jekyll-wren 0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.md +9 -0
  3. data/README.md +177 -0
  4. data/_includes/custom-foot.html +4 -0
  5. data/_includes/custom-head.html +13 -0
  6. data/_includes/custom-meta.html +5 -0
  7. data/_includes/footer.html +23 -0
  8. data/_includes/head.html +21 -0
  9. data/_includes/meta.html +82 -0
  10. data/_includes/navigation.html +70 -0
  11. data/_includes/reading-time.html +41 -0
  12. data/_includes/social-list.html +46 -0
  13. data/_includes/video-player.html +66 -0
  14. data/_layouts/author-list.html +73 -0
  15. data/_layouts/default.html +16 -0
  16. data/_layouts/error.html +9 -0
  17. data/_layouts/page.html +14 -0
  18. data/_layouts/post-list.html +67 -0
  19. data/_layouts/post.html +16 -0
  20. data/_layouts/tag-list.html +54 -0
  21. data/_sass/wren/content.scss +345 -0
  22. data/_sass/wren/initialize.scss +118 -0
  23. data/_sass/wren/layout.scss +295 -0
  24. data/assets/apple-touch-icon.png +0 -0
  25. data/assets/flav.svg +4 -0
  26. data/assets/nav-icons/about.svg +3 -0
  27. data/assets/nav-icons/blog.svg +3 -0
  28. data/assets/nav-icons/comments.svg +3 -0
  29. data/assets/nav-icons/default.svg +3 -0
  30. data/assets/nav-icons/home.svg +4 -0
  31. data/assets/nav-icons/rss.svg +3 -0
  32. data/assets/nav-icons/top.svg +3 -0
  33. data/assets/nav-icons/work.svg +5 -0
  34. data/assets/social-icons/Blogger.svg +3 -0
  35. data/assets/social-icons/DEV.svg +3 -0
  36. data/assets/social-icons/Default.svg +3 -0
  37. data/assets/social-icons/Dribbble.svg +3 -0
  38. data/assets/social-icons/Facebook.svg +3 -0
  39. data/assets/social-icons/Flickr.svg +3 -0
  40. data/assets/social-icons/Ghost.svg +3 -0
  41. data/assets/social-icons/GitHub.svg +3 -0
  42. data/assets/social-icons/GitLab.svg +3 -0
  43. data/assets/social-icons/Instagram.svg +5 -0
  44. data/assets/social-icons/Keybase.svg +6 -0
  45. data/assets/social-icons/LinkedIn.svg +3 -0
  46. data/assets/social-icons/Mastodon.svg +3 -0
  47. data/assets/social-icons/Medium.svg +5 -0
  48. data/assets/social-icons/Micro.blog.svg +3 -0
  49. data/assets/social-icons/Pinterest.svg +3 -0
  50. data/assets/social-icons/Reddit.svg +3 -0
  51. data/assets/social-icons/StackOverflow.svg +3 -0
  52. data/assets/social-icons/Telegram.svg +3 -0
  53. data/assets/social-icons/Tumblr.svg +3 -0
  54. data/assets/social-icons/Twitter.svg +3 -0
  55. data/assets/social-icons/Wordpress.svg +4 -0
  56. data/assets/social-icons/YouTube.svg +3 -0
  57. data/assets/style.scss +14 -0
  58. data/errors/400.md +9 -0
  59. data/errors/403.md +9 -0
  60. data/errors/404.md +9 -0
  61. data/errors/418.md +12 -0
  62. data/errors/500.md +9 -0
  63. data/images/profile-hq.jpg +0 -0
  64. data/images/profile.jpg +0 -0
  65. metadata +183 -0
@@ -0,0 +1,46 @@
1
+ {%comment%} values come from mix of config and data file {%endcomment%}
2
+ {%- assign config = site.wren.social_links -%}
3
+ {%- assign data = site.wren_social_data -%}
4
+
5
+ {%comment%} double loop allows multiple from same service {%endcomment%}
6
+ {%- for service in config -%}
7
+ {%- for entry in service[1] -%}
8
+ {%comment%} can give username as object or value {%endcomment%}
9
+ {%- assign handle = entry.username | default: entry -%}
10
+
11
+ {%comment%}
12
+ Key by which config identifies the service. Note that this key doesn't have to
13
+ be known to the data file also; this template's logic will muddle through what
14
+ information it has and piece together a button as best it can.
15
+ {%endcomment%}
16
+ {%-assign key = service[0] -%}
17
+
18
+ {%comment%} checks if Wren covers service, if not switch to fallbacks {%endcomment%}
19
+ {%- assign name = data[key]["name"] | default: entry.name -%}
20
+ {%- assign icon = data[key]["name"] | default: "Default" -%}
21
+
22
+ {%comment%} url can come from config or datafile {%endcomment%}
23
+ {%- assign url = entry.instance | default: data[key]["url"] -%}
24
+
25
+ {%comment%} handle service specific url delimiters {%endcomment%}
26
+ {%- if key == "mastodon" or key == "medium" -%}
27
+ {%- assign delimiter = "/@" -%}
28
+ {%- else -%}
29
+ {%- assign delimiter = "/" -%}
30
+ {%- endif -%}
31
+
32
+ {%comment%} id allows URLs to differ from usernames {%endcomment%}
33
+ {%- assign url_handle = entry.id | default: handle -%}
34
+
35
+ {%comment%} generate the full profile url {%endcomment%}
36
+ {%- assign profile_link = url | prepend: 'https://' | append: delimiter | append: url_handle -%}
37
+
38
+ {%comment%} actual HTML which forms the social button {%endcomment%}
39
+ <a rel="author" alt="{{ name }}" title="{{ handle }}" href="{{ profile_link }}">
40
+ <svg>
41
+ {%comment%} #soc acts as an anchor for the import {%endcomment%}
42
+ <use xlink:href="{{ icon | prepend: '/assets/social-icons/' | append: '.svg#soc' | relative_url }}"/>
43
+ </svg>
44
+ </a>
45
+ {%endfor%}
46
+ {% endfor %}
@@ -0,0 +1,66 @@
1
+ {% comment %}
2
+ Embedded video player for a bunch of different host websites.
3
+ Takes the parameters `site` for video host, `alt` for the title,
4
+ and `id` for the video ID (usually in the URL) and then returns
5
+ the iframe needed to embed that video in a page. It's based on
6
+ the templates from https://github.com/nathancy/jekyll-embed-video
7
+ but combined into a one player, rather than players for each host.
8
+ {% endcomment %}
9
+
10
+ {% comment %} default player variables {% endcomment %}
11
+ {%- assign width = "500px" -%}
12
+ {%- assign height = "281px" -%}
13
+ {%- assign allow_autoplay = false -%}
14
+ {%- assign allow_fullscreen = true -%}
15
+
16
+ {% comment %}
17
+ Some sites also ask for the site doing the embedding for
18
+ security purposes, so this quick check makes sure things
19
+ keep working seamlessly between local and prod builds.
20
+ {% endcomment %}
21
+ {%- if jekyll.environment == "production" -%}
22
+ {%- assign host = site.url -%}
23
+ {%- else -%}
24
+ {%- assign host = "127.0.0.1" -%}
25
+ {% endif -%}
26
+
27
+ {% comment %} shortcut variables {% endcomment %}
28
+ {%- assign id = include.id -%}
29
+ {%- assign source = include.site -%}
30
+
31
+ {%- if source == "Dailymotion" -%}
32
+ {%- assign url = "dailymotion.com/embed/video/" -%}
33
+ {%- elsif source == "Google Drive" -%}
34
+ {%- assign url = "drive.google.com/file/d/" -%}
35
+ {%- elsif source == "Streamable" -%}
36
+ {%- assign url = "streamable.com/s/" -%}
37
+ {%- elsif source == "Twitch" -%}
38
+ {%- assign url = "clips.twitch.tv/embed?clip=" -%}
39
+ {%- assign id = id | append: "&parent=" | append: host -%}
40
+ {%- elsif source == "Vimeo" -%}
41
+ {%- assign url = "player.vimeo.com/video/" -%}
42
+ {%- elsif source == "YouTube" -%}
43
+ {%- assign url = "youtube.com/embed/" -%}
44
+ {%- endif -%}
45
+
46
+ <iframe
47
+ class = "video-embed"
48
+ alt = "{{ include.alt }}"
49
+ title = "{{ include.alt }}"
50
+ src = "{{ url | append: id | prepend: 'https://' }}"
51
+ width = {{ width }}
52
+ height = {{ height }}
53
+ frameborder = "0"
54
+ scrolling = "no"
55
+ {% if allow_autoplay == true -%}
56
+ allow = "autoplay"
57
+ autoplay = true
58
+ {% else -%}
59
+ autoplay = false
60
+ {%- endif -%}
61
+ {% if allow_fullscreen == true -%}
62
+ webkitallowfullscreen
63
+ mozallowfullscreen
64
+ allowfullscreen
65
+ {%- endif -%}>
66
+ </iframe>
@@ -0,0 +1,73 @@
1
+ ---
2
+ layout: page
3
+ ---
4
+
5
+ <div class="post-list-page">
6
+
7
+ {%comment%} allows for preface before author list {%endcomment%}
8
+ {{ content }}
9
+
10
+ {%comment%}
11
+ Okay so hear me out. While Jekyll does have the site.authors variable,
12
+ unlike with site.tags this isn't a list of all the authors across all
13
+ posts which can be indexed into like site.tags["misc"]. Instead it's
14
+ just just a variable (object or value) defined in the config file.
15
+
16
+ At the same time, Liquid doesn't provide a way to directly initialise
17
+ arbitrary arrays without a data file, and Jekyll can't generate or use
18
+ data files without a plugin which GitHub pages doesn't support.
19
+
20
+ All that together means to list posts by author we need to:
21
+
22
+ 1. loop over all the posts on the site and append authors to a
23
+ string which at the end is split to create an array.
24
+
25
+ 2. loop over all the authors in that array and display a header for
26
+ each. Within each author loop though we loop again over all the
27
+ site posts. If the post contains the author in its post.authors,
28
+ we display that post under the author's header.
29
+
30
+ It's more than a bit messy and would be a easier with a plugin, data
31
+ file, or Paginate v2 collection, but in the absence of those it works.
32
+ {% endcomment %}
33
+
34
+ {%comment%} create array of all post authors {% endcomment %}
35
+ {%- assign authors = "" %}
36
+ {%- for post in site.posts %}
37
+ {%- for author in post.author -%}
38
+ {%- if authors contains author -%}
39
+ {%comment%} skip {% endcomment %}
40
+ {%- else %}
41
+ {% assign authors = authors | append: author | append: ',' -%}
42
+ {%- endif -%}
43
+ {%- endfor -%}
44
+ {%- endfor -%}
45
+ {%- assign authors = authors | split: ',' -%}
46
+
47
+ {%comment%} list all the posts by author {% endcomment %}
48
+ {%- for site_author in authors -%}
49
+ {%- assign author_id = site_author | replace: ' ', '_' -%}
50
+ <h2 class="post-list-header">
51
+ <a id={{ author_id }} href={{ author_id | prepend: '#' }}>
52
+ {{ site_author }}
53
+ </a>
54
+ </h2>
55
+
56
+ <ul class="post-list">
57
+ {%- for post in site.posts -%}
58
+ {%- if post.author contains site_author -%}
59
+ <li>
60
+ <a class="post-link" href="{{ post.url | relative_url }}">
61
+ {{ post.title | escape }}
62
+ </a>
63
+ {%- include meta.html -%}
64
+ {%- if site.show_list_excerpts -%}
65
+ {{ post.excerpt }}
66
+ {%- endif -%}
67
+ </li>
68
+ {%- endif -%}
69
+ {%- endfor -%}
70
+ </ul>
71
+ {%- endfor -%}
72
+
73
+ </div>
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html lang="{{ page.lang | default: site.lang | default: "en" }}">
3
+
4
+ {%- include head.html -%}
5
+
6
+ <body>
7
+ {%- include navigation.html -%}
8
+
9
+ <main class="page-content" aria-label="Content">
10
+ {{ content }}
11
+ </main>
12
+
13
+ {%- include footer.html -%}
14
+ </body>
15
+
16
+ </html>
@@ -0,0 +1,9 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <div class="error">
6
+ <h1>{{ page.title | escape }}</h1>
7
+ {{ content }}
8
+ <br>
9
+ </div>
@@ -0,0 +1,14 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <article class="post">
5
+
6
+ <header class="post-header">
7
+ <h1 class="post-title">{{ page.title | escape }}</h1>
8
+ </header>
9
+
10
+ <div class="post-content">
11
+ {{ content }}
12
+ </div>
13
+
14
+ </article>
@@ -0,0 +1,67 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <div class="post-list-page">
6
+
7
+ {%- if page.title -%}
8
+ <h1 class="post-title">{{ page.title }}</h1>
9
+ {%- endif -%}
10
+
11
+ {%comment%} allows for preface before post list {%endcomment%}
12
+ {{ content }}
13
+
14
+ {% if site.paginate %}
15
+ {% assign posts = paginator.posts %}
16
+ {% else %}
17
+ {% assign posts = site.posts %}
18
+ {% endif %}
19
+
20
+ {%- if posts.size > 0 -%}
21
+ {%comment%} including <h2> even if empty ensures proper spacing {%endcomment%}
22
+ <h2 class="post-list-header">
23
+ {%- if page.list_title -%}
24
+ {{ page.list_title }}
25
+ {%- endif -%}
26
+ </h2>
27
+ <ul class="post-list">
28
+ {%- for post in posts -%}
29
+ <li>
30
+ <a class="post-link" href="{{ post.url | relative_url }}">
31
+ {{ post.title | escape }}
32
+ </a>
33
+ {%- include meta.html -%}
34
+ {%- if site.show_excerpts -%}
35
+ {{ post.excerpt }}
36
+ {%- endif -%}
37
+ </li>
38
+ {%- endfor -%}
39
+ </ul>
40
+
41
+ {% comment %} only display pagination navbar if switched on {% endcomment %}
42
+ {%- if site.paginate -%}
43
+ {% comment %} and even if it is, only if there's more than one page {% endcomment %}
44
+ {%- if paginator.previous_page or paginator.next_page -%}
45
+ <div class="pagination">
46
+ {%- if paginator.previous_page %}
47
+ <a href="{{ paginator.previous_page_path | relative_url }}" class="previous-page">Prev</a>
48
+ {%- else %}
49
+ <div class="pager-edge">First</div>
50
+ {%- endif %}
51
+
52
+ <div>•</div>
53
+ <div class="current-page">Page {{ paginator.page }}</div>
54
+ <div>•</div>
55
+
56
+ {%- if paginator.next_page %}
57
+ <a href="{{ paginator.next_page_path | relative_url }}" class="next-page">Next</a>
58
+ {%- else %}
59
+ <div class="pager-edge">Last</div>
60
+ {%- endif %}
61
+ </div>
62
+ {%- endif -%}
63
+ {%- endif -%}
64
+
65
+ {%- endif -%}
66
+
67
+ </div>
@@ -0,0 +1,16 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">
5
+
6
+ <header class="post-header">
7
+ <h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}</h1>
8
+ {%- include meta.html -%}
9
+ </header>
10
+
11
+ <div class="post-content e-content" itemprop="articleBody">
12
+ {{ content }}
13
+ </div>
14
+
15
+ <a class="u-url" href="{{ page.url | relative_url }}" hidden></a>
16
+ </article>
@@ -0,0 +1,54 @@
1
+ ---
2
+ layout: page
3
+ ---
4
+
5
+ {%- assign tags = site.tags | sort -%}
6
+ {%- assign a = site.wren.tag_cloud.a | default: 15 -%}
7
+ {%- assign b = site.wren.tag_cloud.b | default: 80 -%}
8
+
9
+ <div class="post-list-page">
10
+
11
+ <div class="tag-cloud">
12
+ {%- for tag in tags -%}
13
+ {%- assign tag_name = tag[0] -%}
14
+ {%- assign tag_count = tag | last | size -%}
15
+ {%comment%}
16
+ The font size of each tag is calculated using (a*x + b)%, where x
17
+ is the number of posts in that tag. This means that as x grows
18
+ the values of a and b in config.yml might need tweaking.
19
+ {%endcomment%}
20
+ {%- assign style = tag_count | times: a | plus: b | prepend: 'style="font-size: ' | append: '%;"' -%}
21
+ <a href={{ tag_name | prepend: '#' }} {{ style }} title="{{ tag_count }} posts">{{ tag_name | replace:'-', ' ' }}</a>
22
+ {%- if forloop.last == false %}, {% endif -%}
23
+ {%- endfor -%}
24
+ </div>
25
+
26
+ {%comment%} allows for preface before tag list {%endcomment%}
27
+ {{ content }}
28
+
29
+ {%- for tag in tags -%}
30
+ {%- capture tag_name -%}
31
+ {{ tag | first }}
32
+ {%- endcapture -%}
33
+ <h2 class="post-list-header">
34
+ <a id={{ tag_name }} href={{ tag_name | prepend: '#' }}>
35
+ {{ tag_name }}
36
+ </a>
37
+ </h2>
38
+
39
+ <ul class="post-list">
40
+ {%- for post in site.tags[tag_name] -%}
41
+ <li>
42
+ <a class="post-link" href="{{ post.url | relative_url }}">
43
+ {{ post.title | escape }}
44
+ </a>
45
+ {%- include meta.html -%}
46
+ {%- if site.show_list_excerpts -%}
47
+ {{ post.excerpt }}
48
+ {%- endif -%}
49
+ </li>
50
+ {%- endfor -%}
51
+ </ul>
52
+ {%- endfor -%}
53
+
54
+ </div>
@@ -0,0 +1,345 @@
1
+ // The content file controls the base styling of HTML content
2
+ // that Jekyll makes. Note that `layout.scss` tweaks some bits
3
+ // (e.g. headers) further for use in pages and posts.
4
+
5
+
6
+ // Setting Up
7
+ html {
8
+ font-size: $base-font-size;
9
+ // Reserves space for the scollbar even if not needed, which
10
+ // prevents the website interface shifting around when going
11
+ // between pages which do and don't need it.
12
+ overflow-y: scroll;
13
+ }
14
+
15
+ // Reset some basic elements
16
+ body, h1, h2, h3, h4, h5, h6,
17
+ p, blockquote, pre, hr,
18
+ dl, dd, ol, ul, figure {
19
+ margin: 0;
20
+ padding: 0;
21
+ }
22
+
23
+
24
+ // Basic Styling
25
+ // =============
26
+
27
+ body {
28
+ font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family;
29
+ color: $text-color;
30
+ background-color: $background-color;
31
+ -webkit-text-size-adjust: 100%;
32
+ -webkit-font-feature-settings: "kern" 1;
33
+ -moz-font-feature-settings: "kern" 1;
34
+ -o-font-feature-settings: "kern" 1;
35
+ font-feature-settings: "kern" 1;
36
+ font-kerning: normal;
37
+ display: flex;
38
+ min-height: 100vh;
39
+ flex-direction: column;
40
+ overflow-wrap: break-word;
41
+ width: $content-width+$nav-bar-height;
42
+ max-width: 100%;
43
+ margin: 0 auto;
44
+ }
45
+
46
+ // Set `margin-bottom` to maintain vertical rhythm
47
+ h1, h2, h3, h4, h5, h6,
48
+ p, blockquote, pre,
49
+ ul, ol, dl, figure,
50
+ %vertical-rhythm {
51
+ margin-bottom: $spacing-unit / 2;
52
+ }
53
+
54
+ hr {
55
+ margin-top: $spacing-unit;
56
+ margin-bottom: $spacing-unit;
57
+ }
58
+
59
+ // `main` element
60
+ main {
61
+ display: block; // default is 'inline' in IE11
62
+ }
63
+
64
+
65
+ // Images
66
+ // ======
67
+
68
+ img {
69
+ max-width: 100%;
70
+ margin-bottom: $spacing-unit/2;
71
+ border-radius: $base-border-radius;
72
+ box-shadow: $base-shadow;
73
+ // Centres w/o text wrap on small displays
74
+ display: block;
75
+ margin-left: auto;
76
+ margin-right: auto;
77
+ @include if-large {
78
+ // Text wraps on large displays
79
+ vertical-align: middle;
80
+ display:inline;
81
+ }
82
+ }
83
+
84
+ img.left {
85
+ @include if-large {
86
+ float: left;
87
+ margin-right: $spacing-unit;
88
+ }
89
+ }
90
+
91
+ img.right {
92
+ @include if-large {
93
+ float: right;
94
+ margin-left: $spacing-unit;
95
+ }
96
+ }
97
+
98
+ figure > img {
99
+ display: block;
100
+ }
101
+
102
+ figcaption {
103
+ font-size: $small-font-size;
104
+ }
105
+
106
+
107
+ // Videos
108
+ // ======
109
+
110
+ .video-embed {
111
+ margin: 0 auto $spacing-unit/2 auto;
112
+ box-shadow: $base-shadow;
113
+ display: block;
114
+ max-width: 100%;
115
+ max-height: auto;
116
+ }
117
+
118
+
119
+ // Lists
120
+ // =====
121
+
122
+ ul, ol {
123
+ margin-left: $spacing-unit;
124
+ }
125
+
126
+ li {
127
+ > ul,
128
+ > ol {
129
+ margin-bottom: 0;
130
+ }
131
+ }
132
+
133
+
134
+ // Headings
135
+ // ========
136
+
137
+ h1, h2, h3, h4, h5, h6 {
138
+ font-weight: $base-header-weight;
139
+ }
140
+
141
+ h1 {
142
+ text-align: $base-h1-alignment;
143
+ // margin-bottom: $spacing-unit;
144
+ }
145
+
146
+
147
+ // Links
148
+ // =====
149
+
150
+ a {
151
+ color: $link-base-color;
152
+ text-decoration: none;
153
+
154
+ &:visited {
155
+ color: $link-visited-color;
156
+ }
157
+
158
+ &:hover {
159
+ color: $link-hover-color;
160
+ text-decoration: underline;
161
+ }
162
+ }
163
+
164
+
165
+ // Blockquotes
166
+ // ===========
167
+
168
+ blockquote {
169
+ color: $brand-color;
170
+ border-left: 4px solid $brand-color-light;
171
+ padding-left: $spacing-unit / 2;
172
+ @include relative-font-size(1.125);
173
+ font-style: italic;
174
+
175
+ > :last-child {
176
+ margin-bottom: 0;
177
+ }
178
+
179
+ i, em {
180
+ // Rather unitalicising, add a dotted underline
181
+ text-decoration: underline;
182
+ text-decoration-style: dotted;
183
+ }
184
+ }
185
+
186
+
187
+ // Code formatting
188
+ // ===============
189
+
190
+ pre,
191
+ code {
192
+ font-family: $code-font-family;
193
+ font-size: 0.9375em;
194
+ border: 1px solid $border-color;
195
+ box-shadow: $base-shadow;
196
+ border-radius: $base-border-radius/4;
197
+ background-color: $code-background-color;
198
+ }
199
+
200
+ code {
201
+ box-shadow: none;
202
+ padding: 1px 5px;
203
+ }
204
+
205
+ pre {
206
+ padding: 8px 12px;
207
+ overflow-x: auto;
208
+
209
+ > code {
210
+ border: 0;
211
+ padding-right: 0;
212
+ padding-left: 0;
213
+ }
214
+ }
215
+
216
+ .highlight {
217
+ border-radius: $base-border-radius;
218
+ background: $code-background-color;
219
+ @extend %vertical-rhythm;
220
+
221
+ .highlighter-rouge & {
222
+ background: $code-background-color;
223
+ }
224
+
225
+ // Syntax highlighting styles
226
+ .c { color: $syntax-comment-color; font-style: italic } // Comment
227
+ .err { color: $syntax-error-color; background-color: $syntax-err-background } // Error
228
+ .k { font-weight: bold } // Keyword
229
+ .o { font-weight: bold } // Operator
230
+ .cm { color: $syntax-comment-color; font-style: italic } // Comment.Multiline
231
+ .cp { color: $syntax-comment-color; font-weight: bold } // Comment.Preproc
232
+ .c1 { color: $syntax-comment-color; font-style: italic } // Comment.Single
233
+ .cs { color: $syntax-comment-color; font-weight: bold; font-style: italic } // Comment.Special
234
+ .gd { color: $syntax-ins-del-color; background-color: lighten($syntax-del-background, 10%) } // Generic.Deleted
235
+ .gd .x { color: $syntax-ins-del-color; background-color: $syntax-del-background } // Generic.Deleted.Specific
236
+ .ge { font-style: italic } // Generic.Emph
237
+ .gr { color: $syntax-error-color } // Generic.Error
238
+ .gh { color: $syntax-comment-color } // Generic.Heading
239
+ .gi { color: $syntax-ins-del-color; background-color: lighten($syntax-ins-background, 10%) } // Generic.Inserted
240
+ .gi .x { color: $syntax-ins-del-color; background-color: $syntax-ins-background } // Generic.Inserted.Specific
241
+ .go { color: $syntax-output-color } // Generic.Output
242
+ .gp { color: $syntax-prompt-color } // Generic.Prompt
243
+ .gs { font-weight: bold } // Generic.Strong
244
+ .gu { color: $syntax-subhead-color } // Generic.Subheading
245
+ .gt { color: $syntax-error-color } // Generic.Traceback
246
+ .kc { font-weight: bold } // Keyword.Constant
247
+ .kd { font-weight: bold } // Keyword.Declaration
248
+ .kp { font-weight: bold } // Keyword.Pseudo
249
+ .kr { font-weight: bold } // Keyword.Reserved
250
+ .kt { color: $syntax-class-color; font-weight: bold } // Keyword.Type
251
+ .m { color: $syntax-number-color } // Literal.Number
252
+ .s { color: $syntax-string-color } // Literal.String
253
+ .na { color: $syntax-variable-color } // Name.Attribute
254
+ .nb { color: $syntax-builtin-color } // Name.Builtin
255
+ .nc { color: $syntax-class-color; font-weight: bold } // Name.Class
256
+ .no { color: $syntax-variable-color } // Name.Constant
257
+ .ni { color: $syntax-entity-color } // Name.Entity
258
+ .ne { color: $syntax-error-color; font-weight: bold } // Name.Exception
259
+ .nf { color: $syntax-function-color; font-weight: bold } // Name.Function
260
+ .nn { color: $syntax-prompt-color } // Name.Namespace
261
+ .nt { color: $syntax-tag-color } // Name.Tag
262
+ .nv { color: $syntax-variable-color } // Name.Variable
263
+ .ow { font-weight: bold } // Operator.Word
264
+ .w { color: $syntax-whitespace-color } // Text.Whitespace
265
+ .mf { color: $syntax-number-color } // Literal.Number.Float
266
+ .mh { color: $syntax-number-color } // Literal.Number.Hex
267
+ .mi { color: $syntax-number-color } // Literal.Number.Integer
268
+ .mo { color: $syntax-number-color } // Literal.Number.Oct
269
+ .sb { color: $syntax-string-color } // Literal.String.Backtick
270
+ .sc { color: $syntax-string-color } // Literal.String.Char
271
+ .sd { color: $syntax-string-color } // Literal.String.Doc
272
+ .s2 { color: $syntax-string-color } // Literal.String.Double
273
+ .se { color: $syntax-string-color } // Literal.String.Escape
274
+ .sh { color: $syntax-string-color } // Literal.String.Heredoc
275
+ .si { color: $syntax-string-color } // Literal.String.Interpol
276
+ .sx { color: $syntax-string-color } // Literal.String.Other
277
+ .sr { color: $syntax-regex-color } // Literal.String.Regex
278
+ .s1 { color: $syntax-string-color } // Literal.String.Single
279
+ .ss { color: $syntax-symbol-color } // Literal.String.Symbol
280
+ .bp { color: $syntax-comment-color } // Name.Builtin.Pseudo
281
+ .vc { color: $syntax-variable-color } // Name.Variable.Class
282
+ .vg { color: $syntax-variable-color } // Name.Variable.Global
283
+ .vi { color: $syntax-variable-color } // Name.Variable.Instance
284
+ .il { color: $syntax-number-color } // Literal.Number.Integer.Long
285
+ }
286
+
287
+
288
+ // Clearfix
289
+ // ========
290
+
291
+ %clearfix:after {
292
+ content: "";
293
+ display: table;
294
+ clear: both;
295
+ }
296
+
297
+
298
+ // Table Formatting
299
+ // ================
300
+
301
+ table {
302
+ margin-bottom: $spacing-unit;
303
+ width: 100%;
304
+ text-align: $table-text-align;
305
+ color: $table-text-color;
306
+ border-collapse: collapse;
307
+
308
+ // Properties for the table's external border
309
+ border: 1px solid $table-border-color;
310
+ border-radius: $base-border-radius;
311
+ box-shadow: $base-shadow;
312
+
313
+ // Properties for the table's internal borders
314
+ th, td {
315
+ // All cells have the same padding rules
316
+ padding: ($spacing-unit / 3) ($spacing-unit / 2);
317
+ }
318
+ tr {
319
+ // Alternate row background colours
320
+ &:nth-child(even) {
321
+ background-color: $table-zebra-color;
322
+ }
323
+ // Internal vertical borders
324
+ border-bottom: 1px solid $table-border-color;
325
+ &:last-of-type { border-bottom: 0; }
326
+ }
327
+ td {
328
+ // Internal horizontal borders
329
+ border-right: 1px solid $table-border-color;
330
+ &:last-of-type { border-right: 0; }
331
+ }
332
+ th {
333
+ // Table header has its own colour properties
334
+ background-color: $table-header-bg-color;
335
+ border-bottom: 1px solid $table-header-border;
336
+ border-right: 1px solid $table-header-border;
337
+ &:last-of-type { border-right: 0; }
338
+ }
339
+
340
+ // Handle overflow if there isn't enough space to display
341
+ display: block;
342
+ overflow-x: auto;
343
+ -webkit-overflow-scrolling: touch;
344
+ -ms-overflow-style: -ms-autohiding-scrollbar;
345
+ }