From 6cd3e0cbb90eae0c167a8ff972aba0d3d121f028 Mon Sep 17 00:00:00 2001 From: lowrussia Date: Thu, 20 Feb 2020 13:04:43 +0100 Subject: [PATCH] mobile style --- themes/varia/static/css/main.css | 108 +++++++++++++++++++++++++++++- themes/varia/templates/index.html | 23 ++++--- 2 files changed, 119 insertions(+), 12 deletions(-) diff --git a/themes/varia/static/css/main.css b/themes/varia/static/css/main.css index ad85003..88d53c7 100644 --- a/themes/varia/static/css/main.css +++ b/themes/varia/static/css/main.css @@ -404,4 +404,110 @@ sup span{ } sup span p{ display: inline; - } \ No newline at end of file + } + +/****************************/ +/*mobile style*/ + +@media only screen + and (min-device-width: 320px) + and (max-device-width: 480px) { + + /*home page*/ + + html, body { + padding: 0; + } + + body { + min-width: auto; + width: 100%; + } + + .buttons.top { + margin-top: 30px; + text-align: left; + margin-left: 15px; + } + + .buttons.top li { + margin: 0; + padding: 0; + } + + .buttons.top.left { + margin-top: 0; + right: auto; + left: 0; + } + + #banner { + width: calc(100% - 30px); + padding: 100px 15px 0 15px; + font-size: 20px; + margin-top: 0; + } + + #content { + padding: 15px; + width: calc(100% - 30px); + } + + .hentry.current, .hentry.article, .hentry.artikel, .hentry.current .article-info, .hentry.current .featured-image img { + width: 100%; + } + + .hentry { + width: 85%; + margin-right: 0; + } + + .hentry.article, .hentry.artikel { + width: 90%; + } + + .hentry pre { + font-size: 9px; + } + + + /*single page*/ + + #content.body .entry-title { + font-size: 24px; + margin: 0; + width: 100%; + } + + #content.body .article-info { + float: none; + width: 100%; + margin-top: 15px; + margin-bottom: 30px; + } + + .entry-content-container, #page-content-container { + float: none; + width: 100%; + padding: 0; + font-size: 16px; + } + + .entry-content, #page-content { + margin: 0; + } + + .entry-content img, #page-content img { + max-width: 100%; + height: auto; + } + + /*about*/ + + .entry-content, #page-content p, .entry-content, #page-content h1 { + font-size: 16px; + padding: 0 15px; + } + + +} diff --git a/themes/varia/templates/index.html b/themes/varia/templates/index.html index 374fd40..9839ddf 100644 --- a/themes/varia/templates/index.html +++ b/themes/varia/templates/index.html @@ -26,32 +26,33 @@
{% for article in articles_page.object_list %} {% set thumb_size = '/thumb' %} - {% if article.category %} + {% if article.category %} {% if article.event_start %} {% set event_status = '' %} - {% if article.event_start < article.date.now() %} + {% set now = article.date.now() | string %} + {% if article.event_start < now %} {% set event_status = ' past' %} {% endif %} - {% if article.event_start >= article.date.now() %} + {% if article.event_start >= now %} {% set event_status = ' current' %} {% set thumb_size = '/thumb2x' %} - {% endif %} + {% endif %} {% endif %} - + {% if article.category == 'article' %} {% set thumb_size = '/thumb2x' %} {% endif %} - +
- + {% endif %}
- +
{{ article.summary }} {% if DEFAULT_LANG == 'en' %} @@ -90,7 +91,7 @@ {% endif %} - {% endif %} + {% endif %} {% if article.tags %} {{ glob.related_to }} @@ -104,7 +105,7 @@ {% endif %} - + {% endfor %} {% endif %}