From 1f204bb2d9ca495963b3bfbb9768d048cf9fd653 Mon Sep 17 00:00:00 2001 From: Lucas Cimon Date: Wed, 9 Aug 2017 02:11:13 +0200 Subject: [PATCH] Adding MG_DISABLE_SUMMARY + ensuring W3C validator-compliant --- static/css/main.css | 6 +++++- static/js/main-search.js | 2 +- static/js/tipuesearch.js | 4 ++-- templates/article.html | 2 +- templates/base.html | 14 +++++++++----- templates/index.html | 18 ++---------------- templates/partials/article-excerpt.html | 9 +++++++++ templates/partials/article-short.html | 10 ++++++++++ 8 files changed, 39 insertions(+), 26 deletions(-) create mode 100644 templates/partials/article-excerpt.html create mode 100644 templates/partials/article-short.html diff --git a/static/css/main.css b/static/css/main.css index 9689b18..7aae2b2 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -1,5 +1,9 @@ +html, h1 { + font-family: "Oswald", "Helvetica Neue",Helvetica,Arial,sans-serif; } html { - font: 400 14px / 20px "Oswald", "Helvetica Neue",Helvetica,Arial,sans-serif; } + font-weight: 400; + font-size: 14px; + line-height: 20px; } a { color: #33b5e5; } diff --git a/static/js/main-search.js b/static/js/main-search.js index 1d56de8..b5f9114 100644 --- a/static/js/main-search.js +++ b/static/js/main-search.js @@ -4,7 +4,7 @@ $(document).ready(function() { $('.mg-container-social').height($('article').height()); $('#mg-panel-social').stick_in_parent({offset_top: 35}); - $('#tipue_search_input').tipuesearch({ + $('.tipue_search').tipuesearch({ 'show': 10, 'mode': 'json', 'showURL': false, diff --git a/static/js/tipuesearch.js b/static/js/tipuesearch.js index 4ef1dee..21da22c 100644 --- a/static/js/tipuesearch.js +++ b/static/js/tipuesearch.js @@ -97,7 +97,7 @@ http://www.tipue.com/search } if (getURLP('q')) { - $('#tipue_search_input').val(getURLP('q')); + $('.tipue_search')[0].val(getURLP('q')); getTipueSearch(0, true); } @@ -120,7 +120,7 @@ http://www.tipue.com/search var c = 0; found = new Array(); - var d = $('#tipue_search_input').val().toLowerCase(); + var d = $('.tipue_search')[0].val().toLowerCase(); d = $.trim(d); if ((d.match("^\"") && d.match("\"$")) || (d.match("^'") && d.match("'$"))) diff --git a/templates/article.html b/templates/article.html index 6dae4f0..113dea8 100644 --- a/templates/article.html +++ b/templates/article.html @@ -72,7 +72,7 @@ Share {% endif %} -

{{ article.summary|striptags }}

+ {% if not MG_DISABLE_SUMMARY %}

{{ article.summary|striptags }}

{% endif %}
{{ article.content }}

diff --git a/templates/base.html b/templates/base.html index 530d705..d8fdeb3 100644 --- a/templates/base.html +++ b/templates/base.html @@ -21,7 +21,7 @@ {% block title %}{{ SITENAME }}{% endblock %} - +{% if FAVICON %}{% endif %} @@ -90,17 +90,19 @@ {% if not DISABLE_SEARCH %}
{% endif %}
@@ -144,7 +148,7 @@