minimal-mistakes-jekyll 4.26.0 → 4.26.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -0
- data/README.md +2 -2
- data/_data/ui-text.yml +53 -0
- data/_includes/archive-single.html +1 -1
- data/_includes/breadcrumbs.html +1 -1
- data/_includes/copyright.html +1 -1
- data/_includes/copyright.js +1 -1
- data/_includes/figure +1 -1
- data/_layouts/archive-taxonomy.html +1 -1
- data/_layouts/archive.html +1 -1
- data/_layouts/default.html +1 -1
- data/_layouts/search.html +1 -1
- data/_layouts/single.html +1 -1
- data/_layouts/splash.html +1 -1
- data/_sass/minimal-mistakes/_copyright.scss +1 -1
- data/_sass/minimal-mistakes/_utilities.scss +51 -117
- data/assets/css/main.scss +1 -1
- data/assets/js/_main.js +20 -4
- data/assets/js/main.min.js +2 -2
- data/assets/js/main.min.js.map +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ecc74a3ce0daabe9352af2c6df9f721977e0828f469ca32b6d035567a0e2bda1
|
4
|
+
data.tar.gz: e82443293ef2fbe0be75f1b6f63d3edbf014b1a7bdb1f3917b86dd2b1d28ea4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60da64c06a172cd6fc2da33c15e89aef67e592d1493deb813aecbca3e00348380f3cf296f56f6adb205bc07b2c22dd79bd6f71d38066e8e64733c3b5e5a57f11
|
7
|
+
data.tar.gz: 5699470cf94b96b68d1b62e9213d447b12b7883c6fd9c1949d2f7575cb7635adbaed9082d056ca1d60a308b316373d597ede8db351d35543a92d7a1751606d8a
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,33 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
+
### Enhancements
|
6
|
+
|
7
|
+
- Add Czech localization. [#4866](https://github.com/mmistakes/minimal-mistakes/pull/4866)
|
8
|
+
- Allow overriding HTML `lang` attribute on a per-page basis. [#4862](https://github.com/mmistakes/minimal-mistakes/pull/4862)
|
9
|
+
|
10
|
+
### Bug Fixes
|
11
|
+
|
12
|
+
- Figure helper breaks when using code markup in caption with `popup=true`. [#4841](https://github.com/mmistakes/minimal-mistakes/issues/4841)
|
13
|
+
|
14
|
+
## [4.26.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.26.1)
|
15
|
+
|
16
|
+
### Bug Fixes
|
17
|
+
|
18
|
+
- Disable copy button on invalid syntax highlighting blocks to avoid positioning issues.
|
19
|
+
- Fix typo for `fa-dribbble` in `_utilities.scss`.
|
20
|
+
- Restrict "auto scroll sticky ToC to content" feature to Chromium browsers for now. [#4826](https://github.com/mmistakes/minimal-mistakes/issues/4826)
|
21
|
+
|
22
|
+
### Documentation & Maintenance
|
23
|
+
|
24
|
+
- Rewrite social icons SCSS with a loop.
|
25
|
+
|
26
|
+
### Enhancements
|
27
|
+
|
28
|
+
- Change the icon of a copy button into a tick for 1.5 seconds on successful copy.
|
29
|
+
|
30
|
+
## [4.26.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.26.0)
|
31
|
+
|
5
32
|
### Bug Fixes
|
6
33
|
|
7
34
|
- Fix an unclosed `<p>` tag in `page__hero.html`, near `page.header.actions`.
|
data/README.md
CHANGED
@@ -27,7 +27,7 @@ Minimal Mistakes is a flexible two-column Jekyll theme, perfect for building per
|
|
27
27
|
- Optional [header images](https://mmistakes.github.io/minimal-mistakes/docs/layouts/#headers), [custom sidebars](https://mmistakes.github.io/minimal-mistakes/docs/layouts/#sidebars), [table of contents](https://mmistakes.github.io/minimal-mistakes/docs/helpers/#table-of-contents), [galleries](https://mmistakes.github.io/minimal-mistakes/docs/helpers/#gallery), related posts, [breadcrumb links](https://mmistakes.github.io/minimal-mistakes/docs/configuration/#breadcrumb-navigation-beta), [navigation lists](https://mmistakes.github.io/minimal-mistakes/docs/helpers/#navigation-list), and more.
|
28
28
|
- Commenting support (powered by [Disqus](https://disqus.com/), [Facebook](https://developers.facebook.com/docs/plugins/comments), Google+, [Discourse](https://www.discourse.org/), static-based via [Staticman](https://staticman.net/), [utterances](https://utteranc.es/), and [giscus](https://giscus.app/)).
|
29
29
|
- [Google Analytics](https://www.google.com/analytics/) support.
|
30
|
-
- UI localized text in English (default), Arabic (عربي), Brazilian Portuguese (Português brasileiro), Catalan, Chinese, Danish, Dutch, Finnish, French (Français), German (Deutsch), Greek, Hebrew, Hindi (हिंदी), Hungarian, Indonesian, Irish (Gaeilge), Italian (Italiano), Japanese, Kiswahili, Korean, Malayalam, Myanmar (Burmese), Nepali (Nepalese), Norwegian (Norsk), Persian (فارسی), Polish, Punjabi (ਪੰਜਾਬੀ), Romanian, Russian, Slovak, Spanish (Español), Swedish, Thai, Turkish (Türkçe), Ukrainian (Українська) and Vietnamese.
|
30
|
+
- UI localized text in English (default), Arabic (عربي), Brazilian Portuguese (Português brasileiro), Catalan, Chinese, Czech, Danish, Dutch, Finnish, French (Français), German (Deutsch), Greek, Hebrew, Hindi (हिंदी), Hungarian, Indonesian, Irish (Gaeilge), Italian (Italiano), Japanese, Kiswahili, Korean, Malayalam, Myanmar (Burmese), Nepali (Nepalese), Norwegian (Norsk), Persian (فارسی), Polish, Punjabi (ਪੰਜਾਬੀ), Romanian, Russian, Slovak, Spanish (Español), Swedish, Thai, Turkish (Türkçe), Ukrainian (Українська) and Vietnamese.
|
31
31
|
|
32
32
|
## Skins (color variations)
|
33
33
|
|
@@ -121,7 +121,7 @@ To install:
|
|
121
121
|
bundle
|
122
122
|
```
|
123
123
|
|
124
|
-
4. Add `remote_theme: "mmistakes/minimal-mistakes@4.26.
|
124
|
+
4. Add `remote_theme: "mmistakes/minimal-mistakes@4.26.2"` to your `_config.yml` file. Remove any other `theme:` or `remote_theme:` entry.
|
125
125
|
|
126
126
|
<!--
|
127
127
|
Dev note: The version number is currently hard-coded in these files:
|
data/_data/ui-text.yml
CHANGED
@@ -2074,6 +2074,59 @@ uk: &DEFAULT_UK
|
|
2074
2074
|
uk-UA:
|
2075
2075
|
<<: *DEFAULT_UK
|
2076
2076
|
|
2077
|
+
# Czech / čeština
|
2078
|
+
# -----------------
|
2079
|
+
cs: &DEFAULT_CS
|
2080
|
+
skip_links : "Rychlé odkazy"
|
2081
|
+
skip_primary_nav : "Přejít na hlavní navigace"
|
2082
|
+
skip_content : "Přejít na obsah"
|
2083
|
+
skip_footer : "Přejít na zápatí"
|
2084
|
+
page : "Stránka"
|
2085
|
+
pagination_previous : "Předchozí"
|
2086
|
+
pagination_next : "Další"
|
2087
|
+
breadcrumb_home_label : "Domů"
|
2088
|
+
breadcrumb_separator : "/"
|
2089
|
+
menu_label : "Přepnout zobrazení menu"
|
2090
|
+
search_label : "Přepnout zobrazení vyhledávání"
|
2091
|
+
toc_label : "Na této stránce"
|
2092
|
+
ext_link_label : "Přímý odkaz"
|
2093
|
+
less_than : "méně než"
|
2094
|
+
minute_read : "minut"
|
2095
|
+
share_on_label : "Sdílet"
|
2096
|
+
meta_label :
|
2097
|
+
tags_label : "Štítky:"
|
2098
|
+
categories_label : "Rubriky:"
|
2099
|
+
date_label : "Aktualizováno:"
|
2100
|
+
comments_label : "Okomentovat"
|
2101
|
+
comments_title : "Komentáře"
|
2102
|
+
more_label : "Zjistit více"
|
2103
|
+
related_label : "Může se vám také líbit"
|
2104
|
+
follow_label : "Sledovat:"
|
2105
|
+
feed_label : "Zdroj"
|
2106
|
+
powered_by : "Používáme"
|
2107
|
+
website_label : "Web"
|
2108
|
+
email_label : "E-mail"
|
2109
|
+
recent_posts : "Nejnovější příspěvky"
|
2110
|
+
undefined_wpm : "V souboru _config.yml chybí parametr words_per_minute"
|
2111
|
+
comment_form_info : "Vaše e-mailová adresa nebude zveřejněna. Povinná pole jsou označena"
|
2112
|
+
comment_form_comment_label : "Komentář"
|
2113
|
+
comment_form_md_info : "Podporuje markdown."
|
2114
|
+
comment_form_name_label : "Jméno"
|
2115
|
+
comment_form_email_label : "E-mailová adresa"
|
2116
|
+
comment_form_website_label : "Web (volitelné)"
|
2117
|
+
comment_btn_submit : "Odeslat komentář"
|
2118
|
+
comment_btn_submitted : "Odesláno"
|
2119
|
+
comment_success_msg : "Děkujeme za komentář. Na stránce se objeví jakmile projde schválením."
|
2120
|
+
comment_error_msg : "Odeslání se nezdařilo. Zkontrolujte, že jste vyplnili všechna povinná pole a zkuste to znovu."
|
2121
|
+
loading_label : "Načítání..."
|
2122
|
+
search_label_text : "Zadejte vyhledávání..."
|
2123
|
+
search_placeholder_text : "Zadejte vyhledávání..."
|
2124
|
+
search_algolia_no_results : "Žádné výsledky"
|
2125
|
+
results_found : "Nalezené výsledky"
|
2126
|
+
back_to_top : "Na začátek stránky"
|
2127
|
+
cs-CZ:
|
2128
|
+
<<: *DEFAULT_CS
|
2129
|
+
|
2077
2130
|
# Another locale
|
2078
2131
|
# --------------
|
2079
2132
|
#
|
@@ -11,7 +11,7 @@
|
|
11
11
|
{% endif %}
|
12
12
|
|
13
13
|
<div class="{{ include.type | default: 'list' }}__item">
|
14
|
-
<article class="archive__item" itemscope itemtype="https://schema.org/CreativeWork">
|
14
|
+
<article class="archive__item" itemscope itemtype="https://schema.org/CreativeWork"{% if post.locale %} lang="{{ post.locale }}"{% endif %}>
|
15
15
|
{% if include.type == "grid" and teaser %}
|
16
16
|
<div class="archive__item-teaser">
|
17
17
|
<img src="{{ teaser | relative_url }}" alt="">
|
data/_includes/breadcrumbs.html
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
<span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span>
|
27
27
|
{% endif %}
|
28
28
|
{% if forloop.last %}
|
29
|
-
<li class="current">{{ page.title }}</li>
|
29
|
+
<li class="current"{% if page.locale %} lang="{{ page.locale }}"{% endif %}>{{ page.title }}</li>
|
30
30
|
{% else %}
|
31
31
|
{% assign i = i | plus: 1 %}
|
32
32
|
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
data/_includes/copyright.html
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<!--
|
2
|
-
Minimal Mistakes Jekyll Theme 4.26.
|
2
|
+
Minimal Mistakes Jekyll Theme 4.26.2 by Michael Rose
|
3
3
|
Copyright 2013-2024 Michael Rose - mademistakes.com | @mmistakes
|
4
4
|
Free for personal and commercial use under the MIT license
|
5
5
|
https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE
|
data/_includes/copyright.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Minimal Mistakes Jekyll Theme 4.26.
|
2
|
+
* Minimal Mistakes Jekyll Theme 4.26.2 by Michael Rose
|
3
3
|
* Copyright 2013-2024 Michael Rose - mademistakes.com | @mmistakes
|
4
4
|
* Free for personal and commercial use under the MIT license
|
5
5
|
* https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE
|
data/_includes/figure
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<figure class="{{ include.class }}">
|
2
|
-
{%- if include.popup -%}<a href="{{ include.image_path | relative_url }}" class="image-popup"
|
2
|
+
{%- if include.popup -%}<a href="{{ include.image_path | relative_url }}" class="image-popup"{% if include.caption %} title="{{ include.caption | markdownify | strip_html }}"{% endif %}>{%- endif -%}
|
3
3
|
<img src="{{ include.image_path | relative_url }}"
|
4
4
|
alt="{% if include.alt %}{{ include.alt }}{% endif %}">
|
5
5
|
{%- if include.popup -%}</a>{%- endif -%}
|
@@ -20,7 +20,7 @@ author_profile: false
|
|
20
20
|
|
21
21
|
<div class="archive">
|
22
22
|
{% unless page.header.overlay_color or page.header.overlay_image %}
|
23
|
-
<h1 id="page-title" class="page__title">{{ page.title }}</h1>
|
23
|
+
<h1 id="page-title" class="page__title"{% if page.locale %} lang="{{ page.locale }}"{% endif %}>{{ page.title }}</h1>
|
24
24
|
{% endunless %}
|
25
25
|
{% for post in page.posts %}
|
26
26
|
{% include archive-single.html %}
|
data/_layouts/archive.html
CHANGED
@@ -19,7 +19,7 @@ layout: default
|
|
19
19
|
|
20
20
|
<div class="archive">
|
21
21
|
{% unless page.header.overlay_color or page.header.overlay_image %}
|
22
|
-
<h1 id="page-title" class="page__title">{{ page.title }}</h1>
|
22
|
+
<h1 id="page-title" class="page__title"{% if page.locale %} lang="{{ page.locale }}"{% endif %}>{{ page.title }}</h1>
|
23
23
|
{% endunless %}
|
24
24
|
{{ content }}
|
25
25
|
</div>
|
data/_layouts/default.html
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
<!doctype html>
|
5
5
|
{% include copyright.html %}
|
6
|
-
<html lang="{{ site.locale |
|
6
|
+
<html lang="{{ site.locale | replace: "_", "-" | default: "en" }}" class="no-js">
|
7
7
|
<head>
|
8
8
|
{% include head.html %}
|
9
9
|
{% include head/custom.html %}
|
data/_layouts/search.html
CHANGED
@@ -17,7 +17,7 @@ layout: default
|
|
17
17
|
|
18
18
|
<div class="archive">
|
19
19
|
{% unless page.header.overlay_color or page.header.overlay_image %}
|
20
|
-
<h1 id="page-title" class="page__title">{{ page.title }}</h1>
|
20
|
+
<h1 id="page-title" class="page__title"{% if page.locale %} lang="{{ page.locale }}"{% endif %}>{{ page.title }}</h1>
|
21
21
|
{% endunless %}
|
22
22
|
|
23
23
|
{{ content }}
|
data/_layouts/single.html
CHANGED
@@ -21,7 +21,7 @@ layout: default
|
|
21
21
|
<div id="main" role="main">
|
22
22
|
{% include sidebar.html %}
|
23
23
|
|
24
|
-
<article class="page" itemscope itemtype="https://schema.org/CreativeWork">
|
24
|
+
<article class="page" itemscope itemtype="https://schema.org/CreativeWork"{% if page.locale %} lang="{{ page.locale }}"{% endif %}>
|
25
25
|
{% if page.title %}<meta itemprop="headline" content="{{ page.title | replace: '|', '|' | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
|
26
26
|
{% if page.excerpt %}<meta itemprop="description" content="{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
|
27
27
|
{% if page.date %}<meta itemprop="datePublished" content="{{ page.date | date_to_xmlschema }}">{% endif %}
|
data/_layouts/splash.html
CHANGED
@@ -9,7 +9,7 @@ layout: default
|
|
9
9
|
{% endif %}
|
10
10
|
|
11
11
|
<div id="main" role="main">
|
12
|
-
<article class="splash" itemscope itemtype="https://schema.org/CreativeWork">
|
12
|
+
<article class="splash" itemscope itemtype="https://schema.org/CreativeWork"{% if page.locale %} lang="{{ page.locale }}"{% endif %}>
|
13
13
|
{% if page.title %}<meta itemprop="headline" content="{{ page.title | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
|
14
14
|
{% if page.excerpt %}<meta itemprop="description" content="{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
|
15
15
|
{% if page.date %}<meta itemprop="datePublished" content="{{ page.date | date_to_xmlschema }}">{% endif %}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Minimal Mistakes Jekyll Theme 4.26.
|
2
|
+
* Minimal Mistakes Jekyll Theme 4.26.2 by Michael Rose
|
3
3
|
* Copyright 2013-2024 Michael Rose - mademistakes.com | @mmistakes
|
4
4
|
* Free for personal and commercial use under the MIT license
|
5
5
|
* https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE
|
@@ -211,118 +211,35 @@ body:hover .visually-hidden button {
|
|
211
211
|
color: $text-color;
|
212
212
|
}
|
213
213
|
|
214
|
-
|
215
|
-
|
216
|
-
color:
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
color:
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
color:
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
color:
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
color:
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
.fa-github-alt,
|
244
|
-
.fa-github-square {
|
245
|
-
color: $github-color;
|
246
|
-
}
|
247
|
-
|
248
|
-
.fa-gitlab {
|
249
|
-
color: $gitlab-color;
|
250
|
-
}
|
251
|
-
|
252
|
-
.fa-instagram {
|
253
|
-
color: $instagram-color;
|
254
|
-
}
|
255
|
-
|
256
|
-
.fa-keybase {
|
257
|
-
color: $keybase-color;
|
258
|
-
}
|
259
|
-
|
260
|
-
.fa-lastfm,
|
261
|
-
.fa-lastfm-square {
|
262
|
-
color: $lastfm-color;
|
263
|
-
}
|
264
|
-
|
265
|
-
.fa-linkedin,
|
266
|
-
.fa-linkedin-in {
|
267
|
-
color: $linkedin-color;
|
268
|
-
}
|
269
|
-
|
270
|
-
.fa-mastodon,
|
271
|
-
.fa-mastodon-square {
|
272
|
-
color: $mastodon-color;
|
273
|
-
}
|
274
|
-
|
275
|
-
.fa-pinterest,
|
276
|
-
.fa-pinterest-p,
|
277
|
-
.fa-pinterest-square {
|
278
|
-
color: $pinterest-color;
|
279
|
-
}
|
280
|
-
|
281
|
-
.fa-reddit {
|
282
|
-
color: $reddit-color;
|
283
|
-
}
|
284
|
-
|
285
|
-
.fa-rss,
|
286
|
-
.fa-rss-square {
|
287
|
-
color: $rss-color;
|
288
|
-
}
|
289
|
-
|
290
|
-
.fa-soundcloud {
|
291
|
-
color: $soundcloud-color;
|
292
|
-
}
|
293
|
-
|
294
|
-
.fa-stack-exchange,
|
295
|
-
.fa-stack-overflow {
|
296
|
-
color: $stackoverflow-color;
|
297
|
-
}
|
298
|
-
|
299
|
-
.fa-tumblr,
|
300
|
-
.fa-tumblr-square {
|
301
|
-
color: $tumblr-color;
|
302
|
-
}
|
303
|
-
|
304
|
-
.fa-twitter,
|
305
|
-
.fa-twitter-square {
|
306
|
-
color: $twitter-color;
|
307
|
-
}
|
308
|
-
|
309
|
-
.fa-vimeo,
|
310
|
-
.fa-vimeo-square,
|
311
|
-
.fa-vimeo-v {
|
312
|
-
color: $vimeo-color;
|
313
|
-
}
|
314
|
-
|
315
|
-
.fa-vine {
|
316
|
-
color: $vine-color;
|
317
|
-
}
|
318
|
-
|
319
|
-
.fa-youtube {
|
320
|
-
color: $youtube-color;
|
321
|
-
}
|
322
|
-
|
323
|
-
.fa-xing,
|
324
|
-
.fa-xing-square {
|
325
|
-
color: $xing-color;
|
214
|
+
@each $color, $icons in (
|
215
|
+
$behance-color: ".fa-behance, .fa-behance-square",
|
216
|
+
$bitbucket-color: ".fa-bitbucket",
|
217
|
+
$dribbble-color: ".fa-dribbble, .fa-dribbble-square",
|
218
|
+
$facebook-color: ".fa-facebook, .fa-facebook-square, .fa-facebook-f",
|
219
|
+
$flickr-color: ".fa-flickr",
|
220
|
+
$foursquare-color: ".fa-foursquare",
|
221
|
+
$github-color: ".fa-github, .fa-github-alt, .fa-github-square",
|
222
|
+
$gitlab-color: ".fa-gitlab",
|
223
|
+
$instagram-color: ".fa-instagram",
|
224
|
+
$keybase-color: ".fa-keybase",
|
225
|
+
$lastfm-color: ".fa-lastfm, .fa-lastfm-square",
|
226
|
+
$linkedin-color: ".fa-linkedin, .fa-linkedin-in",
|
227
|
+
$mastodon-color: ".fa-mastodon, .fa-mastodon-square",
|
228
|
+
$pinterest-color: ".fa-pinterest, .fa-pinterest-p, .fa-pinterest-square",
|
229
|
+
$reddit-color: ".fa-reddit",
|
230
|
+
$rss-color: ".fa-rss, .fa-rss-square",
|
231
|
+
$soundcloud-color: ".fa-soundcloud",
|
232
|
+
$stackoverflow-color: ".fa-stack-exchange, .fa-stack-overflow",
|
233
|
+
$tumblr-color: ".fa-tumblr, .fa-tumblr-square",
|
234
|
+
$twitter-color: ".fa-twitter, .fa-twitter-square",
|
235
|
+
$vimeo-color: ".fa-vimeo, .fa-vimeo-square, .fa-vimeo-v",
|
236
|
+
$vine-color: ".fa-vine",
|
237
|
+
$xing-color: ".fa-xing, .fa-xing-square",
|
238
|
+
$youtube-color: ".fa-youtube",
|
239
|
+
) {
|
240
|
+
#{$icons} {
|
241
|
+
color: $color;
|
242
|
+
}
|
326
243
|
}
|
327
244
|
}
|
328
245
|
|
@@ -608,25 +525,26 @@ a.reversefootnote {
|
|
608
525
|
}
|
609
526
|
|
610
527
|
pre {
|
528
|
+
&.highlight .clipboard-copy-button {
|
529
|
+
color: #ffffca;
|
530
|
+
}
|
531
|
+
|
611
532
|
.clipboard-copy-button {
|
612
533
|
display: block;
|
613
534
|
position: absolute;
|
614
535
|
top: 0.6em;
|
615
536
|
right: 0.5em;
|
537
|
+
width: 1.8em;
|
538
|
+
height: 1.5em;
|
616
539
|
z-index: 1;
|
617
540
|
background: none;
|
618
541
|
border: none;
|
619
542
|
outline: none;
|
620
543
|
border-radius: 0.1em;
|
621
544
|
padding: 0.2em 0.5em;
|
622
|
-
color: white;
|
623
545
|
opacity: 0.4;
|
624
546
|
transition: color 0.25s linear -0.25s, opacity 0.25s linear;
|
625
547
|
|
626
|
-
&:hover {
|
627
|
-
color: #ffffca;
|
628
|
-
}
|
629
|
-
|
630
548
|
&::before {
|
631
549
|
content: '';
|
632
550
|
position: absolute;
|
@@ -637,6 +555,22 @@ pre {
|
|
637
555
|
z-index: 2;
|
638
556
|
}
|
639
557
|
|
558
|
+
i {
|
559
|
+
position: absolute;
|
560
|
+
top: 0.25em;
|
561
|
+
right: 0.25em;
|
562
|
+
&.copied {
|
563
|
+
opacity: 0;
|
564
|
+
}
|
565
|
+
}
|
566
|
+
|
567
|
+
&.copied i {
|
568
|
+
opacity: 0;
|
569
|
+
&.copied {
|
570
|
+
opacity: 1;
|
571
|
+
}
|
572
|
+
}
|
573
|
+
|
640
574
|
@at-root {
|
641
575
|
.no-copy & {
|
642
576
|
display: none;
|
data/assets/css/main.scss
CHANGED
data/assets/js/_main.js
CHANGED
@@ -61,7 +61,7 @@ $(document).ready(function () {
|
|
61
61
|
}
|
62
62
|
|
63
63
|
// Auto scroll sticky ToC with content
|
64
|
-
|
64
|
+
const scrollTocToContent = function (event) {
|
65
65
|
var target = event.target;
|
66
66
|
var scrollOptions = { behavior: "auto", block: "nearest", inline: "start" };
|
67
67
|
|
@@ -75,7 +75,12 @@ $(document).ready(function () {
|
|
75
75
|
} else {
|
76
76
|
target.scrollIntoView(scrollOptions);
|
77
77
|
}
|
78
|
-
}
|
78
|
+
};
|
79
|
+
|
80
|
+
// Has issues on Firefox, whitelist Chrome for now
|
81
|
+
if (!!window.chrome) {
|
82
|
+
document.addEventListener("gumshoeActivate", scrollTocToContent);
|
83
|
+
}
|
79
84
|
|
80
85
|
// add lightbox class to all image links
|
81
86
|
$(
|
@@ -190,12 +195,23 @@ $(document).ready(function () {
|
|
190
195
|
var result = copyText(codeBlock.innerText);
|
191
196
|
// Restore the focus to the button
|
192
197
|
thisButton.focus();
|
198
|
+
if (result) {
|
199
|
+
if (thisButton.interval !== null) {
|
200
|
+
clearInterval(thisButton.interval);
|
201
|
+
}
|
202
|
+
thisButton.classList.add('copied');
|
203
|
+
thisButton.interval = setTimeout(function () {
|
204
|
+
thisButton.classList.remove('copied');
|
205
|
+
clearInterval(thisButton.interval);
|
206
|
+
thisButton.interval = null;
|
207
|
+
}, 1500);
|
208
|
+
}
|
193
209
|
return result;
|
194
210
|
};
|
195
211
|
|
196
212
|
if (window.enable_copy_code_button) {
|
197
213
|
document
|
198
|
-
.querySelectorAll(".page__content pre > code")
|
214
|
+
.querySelectorAll(".page__content pre.highlight > code")
|
199
215
|
.forEach(function (element, index, parentList) {
|
200
216
|
// Locate the <pre> element
|
201
217
|
var container = element.parentElement;
|
@@ -206,7 +222,7 @@ $(document).ready(function () {
|
|
206
222
|
var copyButton = document.createElement("button");
|
207
223
|
copyButton.title = "Copy to clipboard";
|
208
224
|
copyButton.className = "clipboard-copy-button";
|
209
|
-
copyButton.innerHTML = '<span class="sr-only">Copy code</span><i class="far fa-copy"></i>';
|
225
|
+
copyButton.innerHTML = '<span class="sr-only">Copy code</span><i class="far fa-fw fa-copy"></i><i class="fas fa-fw fa-check copied"></i>';
|
210
226
|
copyButton.addEventListener("click", copyButtonEventListener);
|
211
227
|
container.prepend(copyButton);
|
212
228
|
});
|