From 45d6fc305bc971443023efd6ce9da3792528821d Mon Sep 17 00:00:00 2001 From: vas3k Date: Sun, 6 Sep 2020 11:58:32 +0200 Subject: [PATCH] Fix mobile CSS --- boards.yml | 1 - scripts/update.py | 4 +++- static/css/layout.css | 13 +++++++------ templates/tooltips/simple.html | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/boards.yml b/boards.yml index beed44c..215c4cd 100644 --- a/boards.yml +++ b/boards.yml @@ -105,7 +105,6 @@ boards: is_parsable: false mix: - http://rss.cnn.com/rss/edition.rss - - https://www.buzzfeed.com/index.xml - https://www.huffpost.com/section/front-page/feed - https://www.newyorker.com/feed/news - https://www.msnbc.com/feed diff --git a/scripts/update.py b/scripts/update.py index 99717cc..d5517fe 100644 --- a/scripts/update.py +++ b/scripts/update.py @@ -173,7 +173,9 @@ def fetch_rss(item, rss): real_url, content_type, content_length = resolve_url(entry_link) # load and summarize article - if item["is_parsable"] and content_length <= MAX_PARSABLE_CONTENT_LENGTH \ + if item["is_parsable"] \ + and content_length <= MAX_PARSABLE_CONTENT_LENGTH \ + and content_type \ and content_type.startswith("text/"): # to not try to parse podcasts :D if real_url: diff --git a/static/css/layout.css b/static/css/layout.css index 02e2e32..89fd1e1 100644 --- a/static/css/layout.css +++ b/static/css/layout.css @@ -69,7 +69,7 @@ @media only screen and (max-width : 570px) { .block-100, .block-50 { - width: auto; + width: 100%; } } @@ -83,6 +83,7 @@ .feed { width: 100%; + min-width: 200px; box-sizing: border-box; } @@ -91,7 +92,7 @@ } .feeds-2 .feed { - width: 49%; + width: 50%; } .feed .article-tooltip { @@ -113,8 +114,8 @@ @media only screen and (max-width : 1024px) { /* Switch to 2-columns */ - .feeds { - grid-template-columns: 50% 50%; + .feeds .feed { + width: 50%; } .feeds .feed .article-tooltip { @@ -135,8 +136,8 @@ } @media only screen and (max-width : 750px) { - .feeds { - grid-template-columns: 100%; + .feeds .feed { + width: 100%; } .feeds .feed .article-tooltip { diff --git a/templates/tooltips/simple.html b/templates/tooltips/simple.html index 238247b..00c1d48 100644 --- a/templates/tooltips/simple.html +++ b/templates/tooltips/simple.html @@ -2,7 +2,7 @@ {% if article.image %} - {{ article.title|striptags }} + {{ article.title|striptags }} {% endif %} {{ article.title|striptags|truncatechars:300 }}