From 5420ce59db35f729d4480bfc62272e004d5f0264 Mon Sep 17 00:00:00 2001 From: Andreas <andreasv@fsmpi.rwth-aachen.de> Date: Sun, 16 Oct 2016 23:35:55 +0200 Subject: [PATCH] made the website less broken on phones. closes #141 --- static/style.css | 26 ++++++++++++++++++++------ templates/lecture.html | 4 +--- templates/macros.html | 2 +- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/static/style.css b/static/style.css index e669b97..b46b3f4 100644 --- a/static/style.css +++ b/static/style.css @@ -6,10 +6,24 @@ } .table-top-aligned tr { vertical-align: top; } -.footer { - position: fixed; - bottom: 0; - width: 100%; - height: 30px; - background-color: #f5f5f5; + +@media (min-width: 768px) { + .footer { + position: fixed; + bottom: 0; + width: 100%; + height: 30px; + background-color: #f5f5f5; + } +} + +@media (max-width: 767px) { + .footer { + position: relative; + margin-top: -80px; /* negative value of footer height */ + height: 80px; + clear:both; + padding-top:20px; + background-color: #f5f5f5; + } } diff --git a/templates/lecture.html b/templates/lecture.html index 4c25ec5..cfdea4d 100644 --- a/templates/lecture.html +++ b/templates/lecture.html @@ -23,10 +23,8 @@ </div> <div class="panel-body"> <div class="row" style="padding: 0px;"> - <div class="col-sm-6 col-xs-12" style="padding-bottom: 5px;"> + <div class="col-xs-12" style="padding-bottom: 5px;"> <a href="{{url_for('course', handle=course.handle)}}#lecture-{{lecture.id}}" class="btn btn-default" >Zur Veranstaltungsseite</a> - </div> - <div class="col-sm-6 col-xs-12"> <ul class="list-inline pull-right"> <li><button class="btn btn-default" id="hintnewchapter">Kapitelmarker vorschlagen</button></li> <li>{{ video_embed_btn(lecture.id) }}</li> diff --git a/templates/macros.html b/templates/macros.html index 452fb4e..d590af6 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -119,7 +119,7 @@ $('#embedcodebtn').popover( {% macro lecture_list_item(lecture,videos,global_permissions) %} <li class="list-group-item" id="lecture-{{lecture.id}}"> <div class="row"> - <img class="col-sm-2 col-xs-12"src="{{ config.VIDEOPREFIX }}/{{lecture.titlefile}}" alt="Vorschaubild" onerror="this.src='{{url_for('static',filename='no-thumbnail.png')}}'; this.onerror=''; "> + <img style="margin-bottom: 10px" class="col-sm-2 col-xs-12"src="{{ config.VIDEOPREFIX }}/{{lecture.titlefile}}" alt="Vorschaubild" onerror="this.src='{{url_for('static',filename='no-thumbnail.png')}}'; this.onerror=''; "> <span class="col-sm-3 col-xs-12"> <ul class="list-unstyled"> <li>{{ moderator_editor(['lectures',lecture.id,'title'], lecture.title) }}</li> -- GitLab