Adding MG_DISABLE_SUMMARY + ensuring W3C validator-compliant

This commit is contained in:
Lucas Cimon 2017-08-09 02:11:13 +02:00
parent 33d690f035
commit 1f204bb2d9
8 changed files with 39 additions and 26 deletions

View File

@ -1,5 +1,9 @@
html, h1 {
font-family: "Oswald", "Helvetica Neue",Helvetica,Arial,sans-serif; }
html { html {
font: 400 14px / 20px "Oswald", "Helvetica Neue",Helvetica,Arial,sans-serif; } font-weight: 400;
font-size: 14px;
line-height: 20px; }
a { a {
color: #33b5e5; } color: #33b5e5; }

View File

@ -4,7 +4,7 @@ $(document).ready(function() {
$('.mg-container-social').height($('article').height()); $('.mg-container-social').height($('article').height());
$('#mg-panel-social').stick_in_parent({offset_top: 35}); $('#mg-panel-social').stick_in_parent({offset_top: 35});
$('#tipue_search_input').tipuesearch({ $('.tipue_search').tipuesearch({
'show': 10, 'show': 10,
'mode': 'json', 'mode': 'json',
'showURL': false, 'showURL': false,

View File

@ -97,7 +97,7 @@ http://www.tipue.com/search
} }
if (getURLP('q')) if (getURLP('q'))
{ {
$('#tipue_search_input').val(getURLP('q')); $('.tipue_search')[0].val(getURLP('q'));
getTipueSearch(0, true); getTipueSearch(0, true);
} }
@ -120,7 +120,7 @@ http://www.tipue.com/search
var c = 0; var c = 0;
found = new Array(); found = new Array();
var d = $('#tipue_search_input').val().toLowerCase(); var d = $('.tipue_search')[0].val().toLowerCase();
d = $.trim(d); d = $.trim(d);
if ((d.match("^\"") && d.match("\"$")) || (d.match("^'") && d.match("'$"))) if ((d.match("^\"") && d.match("\"$")) || (d.match("^'") && d.match("'$")))

View File

@ -72,7 +72,7 @@
<a href="https://plus.google.com/share?url={{ SITEURL }}/{{ article.url }}" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" target="_blank" class="uk-button uk-visible-small"><i class="uk-icon-google-plus-square"></i> Share</a> <a href="https://plus.google.com/share?url={{ SITEURL }}/{{ article.url }}" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" target="_blank" class="uk-button uk-visible-small"><i class="uk-icon-google-plus-square"></i> Share</a>
{% endif %} {% endif %}
<p class="uk-article-lead" itemprop="description">{{ article.summary|striptags }}</p> {% if not MG_DISABLE_SUMMARY %}<p class="uk-article-lead" itemprop="description">{{ article.summary|striptags }}</p>{% endif %}
<section class="uk-article-content" itemprop="articleBody">{{ article.content }}</section> <section class="uk-article-content" itemprop="articleBody">{{ article.content }}</section>
<hr class="uk-article-divider"> <hr class="uk-article-divider">
</article> </article>

View File

@ -21,7 +21,7 @@
<title>{% block title %}{{ SITENAME }}{% endblock %}</title> <title>{% block title %}{{ SITENAME }}{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{% block description %}{{ DESCRIPTION }}{% endblock %}"> <meta name="description" content="{% block description %}{{ DESCRIPTION }}{% endblock %}">
<link rel="shortcut icon" href="{{ SITEURL }}/{{ FAVICON }}" type="{{ FAVICON_TYPE }}"> {% if FAVICON %}<link rel="shortcut icon" href="{{ SITEURL }}/{{ FAVICON }}" type="{{ FAVICON_TYPE|default('image/x-icon') }}">{% endif %}
<meta name="author" content="{{ AUTHOR }}"> <meta name="author" content="{{ AUTHOR }}">
<meta name="copyright" content="{{ AUTHOR }}"> <meta name="copyright" content="{{ AUTHOR }}">
<meta name="twitter:card" content="summary" /> <meta name="twitter:card" content="summary" />
@ -90,17 +90,19 @@
{% if not DISABLE_SEARCH %} {% if not DISABLE_SEARCH %}
<div class="uk-panel uk-panel-box"> <div class="uk-panel uk-panel-box">
<form class="uk-search" action="{{ SITEURL }}/search.html" data-uk-search> <form class="uk-search" action="{{ SITEURL }}/search.html" data-uk-search>
<input class="uk-search-field tipue_search" type="search" name="q" id="tipue_search_input" autocomplete="off" placeholder="Search..."> <input class="uk-search-field tipue_search" type="search" name="q" autocomplete="off" placeholder="Search...">
</form> </form>
</div> </div>
{% endif %} {% endif %}
<div class="uk-panel uk-panel-box"> <div class="uk-panel uk-panel-box">
<ul class="uk-nav uk-nav-side"> <ul class="uk-nav uk-nav-side">
{% if CATEGORY_SAVE_AS %}
<li class="uk-nav-header">Categories</li> <li class="uk-nav-header">Categories</li>
{% for cat, _ in categories %} {% for cat, _ in categories %}
<li {% if cat == category %}class="uk-active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li> <li {% if cat == category %}class="uk-active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
{% endfor %} {% endfor %}
{% endif %}
{% if DISPLAY_PAGES_ON_MENU != False %} {% if DISPLAY_PAGES_ON_MENU != False %}
<li class="uk-nav-header">Pages</li> <li class="uk-nav-header">Pages</li>
@ -112,8 +114,10 @@
{% endif %} {% endif %}
{% if ARCHIVE_SAVE_AS %}
<li class="uk-nav-divider"></li> <li class="uk-nav-divider"></li>
<li {% if page_name == 'archives' %}class="uk-active"{% endif %}><a href="{{ SITEURL }}/archives.html">Archives</a></li> <li {% if page_name == 'archives' %}class="uk-active"{% endif %}><a href="{{ SITEURL }}/archives.html">Archives</a></li>
{% endif %}
</ul> </ul>
</div> </div>
@ -144,7 +148,7 @@
<footer class="mg-footer"> <footer class="mg-footer">
<div class="uk-container uk-container-center uk-text-center"> <div class="uk-container uk-container-center uk-text-center">
<div class="mg-icons-small uk-subnav uk-visible-small"> <ul class="mg-icons-small uk-subnav uk-visible-small">
<li><a rel="alternate" type="application/atom+xml" href="{{ SITEURL }}/{{ FEED_ALL_ATOM }}" class="uk-icon-button uk-icon-rss"></a></li> <li><a rel="alternate" type="application/atom+xml" href="{{ SITEURL }}/{{ FEED_ALL_ATOM }}" class="uk-icon-button uk-icon-rss"></a></li>
{% if SOCIAL %} {% if SOCIAL %}
{% for icon, link in SOCIAL %} {% for icon, link in SOCIAL %}
@ -153,7 +157,7 @@
</li> </li>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</div> </ul>
<div class="mg-author uk-panel"> <div class="mg-author uk-panel">
<p>{{ FOOTER }}</p> <p>{{ FOOTER }}</p>
@ -168,7 +172,7 @@
{% if not DISABLE_SEARCH %} {% if not DISABLE_SEARCH %}
<form class="uk-search" action="{{ SITEURL }}/search.html" data-uk-search> <form class="uk-search" action="{{ SITEURL }}/search.html" data-uk-search>
<input class="uk-search-field" type="search" name="q" id="tipue_search_input" autocomplete="off" placeholder="Search..."> <input class="uk-search-field tipue_search" type="search" name="q" autocomplete="off" placeholder="Search...">
</form> </form>
{% endif %} {% endif %}

View File

@ -7,23 +7,9 @@
{% for article in (articles_page.object_list if articles_page else articles) %} {% for article in (articles_page.object_list if articles_page else articles) %}
{% if loop.index == 1 %} {% if loop.index == 1 %}
<article class="uk-article" itemtype="http://schema.org/BlogPosting" itemscope="itemscope" itemprop="blogPost"> {% include "partials/article-excerpt.html" %}
<a href="{{ SITEURL }}/{{ article.url }}" class="uk-article-title uk-link-muted" itemprop="name">{{ article.title }}</a>
<p class="uk-article-meta"><time datetime="{{ article.date.strftime('%Y-%m-%d') }}" itemprop="datePublished">{{ article.locale_date }}</time><a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>{% if DISQUS_SITENAME %} • <br class="uk-visible-small"><i class="uk-icon-comment"></i> <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread" itemprop="discussionUrl"></a>{% endif %}</p>
</p>
<section class="uk-article-content" itemprop="articleBody">{{ article.content }}</section>
<a href="{{ SITEURL }}/{{ article.url }}#disqus_thread"></a>
<hr class="uk-article-divider">
</article>
{% else %} {% else %}
<article class="uk-article" itemtype="http://schema.org/BlogPosting" itemscope="itemscope" itemprop="blogPost"> {% include "partials/article-short.html" %}
<a href="{{ SITEURL }}/{{ article.url }}" class="uk-article-title uk-link-muted" itemprop="name">{{ article.title }}</a>
<p class="uk-article-meta"><time datetime="{{ article.date.strftime('%Y-%m-%d') }}" itemprop="datePublished">{{ article.locale_date }}</time><a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>{% if DISQUS_SITENAME %} • <br class="uk-visible-small"><i class="uk-icon-comment"></i> <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread" itemprop="discussionUrl"></a>{% endif %}</p>
</p>
<p class="uk-article-lead" itemprop="description">{{ article.summary|striptags }}</p>
<a href="{{ SITEURL }}/{{ article.url }}">Read More</a>
<hr class="uk-article-divider">
</article>
{% endif %} {% endif %}
{% endfor %} {% endfor %}

View File

@ -0,0 +1,9 @@
<article class="uk-article" itemtype="http://schema.org/BlogPosting" itemscope="itemscope" itemprop="blogPost">
<a href="{{ SITEURL }}/{{ article.url }}" class="uk-link-muted"><h1 class="uk-article-title" itemprop="name">{{ article.title|e }}</h1></a>
<p class="uk-article-meta"><time datetime="{{ article.date.strftime('%Y-%m-%d') }}" itemprop="datePublished">{{ article.locale_date }}</time><a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>{% if DISQUS_SITENAME %} • <br class="uk-visible-small"><i class="uk-icon-comment"></i> <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread" itemprop="discussionUrl"></a>{% endif %}</p>
{% if not MG_DISABLE_SUMMARY %}<p class="uk-article-lead" itemprop="description">{{ article.summary|striptags|striptags }}</p>{% endif %}
<section class="uk-article-content" itemprop="articleBody">{{ article.content }}</section>
<a href="{{ SITEURL }}/{{ article.url }}#disqus_thread"></a>
<hr class="uk-article-divider">
</article>

View File

@ -0,0 +1,10 @@
<article class="uk-article" itemtype="http://schema.org/BlogPosting" itemscope="itemscope" itemprop="blogPost">
<a href="{{ SITEURL }}/{{ article.url }}" class="uk-link-muted"><h1 class="uk-article-title" itemprop="name">{{ article.title|e }}</h1></a>
<p class="uk-article-meta"><time datetime="{{ article.date.strftime('%Y-%m-%d') }}" itemprop="datePublished">{{ article.locale_date }}</time><a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>{% if DISQUS_SITENAME %} • <br class="uk-visible-small"><i class="uk-icon-comment"></i> <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread" itemprop="discussionUrl"></a>{% endif %}</p>
<!--{{ article.summary }}-->
<p class="uk-article-lead" itemprop="description">{{ article.summary|striptags|striptags }}</p>
{% if not MG_DISABLE_SUMMARY %}<p>{{ ' '.join(article.content.split(' ')[:SUMMARY_MAX_LENGTH ])|striptags|striptags }}...</p>{% endif %}
<a href="{{ SITEURL }}/{{ article.url }}">Read More</a>
<hr class="uk-article-divider">
</article>