Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Better mobile styling

  • Loading branch information...
commit d2664d3988f5a582c6e1cc0f0951f7a17e8ab507 1 parent 9a77c2c
@exhuma authored
View
50 lost_tracker/static/style.css
@@ -1,12 +1,34 @@
+BODY{
+ margin: 0;
+}
+
DIV.group{
- border: 1px solid black;
- border-radius: 5px;
- margin: 0.5em 1em;
- padding: 2em 1em;
+ border-bottom: 0.1em solid rgba(0, 0, 0, 0.3);
+ line-height: 2em;
+ padding: 1em 0.5em;
+ -webkit-box-shadow: inset 0px -10px 10px -10px rgba(0, 0, 0, 0.3);
+ box-shadow: inset 0px -10px 10px -10px rgba(0, 0, 0, 0.3);
+}
+
+DIV.group INPUT {
+ width: 3em;
+ font-size: 2em;
}
DIV.group:hover{
- background: #ccc;
+ background: rgba(0, 0, 0, 0.03);
+}
+
+DIV.group .icon {
+ float: left;
+}
+
+DIV.group .details {
+ overflow: auto;
+}
+
+DIV.group .name{
+ font-size: 1.2em;
}
.state_0,
@@ -33,13 +55,13 @@ H1, H2 {
text-align: center;
position: fixed;
background: #fff;
- bottom: 0px;
- right: 0px;
- width: 300px;
+ bottom: 0;
+ right: 0;
+ width: 10em;
height: 3em;
- border-top: 1px solid black;
- border-left: 1px solid black;
- border-right: 1px solid black;
+ border-top: 0.1em solid black;
+ border-left: 0.1em solid black;
+ border-right: 0.1em solid black;
}
.cancelled {
@@ -48,7 +70,7 @@ H1, H2 {
}
#Matrix TD {
- border: 1px solid #ccc;
+ border: 0.1em solid #ccc;
padding: 0.1em 0.5em;
}
@@ -57,10 +79,10 @@ TD.state {
}
#flashes DIV {
- max-width: 300px;
+ max-width: 10em;
text-align: center;
font-weight: bold;
- border: 1px solid black;
+ border: 0.1em solid black;
margin: 0.2em auto;
}
View
1  lost_tracker/templates/master.html
@@ -2,6 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Lost Tracker {% block title %}{% endblock %}</title>
<link rel="stylesheet" href="{{url_for('static', filename='style.css')}}" />
<script type="text/javascript" src="{{url_for('static', filename='js/jquery-1.6.1.min.js')}}"></script>
View
26 lost_tracker/templates/station.html
@@ -1,13 +1,6 @@
{% extends "master.html" %}
{% block head %}
-<style>
- BODY{
- max-width: 360px;
- margin: auto;
- margin-top: 3em;
- }
-</style>
<meta http-equiv="refresh" content="300" />
{% endblock %}
@@ -17,10 +10,21 @@
<h2><a href="{{url_for('index')}}">Zeréck op d'Haaptsäit</a></h2>
{% for row in group_states %}
-<div class="group state_{{row[1]}} {{row[0].cancelled and 'cancelled' or ''}}" onclick="advanceState({{row[0].id}});">
- {% set icon_file = 'icons/%s.png' % row[1] %}
- <img id="icon_{{station.id}}_{{row[0].id}}" src="{{url_for('static', filename=icon_file)}}" />
- {{row[0].name}}<br />
+<div class="group state_{{row[1]}} {{row[0].cancelled and 'cancelled' or ''}}">
+ <div class="icon">
+ {% set icon_file = 'icons/%s.png' % row[1] %}
+ <img id="icon_{{station.id}}_{{row[0].id}}" src="{{url_for('static', filename=icon_file)}}" />
+ </div>
+ <div class="details">
+ <div class="name" onclick="advanceState({{row[0].id}});">
+ {{row[0].name}}
+ </div>
+ <div>
+ <input type="number" name="score" />
+ <input type="number" name="forobou" />
+ <input type="submit" value="OK" />
+ </div>
+ </div>
</div>
{% endfor %}
Please sign in to comment.
Something went wrong with that request. Please try again.