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
1=== modified file 'footer.php'
2--- footer.php 2015-06-12 14:12:24 +0000
3+++ footer.php 2016-08-26 09:40:17 +0000
4@@ -1,3 +1,5 @@
5+<?php global $asset_path; ?>
6+
7 </div><!-- /.inner-wrapper -->
8 </div><!-- /.wrapper -->
9
10@@ -10,7 +12,7 @@
11 </div>
12 </footer>
13
14-<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>
16
17 <script>
18 if(!core){ var core = {}; }
19@@ -18,8 +20,8 @@
20 </script>
21
22 <script src="<?php echo get_template_directory_uri(); ?>/js/core.js"></script>
23-<script src="//assets.ubuntu.com/sites/ubuntu/1209/u/js/global.js"></script>
24-<script src="//assets.ubuntu.com/sites/ubuntu/1209/u/js/scratch.js"></script>
25+<script src="<?php echo $asset_path ?>94052790-global.js"></script>
26+<script src="<?php echo $asset_path ?>ea5f3f25-scratch.js""></script>
27
28 <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
29 <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>
30
31=== modified file 'functions.php'
32--- functions.php 2016-01-25 12:16:48 +0000
33+++ functions.php 2016-08-26 09:40:17 +0000
34@@ -1,4 +1,6 @@
35 <?php
36+// asset server variable
37+$asset_path = 'https://assets.ubuntu.com/v1/';
38
39 // Add support for SVG uploads
40 add_filter('upload_mimes', 'custom_upload_mimes');
41
42=== modified file 'header.php'
43--- header.php 2015-06-24 15:48:42 +0000
44+++ header.php 2016-08-26 09:40:17 +0000
45@@ -1,5 +1,6 @@
46 <?php global $template_body_id; if (!$template_body_id) { $template_body_id = 'default'; } ?>
47 <?php global $template_body_class; if (!$template_body_class) { $template_body_class = 'default'; } ?>
48+<?php global $asset_path; ?>
49
50 <!DOCTYPE html>
51 <html>
52@@ -12,22 +13,21 @@
53
54 <title><?php wp_title('|', true, 'right'); ?><?php bloginfo('name'); ?></title>
55
56- <link rel="shortcut icon" href="//assets.ubuntu.com/sites/ubuntu/latest/u/img/favicon.ico" type="image/x-icon" />
57+ <link rel="icon" type="image/png" href="<?php echo $asset_path ?>cb22ba5d-favicon-16x16.png" sizes="16x16" />
58+ <link rel="icon" type="image/png" href="<?php echo $asset_path ?>49a1a858-favicon-32x32.png" sizes="32x32" />
59
60 <!-- fonts -->
61 <link href='http://fonts.googleapis.com/css?family=Ubuntu:300,400,700,300italic,400italic,700italic' rel='stylesheet' type='text/css'>
62 <link href='http://fonts.googleapis.com/css?family=Ubuntu+Mono' rel='stylesheet' type='text/css'>
63
64 <!-- stylesheets -->
65- <link rel="stylesheet" type="text/css" media="screen" href="//assets.ubuntu.com/sites/guidelines/css/responsive/latest/ubuntu-styles.css">
66- <link rel="stylesheet" type="text/css" media="screen" href="//assets.ubuntu.com/sites/ubuntu/1207/u/css/beta/global-responsive.css">
67- <link rel="stylesheet" type="text/css" media="print" href="//assets.ubuntu.com/sites/ubuntu/1207/u/css/core-print.css">
68-
69+ <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $asset_path ?>cfa654d4-ubuntu-styles.css">
70+ <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $asset_path ?>126653c9-global-responsive.css">
71+ <link rel="stylesheet" type="text/css" media="print" href="<?php echo $asset_path ?>0df231d4-core-print.css">
72 <link rel="stylesheet" type="text/css" media="screen" href="<?php bloginfo('template_url'); ?>/css/scratch.css" />
73
74 <script src="//assets.ubuntu.com/sites/ubuntu/latest/u/js/plugins/modernizr.2.7.1.js"></script>
75
76-
77 </head>
78 <body id="<?php echo $template_body_id; ?>" class="<?php echo $template_body_class; ?>">
79
80@@ -35,7 +35,7 @@
81 <nav role="navigation" class="nav-primary nav-right">
82 <div class="logo">
83 <a class="logo-ubuntu" href="/">
84- <img width="118" height="27" src="//assets.ubuntu.com/sites/ubuntu/latest/u/img/logos/logo-ubuntu-orange.png" alt="Ubuntu logo for print" />
85+ <img width="118" height="27" src="<?php echo $asset_path ?>bcc17b1c-logo-ubuntu-orange.png" alt="Ubuntu logo for print" />
86 <span>Design</span>
87 </a>
88 </div>
89@@ -51,7 +51,7 @@
90 <form id="form-search" class="header-search" action="/search" method="get">
91 <label class="accessibility-aid" for="search"><?php _e('Search:'); ?></label>
92 <input type="search" maxlength="255" name="search" id="search" class="form-text" placeholder="Search" value="" />
93- <button type="submit" name="submit"><img src="https://assets.ubuntu.com/sites/ubuntu/latest/u/img/search-white.svg" alt="Search" height="28" /></button>
94+ <button type="submit" name="submit"><img src="<?php echo $asset_path ?>2196e362-search-white.svg" alt="Search" height="28" /></button>
95 </form>
96 </nav>
97 </header><!-- /# end header -->
98
99=== modified file 'loop-downloads.php'
100--- loop-downloads.php 2014-10-21 16:38:46 +0000
101+++ loop-downloads.php 2016-08-26 09:40:17 +0000
102@@ -2,7 +2,7 @@
103 // Get posts
104 $args = array();
105 $args['post_type'] = 'downloads';
106-$args['posts_per_page'] = 100;
107+$args['posts_per_page'] = -1;
108 $metadata = get_query_var('metadata');
109 $search = get_search_query();
110 if (!empty($metadata)) {

Subscribers

People subscribed via source and target branches

to all changes: