Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
wetty committed Feb 7, 2017
2 parents 41bddc2 + 3a7e438 commit a6f9cb4
Show file tree
Hide file tree
Showing 14 changed files with 136 additions and 74 deletions.
73 changes: 57 additions & 16 deletions _data/ui-text.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ zh: &DEFAULT_ZH
pagination_next : "向后"
breadcrumb_home_label : "首页"
breadcrumb_separator : "/"
menu_label :
menu_label : "切换菜单"
toc_label : "在本页上"
ext_link_label : "直接链接"
less_than : "少于"
Expand All @@ -334,22 +334,22 @@ zh: &DEFAULT_ZH
related_label : "猜您还喜欢"
follow_label : "关注:"
feed_label : "Feed"
powered_by : "Powered by"
powered_by : "技术来自于"
website_label : "网站"
email_label : "Email"
email_label : "电子邮箱"
recent_posts : "最新文章"
undefined_wpm : "Undefined parameter words_per_minute at _config.yml"
comment_form_info : "Your email address will not be published. Required fields are marked"
comment_form_comment_label : "Comment"
comment_form_md_info : "Markdown is supported."
comment_form_name_label : "Name"
comment_form_email_label : "Email address"
comment_form_website_label : "Website (optional)"
comment_btn_submit : "Submit Comment"
comment_btn_submitted : "Submitted"
comment_success_msg : "Thanks for your comment! It will show on the site once it has been approved."
comment_error_msg : "Sorry, there was an error with your submission. Please make sure all required fields have been completed and try again."
loading_label : "Loading..."
undefined_wpm : "_config.yml配置中words_per_minute字段未定义"
comment_form_info : "您的电子邮箱地址并不会被展示。请填写标记为必须的字段。"
comment_form_comment_label : "评论"
comment_form_md_info : "Markdown语法已支持。"
comment_form_name_label : "姓名"
comment_form_email_label : "电子邮箱"
comment_form_website_label : "网站(可选)"
comment_btn_submit : "提交评论"
comment_btn_submitted : "已提交"
comment_success_msg : "感谢您的评论!被批准后它会立即在此站点展示。"
comment_error_msg : "很抱歉,您的提交存在错误。请确保所有必填字段都已填写正确,然后再试一次。"
loading_label : "正在加载..."
zh-CN:
<<: *DEFAULT_ZH
zh-HK:
Expand Down Expand Up @@ -411,6 +411,47 @@ de-LI:
<<: *DEFAULT_DE
de-LU:
<<: *DEFAULT_DE

# Nepali (Nepal)
# -----------------
ne: &DEFAULT_NE
page : "पृष्‍ठ"
pagination_previous : "अघिल्लो"
pagination_next : "अर्को"
breadcrumb_home_label : "गृह"
breadcrumb_separator : "/"
menu_label : "टगल मेनु"
toc_label : "यो पृष्‍ठमा"
ext_link_label : "सिधा सम्पर्क"
less_than : "कम्तिमा"
minute_read : "मिनेट पढ्नुहोस्"
share_on_label : "शेयर गर्नुहोस्"
meta_label :
tags_label : "ट्यागहरू:"
categories_label : "वर्गहरु:"
date_label : "अद्यावधिक:"
comments_label : "टिप्पणी दिनुहोस्"
comments_title : "टिप्पणीहरू"
more_label : "अझै सिक्नुहोस्"
related_label : "तपाईं रुचाउन सक्नुहुन्छ "
follow_label : "पछ्याउनुहोस्:"
feed_label : "फिड"
powered_by : "Powered by"
website_label : "वेबसाइट"
email_label : "इमेल"
recent_posts : "ताजा लेखहरु"
undefined_wpm : "अपरिभाषित प्यारामिटर शब्दहरू_प्रति_मिनेट at _config.yml"
comment_form_info : "तपाइँको इमेल ठेगाना प्रकाशित गरिने छैन।आवश्यक जानकारीहरुमा चिन्ह लगाइको छ"
comment_form_comment_label : "टिप्पणी"
comment_form_md_info : "मार्कडाउन समर्थित छ।"
comment_form_name_label : "नाम"
comment_form_email_label : "इमेल ठेगाना"
comment_form_website_label : "वेबसाइट (वैकल्पिक)"
comment_btn_submit : "टिप्पणी दिनुहोस् "
comment_btn_submitted : "टिप्पणी भयो"
comment_success_msg : "तपाईंको टिप्पणीको लागि धन्यवाद! एक पटक यो अनुमोदन गरेपछी यो साइटमा देखाउनेछ।"
comment_error_msg : "माफ गर्नुहोस्, तपाईंको टिप्पणी त्रुटि थियो।सबै आवश्यक जानकारीहरु पूरा गरिएको छ भने निश्चित गर्नुहोस् र फेरि प्रयास गर्नुहोस्।"
loading_label : "लोड हुँदैछ ..."
ne-NP:
<<: *DEFAULT_NE
# Another locale
# --------------
4 changes: 2 additions & 2 deletions _includes/analytics-providers/google-universal.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', '{{ site.analytics.google.tracking_id }}', 'auto');
ga('send', 'pageview');
</script>
</script>
4 changes: 2 additions & 2 deletions _includes/page__hero.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{% if page.header.overlay_color or page.header.overlay_image %}
<div class="wrapper">
<h1 class="page__title" itemprop="headline">
{% if paginator %}
{% if paginator and site.paginate_show_page_num %}
{{ site.title }}{% unless paginator.page == 1 %} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}
{% else %}
{{ page.title | default: site.title | markdownify | remove: "<p>" | remove: "</p>" }}
Expand All @@ -50,4 +50,4 @@ <h1 class="page__title" itemprop="headline">
{% if page.header.caption %}
<span class="page__hero-caption">{{ page.header.caption | markdownify | remove: "<p>" | remove: "</p>" }}</span>
{% endif %}
</div>
</div>
4 changes: 4 additions & 0 deletions _includes/page__hero_video.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% capture video_id %}{{ page.header.video.id }}{% endcapture %}
{% capture video_provider %}{{ page.header.video.provider }}{% endcapture %}

{% include video id=video_id provider=video_provider %}
19 changes: 10 additions & 9 deletions _includes/paginator.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
{% if paginator.total_pages > 1 %}
<nav class="pagination">
{% assign first_page_path = site.paginate_path | replace: 'page:num', '' | replace: '//', '/' | absolute_url %}
<ul>
{% comment %} Link for previous page {% endcomment %}
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<li><a href="{{ '/' | absolute_url }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
<li><a href="{{ first_page_path }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
{% else %}
<li><a href="{{ '/page' | absolute_url }}{{ paginator.previous_page | append: '/' }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
<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>
{% endif %}
{% else %}
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</span></a></li>
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</span></a></li>
{% endif %}

{% comment %} First page {% endcomment %}
{% if paginator.page == 1 %}
<li><a href="#" class="disabled current">1</a></li>
{% else %}
<li><a href="{{ '/' | absolute_url }}">1</a></li>
<li><a href="{{ first_page_path }}">1</a></li>
{% endif %}

{% assign page_start = 2 %}
Expand All @@ -34,15 +35,15 @@

{% for index in (page_start..page_end) %}
{% if index == paginator.page %}
<li><a href="{{ '/page' | absolute_url }}{{ index | append: '/' }}" class="disabled current">{{ index }}</a></li>
<li><a href="{{ site.paginate_path | replace: ':num', index | replace: '//', '/' | absolute_url }}" class="disabled current">{{ index }}</a></li>
{% else %}
{% comment %} Distance from current page and this link {% endcomment %}
{% assign dist = paginator.page | minus: index %}
{% if dist < 0 %}
{% comment %} Distance must be a positive value {% endcomment %}
{% assign dist = 0 | minus: dist %}
{% endif %}
<li><a href="{{ '/page' | absolute_url }}{{ index | append: '/' }}">{{ index }}</a></li>
<li><a href="{{ site.paginate_path | replace: ':num', index | absolute_url }}">{{ index }}</a></li>
{% endif %}
{% endfor %}

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

{% comment %} Link next page {% endcomment %}
{% if paginator.next_page %}
<li><a href="{{ '/page' | absolute_url }}{{ paginator.next_page }}/">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a></li>
<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>
{% else %}
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</span></a></li>
{% endif %}
</ul>
</nav>
{% endif %}
{% endif %}
11 changes: 11 additions & 0 deletions _includes/video
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% capture video_id %}{{ include.id }}{% endcapture %}
{% capture video_provider %}{{ include.provider }}{% endcapture %}

<!-- Courtesy of embedresponsively.com //-->
<div class="responsive-video-container">
{% if video_provider == "vimeo" %}
<iframe src="http://player.vimeo.com/video/{{ video_id }}" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
{% elsif video_provider == "youtube" %}
<iframe src="https://www.youtube.com/embed/{{ video_id }}" frameborder="0" allowfullscreen></iframe>
{% endif %}
</div>
2 changes: 2 additions & 0 deletions _layouts/archive.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

{% if page.header.overlay_color or page.header.overlay_image or page.header.image %}
{% include page__hero.html %}
{% elsif page.header.video.id and page.header.video.provider %}
{% include page__hero_video.html %}
{% endif %}

{% if page.url != "/" and site.breadcrumbs %}
Expand Down
4 changes: 3 additions & 1 deletion _layouts/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

{% if page.header.overlay_color or page.header.overlay_image or page.header.image %}
{% include page__hero.html %}
{% elsif page.header.video.id and page.header.video.provider %}
{% include page__hero_video.html %}
{% endif %}

{% if page.url != "/" and site.breadcrumbs %}
Expand Down Expand Up @@ -71,4 +73,4 @@ <h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label
</div>
</div>
{% endif %}
</div>
</div>
2 changes: 2 additions & 0 deletions _layouts/splash.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

{% if page.header.overlay_color or page.header.overlay_image or page.header.image %}
{% include page__hero.html %}
{% elsif page.header.video.id and page.header.video.provider %}
{% include page__hero_video.html %}
{% endif %}

<div id="main" role="main">
Expand Down
38 changes: 37 additions & 1 deletion _sass/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -467,4 +467,40 @@ a.reversefootnote {
.required {
color: $danger-color;
font-weight: bold;
}
}


/*
Google Custom Search Engine
========================================================================== */

.gsc-control-cse {

table, tr, td {
border: 0; /* remove table borders widget */
}
}

/*
Responsive Video Embed
========================================================================== */

.responsive-video-container {
position: relative;
margin-bottom: 1em;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
max-width: 100%;

iframe,
object,
embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}

28 changes: 0 additions & 28 deletions assets/js/_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,7 @@ $(document).ready(function(){
// FitVids init
$("#main").fitVids();

// init sticky sidebar
$(".sticky").Stickyfill();

var stickySideBar = function(){
var show = $(".author__urls-wrapper button").length === 0 ? $(window).width() > 1024 : !$(".author__urls-wrapper button").is(":visible");
// console.log("has button: " + $(".author__urls-wrapper button").length === 0);
// console.log("Window Width: " + windowWidth);
// console.log("show: " + show);
//old code was if($(window).width() > 1024)
if (show) {
// fix
Stickyfill.rebuild();
Stickyfill.init();
$(".author__urls").show();
} else {
// unfix
Stickyfill.stop();
$(".author__urls").hide();
}
};

stickySideBar();

$(window).resize(function(){
stickySideBar();
});

// Follow menu drop down

$(".author__urls-wrapper button").on("click", function() {
$(".author__urls").fadeToggle("fast", function() {});
$(".author__urls-wrapper button").toggleClass("open");
Expand Down
9 changes: 4 additions & 5 deletions assets/js/main.min.js

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions assets/js/plugins/stickyfill.min.js

This file was deleted.

Loading

0 comments on commit a6f9cb4

Please sign in to comment.