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
=== modified file 'lib/cdimage/tree.py'
--- lib/cdimage/tree.py 2019-03-22 15:55:28 +0000
+++ lib/cdimage/tree.py 2019-04-11 21:45:48 +0000
@@ -1114,9 +1114,14 @@
1114 <!-- Main style sheets for CSS2 capable browsers -->1114 <!-- Main style sheets for CSS2 capable browsers -->
1115 <style type="text/css" media="screen">""") % (heading, heading),1115 <style type="text/css" media="screen">""") % (heading, heading),
1116 file=header)1116 file=header)
1117 for css in self.cssincludes():1117 assets = 'https://assets.ubuntu.com/v1/'
1118 print(" @import url(%s);" % css, file=header)
1119 print(dedent("""\1118 print(dedent("""\
1119 .p-strip--image {
1120 background-image: url('"""
1121 + assets + """775cc62b-vanilla-grad-background.png');
1122 background-position: 75% 50%;
1123 }
1124
1120 .p-table-wrapper {1125 .p-table-wrapper {
1121 overflow-x: scroll;1126 overflow-x: scroll;
1122 }1127 }
@@ -1157,6 +1162,9 @@
1157 }1162 }
1158 </style>1163 </style>
1159 """), file=header)1164 """), file=header)
1165 for css in self.cssincludes():
1166 print("<link href='%s' rel='stylesheet' "
1167 "type='text/css'>" % css, file=header)
1160 if self.project == "kubuntu":1168 if self.project == "kubuntu":
1161 print(1169 print(
1162 "<link "1170 "<link "
@@ -1175,7 +1183,6 @@
1175 else:1183 else:
1176 header_href = 'http://www.ubuntu.com/'1184 header_href = 'http://www.ubuntu.com/'
11771185
1178 assets = 'https://assets.ubuntu.com/v1/'
1179 print(dedent("""\1186 print(dedent("""\
1180 </head>1187 </head>
1181 <body>1188 <body>
@@ -1198,10 +1205,7 @@
1198 </nav>1205 </nav>
1199 </div>1206 </div>
1200 </header>1207 </header>
1201 <section class="p-strip--image is-dark"1208 <section class="p-strip--image is-dark">
1202 style="background-image: url('""" + assets
1203 + """775cc62b-vanilla-grad-background.png');
1204 background-position: 75% 50%;">
1205 <div class="row">1209 <div class="row">
1206 <div id="header"><a href="%s"></a></div>1210 <div id="header"><a href="%s"></a></div>
1207 <h1 class="u-no-margin--bottom">%s</h1>1211 <h1 class="u-no-margin--bottom">%s</h1>

Subscribers

People subscribed via source and target branches