Skip to content

Commit a6f9cb4

Browse files
committed
Merge branch 'master' of https://github.com/mmistakes/minimal-mistakes into gh-pages
* 'master' of https://github.com/mmistakes/minimal-mistakes: (22 commits) Bump version to 4.2.1 Update CHANGELOG and history Document moving paginated home page to an alternate location Pagination now works for index.html files in subfolders. Links to next page consider baseurl now. (mmistakes#764) Pagination now works for index.html files in subfolders. Links to next page consider baseurl now. (mmistakes#764) Add https prefix to google-universal embed code. (mmistakes#772) Add https prefix to google-universal embed code. (mmistakes#772) Bump version to 4.2.0 Bump jekyll-sitemap to (1.0) Update CHANGELOG and history Improve video helper documentation Add video header support to `archive` and `splash` layouts Rename `responsive_video` helper to `video` Add some white-space below video embeds Add Nepali (Nepalese) text Add page hero video for vimeo/youtube using embedresponsively.com code (mmistakes#788) Nepalese Language (mmistakes#785) invalid `analytics` example fix (mmistakes#783) Remove borders from table elements found in Google Custom Search Engine widget - Close mmistakes#759 Complete Simplified Chinese Translation of Theme UI (mmistakes#747) ... # Conflicts: # CHANGELOG.md # README.md # docs/_data/ui-text.yml # docs/_docs/05-configuration.md # docs/_docs/08-ui-text.md # docs/_docs/10-layouts.md # docs/_docs/14-helpers.md # docs/_docs/17-javascript.md # docs/_docs/18-history.md # docs/_includes/analytics-providers/google-universal.html # docs/_includes/page__hero.html # docs/_includes/paginator.html # docs/_layouts/archive.html # docs/_layouts/single.html # docs/_layouts/splash.html # docs/_pages/about.md # docs/_pages/home.md # docs/_sass/_utilities.scss # docs/assets/js/_main.js # docs/assets/js/main.min.js # minimal-mistakes-jekyll.gemspec # test/_data/ui-text.yml
2 parents 41bddc2 + 3a7e438 commit a6f9cb4

14 files changed

+136
-74
lines changed

_data/ui-text.yml

+57-16
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ zh: &DEFAULT_ZH
318318
pagination_next : "向后"
319319
breadcrumb_home_label : "首页"
320320
breadcrumb_separator : "/"
321-
menu_label :
321+
menu_label : "切换菜单"
322322
toc_label : "在本页上"
323323
ext_link_label : "直接链接"
324324
less_than : "少于"
@@ -334,22 +334,22 @@ zh: &DEFAULT_ZH
334334
related_label : "猜您还喜欢"
335335
follow_label : "关注:"
336336
feed_label : "Feed"
337-
powered_by : "Powered by"
337+
powered_by : "技术来自于"
338338
website_label : "网站"
339-
email_label : "Email"
339+
email_label : "电子邮箱"
340340
recent_posts : "最新文章"
341-
undefined_wpm : "Undefined parameter words_per_minute at _config.yml"
342-
comment_form_info : "Your email address will not be published. Required fields are marked"
343-
comment_form_comment_label : "Comment"
344-
comment_form_md_info : "Markdown is supported."
345-
comment_form_name_label : "Name"
346-
comment_form_email_label : "Email address"
347-
comment_form_website_label : "Website (optional)"
348-
comment_btn_submit : "Submit Comment"
349-
comment_btn_submitted : "Submitted"
350-
comment_success_msg : "Thanks for your comment! It will show on the site once it has been approved."
351-
comment_error_msg : "Sorry, there was an error with your submission. Please make sure all required fields have been completed and try again."
352-
loading_label : "Loading..."
341+
undefined_wpm : "_config.yml配置中words_per_minute字段未定义"
342+
comment_form_info : "您的电子邮箱地址并不会被展示。请填写标记为必须的字段。"
343+
comment_form_comment_label : "评论"
344+
comment_form_md_info : "Markdown语法已支持。"
345+
comment_form_name_label : "姓名"
346+
comment_form_email_label : "电子邮箱"
347+
comment_form_website_label : "网站(可选)"
348+
comment_btn_submit : "提交评论"
349+
comment_btn_submitted : "已提交"
350+
comment_success_msg : "感谢您的评论!被批准后它会立即在此站点展示。"
351+
comment_error_msg : "很抱歉,您的提交存在错误。请确保所有必填字段都已填写正确,然后再试一次。"
352+
loading_label : "正在加载..."
353353
zh-CN:
354354
<<: *DEFAULT_ZH
355355
zh-HK:
@@ -411,6 +411,47 @@ de-LI:
411411
<<: *DEFAULT_DE
412412
de-LU:
413413
<<: *DEFAULT_DE
414-
414+
# Nepali (Nepal)
415+
# -----------------
416+
ne: &DEFAULT_NE
417+
page : "पृष्‍ठ"
418+
pagination_previous : "अघिल्लो"
419+
pagination_next : "अर्को"
420+
breadcrumb_home_label : "गृह"
421+
breadcrumb_separator : "/"
422+
menu_label : "टगल मेनु"
423+
toc_label : "यो पृष्‍ठमा"
424+
ext_link_label : "सिधा सम्पर्क"
425+
less_than : "कम्तिमा"
426+
minute_read : "मिनेट पढ्नुहोस्"
427+
share_on_label : "शेयर गर्नुहोस्"
428+
meta_label :
429+
tags_label : "ट्यागहरू:"
430+
categories_label : "वर्गहरु:"
431+
date_label : "अद्यावधिक:"
432+
comments_label : "टिप्पणी दिनुहोस्"
433+
comments_title : "टिप्पणीहरू"
434+
more_label : "अझै सिक्नुहोस्"
435+
related_label : "तपाईं रुचाउन सक्नुहुन्छ "
436+
follow_label : "पछ्याउनुहोस्:"
437+
feed_label : "फिड"
438+
powered_by : "Powered by"
439+
website_label : "वेबसाइट"
440+
email_label : "इमेल"
441+
recent_posts : "ताजा लेखहरु"
442+
undefined_wpm : "अपरिभाषित प्यारामिटर शब्दहरू_प्रति_मिनेट at _config.yml"
443+
comment_form_info : "तपाइँको इमेल ठेगाना प्रकाशित गरिने छैन।आवश्यक जानकारीहरुमा चिन्ह लगाइको छ"
444+
comment_form_comment_label : "टिप्पणी"
445+
comment_form_md_info : "मार्कडाउन समर्थित छ।"
446+
comment_form_name_label : "नाम"
447+
comment_form_email_label : "इमेल ठेगाना"
448+
comment_form_website_label : "वेबसाइट (वैकल्पिक)"
449+
comment_btn_submit : "टिप्पणी दिनुहोस् "
450+
comment_btn_submitted : "टिप्पणी भयो"
451+
comment_success_msg : "तपाईंको टिप्पणीको लागि धन्यवाद! एक पटक यो अनुमोदन गरेपछी यो साइटमा देखाउनेछ।"
452+
comment_error_msg : "माफ गर्नुहोस्, तपाईंको टिप्पणी त्रुटि थियो।सबै आवश्यक जानकारीहरु पूरा गरिएको छ भने निश्चित गर्नुहोस् र फेरि प्रयास गर्नुहोस्।"
453+
loading_label : "लोड हुँदैछ ..."
454+
ne-NP:
455+
<<: *DEFAULT_NE
415456
# Another locale
416457
# --------------

_includes/analytics-providers/google-universal.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
33
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
44
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
5+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
66

77
ga('create', '{{ site.analytics.google.tracking_id }}', 'auto');
88
ga('send', 'pageview');
9-
</script>
9+
</script>

_includes/page__hero.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
{% if page.header.overlay_color or page.header.overlay_image %}
2929
<div class="wrapper">
3030
<h1 class="page__title" itemprop="headline">
31-
{% if paginator %}
31+
{% if paginator and site.paginate_show_page_num %}
3232
{{ site.title }}{% unless paginator.page == 1 %} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}
3333
{% else %}
3434
{{ page.title | default: site.title | markdownify | remove: "<p>" | remove: "</p>" }}
@@ -50,4 +50,4 @@ <h1 class="page__title" itemprop="headline">
5050
{% if page.header.caption %}
5151
<span class="page__hero-caption">{{ page.header.caption | markdownify | remove: "<p>" | remove: "</p>" }}</span>
5252
{% endif %}
53-
</div>
53+
</div>

_includes/page__hero_video.html

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{% capture video_id %}{{ page.header.video.id }}{% endcapture %}
2+
{% capture video_provider %}{{ page.header.video.provider }}{% endcapture %}
3+
4+
{% include video id=video_id provider=video_provider %}

_includes/paginator.html

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
{% if paginator.total_pages > 1 %}
22
<nav class="pagination">
3+
{% assign first_page_path = site.paginate_path | replace: 'page:num', '' | replace: '//', '/' | absolute_url %}
34
<ul>
45
{% comment %} Link for previous page {% endcomment %}
56
{% if paginator.previous_page %}
67
{% if paginator.previous_page == 1 %}
7-
<li><a href="{{ '/' | absolute_url }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
8+
<li><a href="{{ first_page_path }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
89
{% else %}
9-
<li><a href="{{ '/page' | absolute_url }}{{ paginator.previous_page | append: '/' }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
10+
<li><a href="{{ site.paginate_path | replace: ':num', paginator.previous_page | replace: '//', '/' | absolute_url }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
1011
{% endif %}
1112
{% else %}
12-
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</span></a></li>
13+
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</span></a></li>
1314
{% endif %}
1415

1516
{% comment %} First page {% endcomment %}
1617
{% if paginator.page == 1 %}
1718
<li><a href="#" class="disabled current">1</a></li>
1819
{% else %}
19-
<li><a href="{{ '/' | absolute_url }}">1</a></li>
20+
<li><a href="{{ first_page_path }}">1</a></li>
2021
{% endif %}
2122

2223
{% assign page_start = 2 %}
@@ -34,15 +35,15 @@
3435

3536
{% for index in (page_start..page_end) %}
3637
{% if index == paginator.page %}
37-
<li><a href="{{ '/page' | absolute_url }}{{ index | append: '/' }}" class="disabled current">{{ index }}</a></li>
38+
<li><a href="{{ site.paginate_path | replace: ':num', index | replace: '//', '/' | absolute_url }}" class="disabled current">{{ index }}</a></li>
3839
{% else %}
3940
{% comment %} Distance from current page and this link {% endcomment %}
4041
{% assign dist = paginator.page | minus: index %}
4142
{% if dist < 0 %}
4243
{% comment %} Distance must be a positive value {% endcomment %}
4344
{% assign dist = 0 | minus: dist %}
4445
{% endif %}
45-
<li><a href="{{ '/page' | absolute_url }}{{ index | append: '/' }}">{{ index }}</a></li>
46+
<li><a href="{{ site.paginate_path | replace: ':num', index | absolute_url }}">{{ index }}</a></li>
4647
{% endif %}
4748
{% endfor %}
4849

@@ -54,15 +55,15 @@
5455
{% if paginator.page == paginator.total_pages %}
5556
<li><a href="#" class="disabled current">{{ paginator.page }}</a></li>
5657
{% else %}
57-
<li><a href="{{ '/page' | absolute_url }}{{ paginator.total_pages }}/">{{ paginator.total_pages }}</a></li>
58+
<li><a href="{{ site.paginate_path | replace: ':num', paginator.total_pages | replace: '//', '/' | absolute_url }}">{{ paginator.total_pages }}</a></li>
5859
{% endif %}
5960

6061
{% comment %} Link next page {% endcomment %}
6162
{% if paginator.next_page %}
62-
<li><a href="{{ '/page' | absolute_url }}{{ paginator.next_page }}/">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a></li>
63+
<li><a href="{{ site.paginate_path | replace: ':num', paginator.next_page | replace: '//', '/' | absolute_url }}">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a></li></a></li>
6364
{% else %}
6465
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</span></a></li>
6566
{% endif %}
6667
</ul>
6768
</nav>
68-
{% endif %}
69+
{% endif %}

_includes/video

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{% capture video_id %}{{ include.id }}{% endcapture %}
2+
{% capture video_provider %}{{ include.provider }}{% endcapture %}
3+
4+
<!-- Courtesy of embedresponsively.com //-->
5+
<div class="responsive-video-container">
6+
{% if video_provider == "vimeo" %}
7+
<iframe src="http://player.vimeo.com/video/{{ video_id }}" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
8+
{% elsif video_provider == "youtube" %}
9+
<iframe src="https://www.youtube.com/embed/{{ video_id }}" frameborder="0" allowfullscreen></iframe>
10+
{% endif %}
11+
</div>

_layouts/archive.html

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
{% if page.header.overlay_color or page.header.overlay_image or page.header.image %}
66
{% include page__hero.html %}
7+
{% elsif page.header.video.id and page.header.video.provider %}
8+
{% include page__hero_video.html %}
79
{% endif %}
810

911
{% if page.url != "/" and site.breadcrumbs %}

_layouts/single.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
{% if page.header.overlay_color or page.header.overlay_image or page.header.image %}
66
{% include page__hero.html %}
7+
{% elsif page.header.video.id and page.header.video.provider %}
8+
{% include page__hero_video.html %}
79
{% endif %}
810

911
{% if page.url != "/" and site.breadcrumbs %}
@@ -71,4 +73,4 @@ <h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label
7173
</div>
7274
</div>
7375
{% endif %}
74-
</div>
76+
</div>

_layouts/splash.html

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
{% if page.header.overlay_color or page.header.overlay_image or page.header.image %}
66
{% include page__hero.html %}
7+
{% elsif page.header.video.id and page.header.video.provider %}
8+
{% include page__hero_video.html %}
79
{% endif %}
810

911
<div id="main" role="main">

_sass/_utilities.scss

+37-1
Original file line numberDiff line numberDiff line change
@@ -467,4 +467,40 @@ a.reversefootnote {
467467
.required {
468468
color: $danger-color;
469469
font-weight: bold;
470-
}
470+
}
471+
472+
473+
/*
474+
Google Custom Search Engine
475+
========================================================================== */
476+
477+
.gsc-control-cse {
478+
479+
table, tr, td {
480+
border: 0; /* remove table borders widget */
481+
}
482+
}
483+
484+
/*
485+
Responsive Video Embed
486+
========================================================================== */
487+
488+
.responsive-video-container {
489+
position: relative;
490+
margin-bottom: 1em;
491+
padding-bottom: 56.25%;
492+
height: 0;
493+
overflow: hidden;
494+
max-width: 100%;
495+
496+
iframe,
497+
object,
498+
embed {
499+
position: absolute;
500+
top: 0;
501+
left: 0;
502+
width: 100%;
503+
height: 100%;
504+
}
505+
}
506+

assets/js/_main.js

-28
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,7 @@ $(document).ready(function(){
2525
// FitVids init
2626
$("#main").fitVids();
2727

28-
// init sticky sidebar
29-
$(".sticky").Stickyfill();
30-
31-
var stickySideBar = function(){
32-
var show = $(".author__urls-wrapper button").length === 0 ? $(window).width() > 1024 : !$(".author__urls-wrapper button").is(":visible");
33-
// console.log("has button: " + $(".author__urls-wrapper button").length === 0);
34-
// console.log("Window Width: " + windowWidth);
35-
// console.log("show: " + show);
36-
//old code was if($(window).width() > 1024)
37-
if (show) {
38-
// fix
39-
Stickyfill.rebuild();
40-
Stickyfill.init();
41-
$(".author__urls").show();
42-
} else {
43-
// unfix
44-
Stickyfill.stop();
45-
$(".author__urls").hide();
46-
}
47-
};
48-
49-
stickySideBar();
50-
51-
$(window).resize(function(){
52-
stickySideBar();
53-
});
54-
5528
// Follow menu drop down
56-
5729
$(".author__urls-wrapper button").on("click", function() {
5830
$(".author__urls").fadeToggle("fast", function() {});
5931
$(".author__urls-wrapper button").toggleClass("open");

assets/js/main.min.js

+4-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/plugins/stickyfill.min.js

-8
This file was deleted.

0 commit comments

Comments
 (0)