Merge lp:~vorlon/ubuntu-cdimage/no-hard-coded-style into lp:ubuntu-cdimage

Proposed by Steve Langasek
Status: Merged
Merged at revision: 1798
Proposed branch: lp:~vorlon/ubuntu-cdimage/no-hard-coded-style
Merge into: lp:ubuntu-cdimage
Diff against target: 50 lines (+11/-7)
1 file modified
lib/cdimage/tree.py (+11/-7)
To merge this branch: bzr merge lp:~vorlon/ubuntu-cdimage/no-hard-coded-style
Reviewer Review Type Date Requested Status
Dimitri John Ledkov (community) Disapprove
Rik Mills Pending
Ubuntu CD Image Team Pending
Review via email: mp+365882@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I have code that conditionalised many names of webassets. Not just this one. With overrides on per-flavour basis.

review: Disapprove
Revision history for this message
Rik Mills (rikmills) wrote :

I can only comment on the result I saw where this was applied to: http://cdimage.ubuntu.com/kubuntu/releases/disco/beta/

While the rest of the CSS is not as tidy and well formatted/placed as it once was, the background image is fixed and for now acceptable.

Thank you.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/cdimage/tree.py'
2--- lib/cdimage/tree.py 2019-03-22 15:55:28 +0000
3+++ lib/cdimage/tree.py 2019-04-11 21:45:48 +0000
4@@ -1114,9 +1114,14 @@
5 <!-- Main style sheets for CSS2 capable browsers -->
6 <style type="text/css" media="screen">""") % (heading, heading),
7 file=header)
8- for css in self.cssincludes():
9- print(" @import url(%s);" % css, file=header)
10+ assets = 'https://assets.ubuntu.com/v1/'
11 print(dedent("""\
12+ .p-strip--image {
13+ background-image: url('"""
14+ + assets + """775cc62b-vanilla-grad-background.png');
15+ background-position: 75% 50%;
16+ }
17+
18 .p-table-wrapper {
19 overflow-x: scroll;
20 }
21@@ -1157,6 +1162,9 @@
22 }
23 </style>
24 """), file=header)
25+ for css in self.cssincludes():
26+ print("<link href='%s' rel='stylesheet' "
27+ "type='text/css'>" % css, file=header)
28 if self.project == "kubuntu":
29 print(
30 "<link "
31@@ -1175,7 +1183,6 @@
32 else:
33 header_href = 'http://www.ubuntu.com/'
34
35- assets = 'https://assets.ubuntu.com/v1/'
36 print(dedent("""\
37 </head>
38 <body>
39@@ -1198,10 +1205,7 @@
40 </nav>
41 </div>
42 </header>
43- <section class="p-strip--image is-dark"
44- style="background-image: url('""" + assets
45- + """775cc62b-vanilla-grad-background.png');
46- background-position: 75% 50%;">
47+ <section class="p-strip--image is-dark">
48 <div class="row">
49 <div id="header"><a href="%s"></a></div>
50 <h1 class="u-no-margin--bottom">%s</h1>

Subscribers

People subscribed via source and target branches