Merge lp:~canonical-website-editors/ubuntu-brand-guidelines/fix-download-limit-and-misc into lp:ubuntu-brand-guidelines

Proposed by Graham Bancroft
Status: Merged
Merged at revision: 53
Proposed branch: lp:~canonical-website-editors/ubuntu-brand-guidelines/fix-download-limit-and-misc
Merge into: lp:ubuntu-brand-guidelines
Diff against target: 110 lines (+16/-12)
4 files modified
footer.php (+5/-3)
functions.php (+2/-0)
header.php (+8/-8)
loop-downloads.php (+1/-1)
To merge this branch: bzr merge lp:~canonical-website-editors/ubuntu-brand-guidelines/fix-download-limit-and-misc
Reviewer Review Type Date Requested Status
Anthony Dillon Approve
Review via email: mp+304052@code.launchpad.net

Description of the change

## Done

Change global nav js to use the latest version and use the asset server where possible for other js and css resources

Fix bug: Downloads section is only displaying latest 100 entriees https://bugs.launchpad.net/ubuntu-brand-guidelines/+bug/1538128

## QA

If you have this site running locally then make sure all the changed assets work as expected, or pop along to https://design.canonicalwebteam.com/ and check there

To post a comment you must log in.
Revision history for this message
Anthony Dillon (ya-bo-ng) wrote :

Awesome stuff, QA OK +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'footer.php'
--- footer.php 2015-06-12 14:12:24 +0000
+++ footer.php 2016-08-26 09:40:17 +0000
@@ -1,3 +1,5 @@
1<?php global $asset_path; ?>
2
1</div><!-- /.inner-wrapper -->3</div><!-- /.inner-wrapper -->
2</div><!-- /.wrapper -->4</div><!-- /.wrapper -->
35
@@ -10,7 +12,7 @@
10 </div>12 </div>
11</footer>13</footer>
1214
13<script src="//assets.ubuntu.com/sites/ubuntu/latest/u/js/plugins/yui-combined.min.js"></script>15<script src="<?php echo $asset_path ?>40d25181-yui-combined.min.js"></script>
1416
15<script>17<script>
16 if(!core){ var core = {}; }18 if(!core){ var core = {}; }
@@ -18,8 +20,8 @@
18</script>20</script>
1921
20<script src="<?php echo get_template_directory_uri(); ?>/js/core.js"></script>22<script src="<?php echo get_template_directory_uri(); ?>/js/core.js"></script>
21<script src="//assets.ubuntu.com/sites/ubuntu/1209/u/js/global.js"></script>23<script src="<?php echo $asset_path ?>94052790-global.js"></script>
22<script src="//assets.ubuntu.com/sites/ubuntu/1209/u/js/scratch.js"></script>24<script src="<?php echo $asset_path ?>ea5f3f25-scratch.js""></script>
2325
24<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>26<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
25<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>27<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>
2628
=== modified file 'functions.php'
--- functions.php 2016-01-25 12:16:48 +0000
+++ functions.php 2016-08-26 09:40:17 +0000
@@ -1,4 +1,6 @@
1<?php1<?php
2// asset server variable
3$asset_path = 'https://assets.ubuntu.com/v1/';
24
3// Add support for SVG uploads5// Add support for SVG uploads
4add_filter('upload_mimes', 'custom_upload_mimes');6add_filter('upload_mimes', 'custom_upload_mimes');
57
=== modified file 'header.php'
--- header.php 2015-06-24 15:48:42 +0000
+++ header.php 2016-08-26 09:40:17 +0000
@@ -1,5 +1,6 @@
1<?php global $template_body_id; if (!$template_body_id) { $template_body_id = 'default'; } ?>1<?php global $template_body_id; if (!$template_body_id) { $template_body_id = 'default'; } ?>
2<?php global $template_body_class; if (!$template_body_class) { $template_body_class = 'default'; } ?>2<?php global $template_body_class; if (!$template_body_class) { $template_body_class = 'default'; } ?>
3<?php global $asset_path; ?>
34
4<!DOCTYPE html>5<!DOCTYPE html>
5<html>6<html>
@@ -12,22 +13,21 @@
1213
13 <title><?php wp_title('|', true, 'right'); ?><?php bloginfo('name'); ?></title>14 <title><?php wp_title('|', true, 'right'); ?><?php bloginfo('name'); ?></title>
1415
15 <link rel="shortcut icon" href="//assets.ubuntu.com/sites/ubuntu/latest/u/img/favicon.ico" type="image/x-icon" />16 <link rel="icon" type="image/png" href="<?php echo $asset_path ?>cb22ba5d-favicon-16x16.png" sizes="16x16" />
17 <link rel="icon" type="image/png" href="<?php echo $asset_path ?>49a1a858-favicon-32x32.png" sizes="32x32" />
1618
17 <!-- fonts -->19 <!-- fonts -->
18 <link href='http://fonts.googleapis.com/css?family=Ubuntu:300,400,700,300italic,400italic,700italic' rel='stylesheet' type='text/css'>20 <link href='http://fonts.googleapis.com/css?family=Ubuntu:300,400,700,300italic,400italic,700italic' rel='stylesheet' type='text/css'>
19 <link href='http://fonts.googleapis.com/css?family=Ubuntu+Mono' rel='stylesheet' type='text/css'>21 <link href='http://fonts.googleapis.com/css?family=Ubuntu+Mono' rel='stylesheet' type='text/css'>
2022
21 <!-- stylesheets -->23 <!-- stylesheets -->
22 <link rel="stylesheet" type="text/css" media="screen" href="//assets.ubuntu.com/sites/guidelines/css/responsive/latest/ubuntu-styles.css">24 <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $asset_path ?>cfa654d4-ubuntu-styles.css">
23 <link rel="stylesheet" type="text/css" media="screen" href="//assets.ubuntu.com/sites/ubuntu/1207/u/css/beta/global-responsive.css">25 <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $asset_path ?>126653c9-global-responsive.css">
24 <link rel="stylesheet" type="text/css" media="print" href="//assets.ubuntu.com/sites/ubuntu/1207/u/css/core-print.css">26 <link rel="stylesheet" type="text/css" media="print" href="<?php echo $asset_path ?>0df231d4-core-print.css">
25
26 <link rel="stylesheet" type="text/css" media="screen" href="<?php bloginfo('template_url'); ?>/css/scratch.css" />27 <link rel="stylesheet" type="text/css" media="screen" href="<?php bloginfo('template_url'); ?>/css/scratch.css" />
2728
28 <script src="//assets.ubuntu.com/sites/ubuntu/latest/u/js/plugins/modernizr.2.7.1.js"></script>29 <script src="//assets.ubuntu.com/sites/ubuntu/latest/u/js/plugins/modernizr.2.7.1.js"></script>
2930
30
31</head>31</head>
32<body id="<?php echo $template_body_id; ?>" class="<?php echo $template_body_class; ?>">32<body id="<?php echo $template_body_id; ?>" class="<?php echo $template_body_class; ?>">
3333
@@ -35,7 +35,7 @@
35 <nav role="navigation" class="nav-primary nav-right">35 <nav role="navigation" class="nav-primary nav-right">
36 <div class="logo">36 <div class="logo">
37 <a class="logo-ubuntu" href="/">37 <a class="logo-ubuntu" href="/">
38 <img width="118" height="27" src="//assets.ubuntu.com/sites/ubuntu/latest/u/img/logos/logo-ubuntu-orange.png" alt="Ubuntu logo for print" />38 <img width="118" height="27" src="<?php echo $asset_path ?>bcc17b1c-logo-ubuntu-orange.png" alt="Ubuntu logo for print" />
39 <span>Design</span>39 <span>Design</span>
40 </a>40 </a>
41 </div>41 </div>
@@ -51,7 +51,7 @@
51 <form id="form-search" class="header-search" action="/search" method="get">51 <form id="form-search" class="header-search" action="/search" method="get">
52 <label class="accessibility-aid" for="search"><?php _e('Search:'); ?></label>52 <label class="accessibility-aid" for="search"><?php _e('Search:'); ?></label>
53 <input type="search" maxlength="255" name="search" id="search" class="form-text" placeholder="Search" value="" />53 <input type="search" maxlength="255" name="search" id="search" class="form-text" placeholder="Search" value="" />
54 <button type="submit" name="submit"><img src="https://assets.ubuntu.com/sites/ubuntu/latest/u/img/search-white.svg" alt="Search" height="28" /></button>54 <button type="submit" name="submit"><img src="<?php echo $asset_path ?>2196e362-search-white.svg" alt="Search" height="28" /></button>
55 </form>55 </form>
56 </nav>56 </nav>
57</header><!-- /# end header -->57</header><!-- /# end header -->
5858
=== modified file 'loop-downloads.php'
--- loop-downloads.php 2014-10-21 16:38:46 +0000
+++ loop-downloads.php 2016-08-26 09:40:17 +0000
@@ -2,7 +2,7 @@
2// Get posts2// Get posts
3$args = array();3$args = array();
4$args['post_type'] = 'downloads';4$args['post_type'] = 'downloads';
5$args['posts_per_page'] = 100;5$args['posts_per_page'] = -1;
6$metadata = get_query_var('metadata');6$metadata = get_query_var('metadata');
7$search = get_search_query();7$search = get_search_query();
8if (!empty($metadata)) {8if (!empty($metadata)) {

Subscribers

People subscribed via source and target branches

to all changes: