Merge lp:~ya-bo-ng/ubuntu-community-website/responsive into lp:ubuntu-community-website

Proposed by Anthony Dillon
Status: Merged
Merged at revision: 10
Proposed branch: lp:~ya-bo-ng/ubuntu-community-website/responsive
Merge into: lp:ubuntu-community-website
Diff against target: 278 lines (+61/-47)
5 files modified
footer.php (+3/-3)
functions.php (+0/-1)
header.php (+26/-29)
search.php (+14/-12)
style.css (+18/-2)
To merge this branch: bzr merge lp:~ya-bo-ng/ubuntu-community-website/responsive
Reviewer Review Type Date Requested Status
Graham Bancroft (community) Approve
David Callé (community) Approve
Daniel Holbach (community) Approve
Review via email: mp+278018@code.launchpad.net

Description of the change

# Done
- Applied responsive stylesheet
- Fixes the font issue on Wily
- Slightly adjusted the header/search and some page content

## QA
- Check over the code
- Check the old site here: http://community.ubuntu.com/
- Check the pages still look the same and are responsive at http://community.canonicalwebteam.com/

### Details
- Bug: https://bugs.launchpad.net/ubuntu-community-website/+bug/1504182
- Card: https://canonical.leankit.com/Boards/View/111185042/117690816

To post a comment you must log in.
Revision history for this message
Daniel Holbach (dholbach) wrote :

Bug 1504182 is fixed for me on http://community.canonicalwebteam.com/ and it generally looks good to me.

review: Approve
Revision history for this message
David Callé (davidc3) wrote :

Looks good to me as well.

review: Approve
Revision history for this message
Graham Bancroft (gbancroft-canonical) wrote :

The breadcrumb looks a bit wonky here http://community.canonicalwebteam.com/help-information/finding-help/ other than that Lgtm +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'footer.php'
2--- footer.php 2013-06-01 00:18:16 +0000
3+++ footer.php 2015-11-19 15:22:35 +0000
4@@ -7,8 +7,8 @@
5 *
6 *
7 * @file footer.php
8- * @package Ubuntu theme
9- * @author Canonical Web Team
10+ * @package Ubuntu theme
11+ * @author Canonical Web Team
12 * @copyright 2012 Canonical Ltd
13 * @license
14 * @version Release: 1.0
15@@ -39,4 +39,4 @@
16
17 </script>
18 </body>
19-</html>
20\ No newline at end of file
21+</html>
22
23=== modified file 'functions.php'
24--- functions.php 2013-05-29 15:57:47 +0000
25+++ functions.php 2015-11-19 15:22:35 +0000
26@@ -15,4 +15,3 @@
27 }
28 add_filter('wp_list_pages','current_to_active');
29 ?>
30-
31
32=== modified file 'header.php'
33--- header.php 2013-06-01 00:18:16 +0000
34+++ header.php 2015-11-19 15:22:35 +0000
35@@ -8,8 +8,8 @@
36 *
37 *
38 * @file header.php
39- * @package Ubuntu blog theme
40- * @author Canonical Web Team
41+ * @package Ubuntu blog theme
42+ * @author Canonical Web Team
43 * @copyright 2012 Canonical Ltd
44 * @license
45 * @version Release: 1.0
46@@ -17,13 +17,13 @@
47 * @since available since Release 1.0
48 */
49 ?>
50-<!doctype html>
51+<!doctype html>
52
53 <!--[if lt IE 7]><html <?php language_attributes(); ?> class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
54 <!--[if (IE 7)&!(IEMobile)]><html <?php language_attributes(); ?> class="no-js lt-ie9 lt-ie8"><![endif]-->
55 <!--[if (IE 8)&!(IEMobile)]><html <?php language_attributes(); ?> class="no-js lt-ie9"><![endif]-->
56 <!--[if gt IE 8]><!--> <html <?php language_attributes(); ?> class="no-js"><!--<![endif]-->
57-
58+
59 <head>
60
61 <meta charset="utf-8">
62@@ -33,50 +33,50 @@
63
64 <!-- Google Chrome Frame for IE -->
65 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
66+<meta name="theme-color" content="#DD4814">
67
68 <link rel="shortcut icon" href="<?php echo get_template_directory_uri(); ?>/library/images/favicon.ico">
69 <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
70
71-<link rel="stylesheet" type="text/css" media="all" href="https://fonts.googleapis.com/css?family=Ubuntu:300,400,400italic" />
72-<link rel="stylesheet" href="http://assets.ubuntu.com/sites/guidelines/css/latest/ubuntu-styles.css" type="text/css" />
73+<link rel="stylesheet" type="text/css" media="screen" href="http://assets.ubuntu.com/sites/guidelines/css/responsive/latest/ubuntu-styles.css" />
74 <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
75+<link rel="stylesheet" type="text/css" media="screen" href="http://assets.ubuntu.com/sites/ubuntu/latest/u/css/beta/global-responsive.css" />
76
77+<script src="http://assets.ubuntu.com/sites/ubuntu/latest/u/js/plugins/yui-min.js"></script>
78+<script src="http://assets.ubuntu.com/sites/ubuntu/1576/u/js/global.js"></script>
79+<script src="//assets.ubuntu.com/sites/guidelines/js/responsive/core.js"></script>
80 <!-- wordpress head functions -->
81 <?php wp_head(); ?>
82 <!-- end of wordpress head -->
83-
84+
85 </head>
86-
87+
88 <body <?php body_class(); ?>>
89+
90+
91 <header class="banner global" role="banner">
92- <link href='https://fonts.googleapis.com/css?family=Ubuntu:400,300,300italic,400italic,700,700italic|Ubuntu+Mono' rel='stylesheet' type='text/css' />
93- <script src="http://assets.ubuntu.com/sites/ubuntu/latest/u/js/plugins/yui-min.js"></script>
94- <link rel="stylesheet" type="text/css" media="screen" href="http://assets.ubuntu.com/sites/ubuntu/latest/u/css/global.css" />
95- <script src="http://assets.ubuntu.com/sites/ubuntu/latest/u/js/global.js"></script>
96- <nav role="navigation" class="nav-primary nav-right">
97+<nav role="navigation" class="nav-primary nav-right">
98 <div class="logo">
99- <a class="logo-ubuntu" href="<?php echo get_option('home'); ?>/">
100- <img src="<?php echo get_template_directory_uri(); ?>/library/images/logo-ubuntu_su-orange-hex.png" alt="<?php bloginfo('name'); ?> logo"/>
101+ <a class="logo-ubuntu" href="/">
102+ <img width="106" height="25" src="http://assets.ubuntu.com/sites/ubuntu/latest/u/img/logos/logo-ubuntu-orange.svg" alt="" />
103 <span><?php bloginfo('name'); ?></span>
104 </a>
105 </div>
106+
107 <?php get_template_part("includes/_nav"); ?>
108
109-
110- <div id="box-search">
111- <form class="search-form" method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
112- <label class="off-left" for="s"><?php _e('Search:'); ?></label>
113- <input class="form-text" type="text" value="" name="s" id="s" />
114- <button class="form-submit" type="submit" id="searchsubmit">Search</button>
115- </form>
116- </div>
117+ <form action="<?php bloginfo('url'); ?>" id="google-appliance-search-form" method="get" class="header-search" id="searchform">
118+ <label for="edit-keys" class="accessibility-aid">Search</label>
119+ <input type="search" maxlength="255" name="s" id="s" class="form-text" placeholder="Search" value="" />
120+ <button type="submit"><img src="http://assets.ubuntu.com/sites/ubuntu/1576/u/img/search-white.svg" alt="Search" height="28" /></button>
121+ </form>
122 </nav>
123 </header>
124
125 <div class="wrapper">
126 <div id="main-content" class="inner-wrapper" role="main">
127
128-<?php
129+<?php
130 // If the page has children, display the children in the nav.
131 // If the page has a parent, display the children of the parent in the nav.
132 // If the page doesn't have children, or a parent, don't display the nav.
133@@ -91,14 +91,14 @@
134 <div>
135 <nav role="navigation" class="nav-secondary clearfix">
136 <ul class="breadcrumb">
137- <?php
138+ <?php
139 while($current->post_parent) {
140 $current = get_post($current->post_parent);
141 $output = '<li><a href="' . get_permalink($current) . '">'.get_the_title($current).'</a> &rsaquo;</li>' . $output;
142 }
143 $children = get_pages('child_of='.$post->ID);
144 if(count( $children ) != 0) {
145- $active = '<li class="active"><a href="' . get_permalink($post->ID) . '">'.get_the_title($post->ID).'</a> &rsaquo;</li>';
146+ $active = '<li class="active"><a href="' . get_permalink($post->ID) . '">'.get_the_title($post->ID).'</a> &rsaquo;</li>';
147 }
148 echo $output . $active;
149 ?>
150@@ -109,6 +109,3 @@
151 </nav>
152 </div>
153 <?php } ?>
154-
155-
156-
157
158=== modified file 'search.php'
159--- search.php 2012-12-18 20:54:36 +0000
160+++ search.php 2015-11-19 15:22:35 +0000
161@@ -7,16 +7,17 @@
162 *
163 *
164 * @file search.php
165- * @package Ubuntu theme
166- * @author Canonical Web Team
167+ * @package Ubuntu theme
168+ * @author Canonical Web Team
169 * @copyright 2012 Canonical Ltd
170 * @license
171 * @version Release: 1.0
172 * @filesource wp-content/themes/ubuntu/search.php
173 * @since available since Release 1.0
174 */
175-get_header();
176+get_header();
177 ?>
178+<div class="row no-border">
179 <div id="main" class="eight-col" role="main">
180
181 <h1 class="archive-title"><span>Search Results for:</span> <?php echo esc_attr(get_search_query()); ?></h1>
182@@ -24,27 +25,27 @@
183 <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
184
185 <article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?> role="article">
186-
187+
188 <header class="article-header">
189-
190+
191 <h3 class="search-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
192-
193+
194 <p class="byline vcard"><?php _e("Posted", "ubuntutheme"); ?> <time class="updated" datetime="<?php echo the_time('Y-m-j'); ?>" pubdate><?php the_time('F jS, Y'); ?></time> <?php _e("by", "ubuntutheme"); ?> <span class="author"><?php the_author_posts_link(); ?></span> <span class="amp">&</span> <?php _e("filed under", "ubuntutheme"); ?> <?php the_category(', '); ?>.</p>
195-
196+
197 </header> <!-- end article header -->
198
199 <section class="entry-content">
200 <?php the_excerpt('<span class="read-more">Read more &raquo;</span>'); ?>
201
202 </section> <!-- end article section -->
203-
204+
205 <footer class="article-footer">
206-
207+
208 </footer> <!-- end article footer -->
209
210 </article> <!-- end article -->
211
212- <?php endwhile; ?>
213+ <?php endwhile; ?>
214
215 <?php if (function_exists('ubuntu_page_navi')) { ?>
216 <?php ubuntu_page_navi(); ?>
217@@ -55,7 +56,7 @@
218 <li class="next-link"><?php previous_posts_link(__('Newer Entries &raquo;', "ubuntutheme")) ?></li>
219 </ul>
220 </nav>
221- <?php } ?>
222+ <?php } ?>
223
224 <?php else : ?>
225
226@@ -74,6 +75,7 @@
227 <?php endif; ?>
228
229 </div> <!-- end #main -->
230+</div>
231
232 <?php get_sidebar(); ?>
233-<?php get_footer(); ?>
234\ No newline at end of file
235+<?php get_footer(); ?>
236
237=== modified file 'style.css'
238--- style.css 2014-06-24 08:50:45 +0000
239+++ style.css 2015-11-19 15:22:35 +0000
240@@ -35,7 +35,9 @@
241
242 /* Existing ubuntu.com community CSS */
243
244-nav .cat-item-none ( display: none; )
245+/*#nav-global {
246+ display: none;
247+}*/
248
249 .two-col h2 { font-size: 19.5px; }
250
251@@ -48,6 +50,20 @@
252 width: 120px;
253 }
254
255+#nav-global {
256+ display: none;
257+}
258+
259+@media only screen and (min-width: 768px) {
260+ #nav-global {
261+ display: block;
262+ }
263+
264+ .header-search {
265+ max-width: 150px;
266+ }
267+}
268+
269 header.banner .logo-ubuntu span {
270 float: left;
271 font-weight: 300;
272@@ -94,4 +110,4 @@
273 }
274
275
276-/* Your styles here */
277\ No newline at end of file
278+/* Your styles here */

Subscribers

People subscribed via source and target branches