Merge lp:~sil/summit/more-mobile-summit into lp:summit

Proposed by Stuart Langridge on 2012-01-29
Status: Merged
Approved by: Michael Hall on 2012-01-29
Approved revision: 283
Merged at revision: 283
Proposed branch: lp:~sil/summit/more-mobile-summit
Merge into: lp:summit
Diff against target: 130 lines (+78/-3)
3 files modified
summit/common/templates/common/index.html (+20/-0)
summit/schedule/templates/schedule/daily.html (+19/-2)
summit/schedule/templates/schedule/summit.html (+39/-1)
To merge this branch: bzr merge lp:~sil/summit/more-mobile-summit
Reviewer Review Type Date Requested Status
Michael Hall (community) 2012-01-29 Approve on 2012-01-29
Review via email: mp+90608@code.launchpad.net

Commit Message

More mobile tweaks!

Description of the Change

More mobile tweaks!

To post a comment you must log in.
Michael Hall (mhall119) wrote :

Nice work, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'summit/common/templates/common/index.html'
2--- summit/common/templates/common/index.html 2012-01-24 19:07:39 +0000
3+++ summit/common/templates/common/index.html 2012-01-29 15:10:29 +0000
4@@ -2,6 +2,26 @@
5 {% load datetime %}
6
7 {% block page_name %}Home{%endblock %}
8+{% block head %}
9+<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
10+{{ block.super }}
11+<style>
12+/* Mobile-friendly styles */
13+@media screen and (max-width: 481px) {
14+ aside#top-nav, header#page-header, aside#page-related, footer#page-footer, section#main-section .container, article.main-content, .container, #main-nav, .minor-content, #page-footer div.container {
15+ width: auto;
16+ margin: 0; padding: 0;
17+ }
18+ #page-header { text-align: center; }
19+ #page-header a { height: 24px; line-height: 1; float: none; display: inline; }
20+ #top-logo { display: none; }
21+ .minor-content {
22+ text-align: center;
23+ }
24+}
25+
26+</style>
27+{% endblock %}
28
29 {% block sub_nav %}{% endblock %}
30 {% block content %}
31
32=== modified file 'summit/schedule/templates/schedule/daily.html'
33--- summit/schedule/templates/schedule/daily.html 2012-01-28 02:35:58 +0000
34+++ summit/schedule/templates/schedule/daily.html 2012-01-29 15:10:29 +0000
35@@ -74,11 +74,18 @@
36 /* Mobile view */
37 @media screen and (max-width: 481px) {
38 /* turn off a bunch of stuff */
39- aside#top-nav, header#page-header, aside#page-related, footer#page-footer { display: none; }
40- section#main-section .container, article.main-content {
41+ nav#top-related, header#page-header, aside#page-related, footer#page-footer { display: none; }
42+ section#main-section .container, article.main-content, aside#top-nav, aside#top-nav .container {
43 width: auto;
44 margin: 0; padding: 0;
45 }
46+ #top-login { display: block; }
47+ aside#top-nav {
48+ display: block;
49+ text-align: center;
50+ font-size: 16px;
51+ min-height: 24px;
52+ }
53 .schedule-head > a { display: none; } /* qr code */
54 div.schedule-head .schedule-date {
55 display: block;
56@@ -118,6 +125,16 @@
57 background: #101010;
58 padding-left: 4px;
59 }
60+ .main-agenda-item-name {
61+ display: block;
62+ min-height: 24px;
63+ }
64+ .main-agenda-item-name img.icon {
65+ height: 24px;
66+ width: 24px;
67+ float: left;
68+ margin-right: 4px;
69+ }
70 }
71
72 </style>
73
74=== modified file 'summit/schedule/templates/schedule/summit.html'
75--- summit/schedule/templates/schedule/summit.html 2012-01-25 13:47:02 +0000
76+++ summit/schedule/templates/schedule/summit.html 2012-01-29 15:10:29 +0000
77@@ -3,7 +3,10 @@
78
79 {% block page_name %}{{ summit.title }} {{ summit.date_start|strftime:"%d %b" }} - {{ summit.date_end|strftime:"%d %b %Y" }} {%endblock %}
80
81-{% block extrahead %}{{ block.super }}
82+{% block extrahead %}
83+<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
84+
85+{{ block.super }}
86 <script type="text/javascript" src="{{MEDIA_URL}}jquery/jquery.js"></script>
87 <script type="text/javascript" src="{{MEDIA_URL}}js/twidenash/jquery-twidenash.js"></script>
88 <script type="text/javascript">
89@@ -24,6 +27,41 @@
90 <meta property="og:type" content="summit-scheduler:meeting"/>
91 <meta itemprop="name" content="{{ summit.title }} {{ summit.date_start|strftime:"%d" }} - {{ summit.date_end|strftime:"%d, %b. %Y" }}" />
92 <meta itemprop="description" content="{{ summit.description|linebreaks|striptags }}" />
93+
94+<style>
95+/* Mobile-friendly styles */
96+@media screen and (max-width: 481px) {
97+ aside#top-nav, header#page-header, aside#page-related, footer#page-footer, section#main-section .container, article.main-content, .container, #main-nav, .double-side-content, #page-footer div.container, #sub-nav-container, .side-content {
98+ width: auto;
99+ margin: 0; padding: 0;
100+ }
101+ #page-header { text-align: center; }
102+ #page-header a { height: 24px; line-height: 1; float: none; display: inline; }
103+ #top-logo { display: none; }
104+ table.column { width: 100%; }
105+ table.column td { display: block; width: 100%; }
106+ table.column td ul {
107+ width: 100%;
108+ }
109+ article.main-content { width: 100%; }
110+ table.column td ul li {
111+ background: #efefef;
112+ border-bottom: 1px solid black;
113+ list-style: none;
114+ text-align: center;
115+ font-size: 24px;
116+ line-height: 24px;
117+ min-height: 24px;
118+ width: 100%;
119+ display: block;
120+ padding: 4px 0;
121+ }
122+ .double-side-content {
123+ text-align: center;
124+ }
125+ .side-content { display: none; }
126+}
127+</style>
128 {% endblock %}
129
130 {% block sub_nav_links %}

Subscribers

People subscribed via source and target branches