Merge lp:~tsimonq2/ubuntu-cdimage/restore-kubuntu-lubuntu-css into lp:ubuntu-cdimage

Proposed by Simon Quigley
Status: Rejected
Rejected by: Steve Langasek
Proposed branch: lp:~tsimonq2/ubuntu-cdimage/restore-kubuntu-lubuntu-css
Merge into: lp:ubuntu-cdimage
Diff against target: 210 lines (+96/-62)
1 file modified
lib/cdimage/tree.py (+96/-62)
To merge this branch: bzr merge lp:~tsimonq2/ubuntu-cdimage/restore-kubuntu-lubuntu-css
Reviewer Review Type Date Requested Status
Steve Langasek Disapprove
Karl Williams Pending
Rik Mills Pending
Review via email: mp+358940@code.launchpad.net

Commit message

Restore HTML/CSS for Lubuntu and Kubuntu to a known working state.

Description of the change

When Karl Williams recently reworked the default HTML and CSS, he didn't take into account that Lubuntu and Kubuntu have custom CSS that was broken (Kubuntu more than Lubuntu) after the changes were made.

This papers over that, restoring them to a known working state, to give both teams time to properly react.

For comparison:
 - Lubuntu 18.10 (good): http://cdimage.ubuntu.com/lubuntu/releases/18.10/release/
 - Lubuntu dailies (bad): http://cdimage.ubuntu.com/lubuntu/daily-live/current/
 - Kubuntu 18.10 (good): http://cdimage.ubuntu.com/kubuntu/releases/18.10/release/
 - Kubuntu dailies (bad): http://cdimage.ubuntu.com/kubuntu/daily-live/current/

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote :

I believe the CSS for Lubuntu and Kubuntu pages was otherwise fixed somewhere along the way - I certainly don't see any display issues with the current daily links.

In any event, the ubuntu-cdimage source is moving to git, so if this does still need landed it would need to be rebased and resubmitted against git.

review: Disapprove

Unmerged revisions

1762. By Simon Quigley

Restore CSS for Lubuntu and Kubuntu to a known working state.

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 2018-11-12 19:19:26 +0000
3+++ lib/cdimage/tree.py 2018-11-16 22:10:12 +0000
4@@ -1194,22 +1194,28 @@
5 file=header)
6 for css in self.cssincludes():
7 print(" @import url(%s);" % css, file=header)
8- print(dedent("""\
9- table {
10- width: 100%;
11- }
12-
13- th[colspan="5"],
14- th[colspan="4"] {
15- display: none;
16- }
17-
18- th:first-child,
19- td:first-child {
20- width: 5%;
21- }
22- </style>
23- """), file=header)
24+ if self.project in ("lubuntu", "lubuntu-next", "kubuntu"):
25+ print(dedent("""\
26+ body { margin: 2em; }
27+ </style>
28+ """), file=header)
29+ else:
30+ print(dedent("""\
31+ table {
32+ width: 100%;
33+ }
34+
35+ th[colspan="5"],
36+ th[colspan="4"] {
37+ display: none;
38+ }
39+
40+ th:first-child,
41+ td:first-child {
42+ width: 5%;
43+ }
44+ </style>
45+ """), file=header)
46 if self.project == "kubuntu":
47 print(
48 "<link "
49@@ -1235,41 +1241,54 @@
50 header_href = 'http://www.ubuntu.com/'
51
52 assets = 'https://assets.ubuntu.com/v1/'
53- print(dedent("""\
54- </head>
55- <body>
56- <header id="navigation" class="p-navigation">
57- <div class="row">
58- <div class="p-navigation__banner">
59- <div class="p-navigation__logo">
60- <a class="p-navigation__link" href="/">
61- <img class="p-navigation__image"
62- src=" """ + assets
63- + """411e1474-releases-lockup.svg"
64- alt="">
65- </a>
66- </div>
67- </div>
68- <nav class="p-navigation__nav" role="menubar">
69- <span class="u-off-screen">
70- <a href="#pageWrapper">Jump to main content</a>
71- </span>
72- </nav>
73- </div>
74- </header>
75- <section class="p-strip--image is-dark"
76- style="background-image: url('""" + assets
77- + """775cc62b-vanilla-grad-background.png');
78- background-position: 75% 50%;">
79- <div class="row">
80- <div id="header"><a href="%s"></a></div>
81- <h1 class="u-no-margin--bottom">%s</h1>
82- </div>
83- </section>
84- <div id="pageWrapper" class="p-strip">
85- <div class="row">
86- <div id="main">
87- """) % (header_href, heading), file=header)
88+ if self.project in ("lubuntu", "lubuntu-next", "kubuntu"):
89+ print(dedent("""\
90+ </head>
91+
92+ <body><div id="pageWrapper">
93+
94+ <div id="header"><a href="%s"></a></div>
95+
96+ <h1>%s</h1>
97+
98+ <div id="main">
99+ """) % (header_href, heading), file=header)
100+ else:
101+ print(dedent("""\
102+ </head>
103+ <body>
104+ <header id="navigation" class="p-navigation">
105+ <div class="row">
106+ <div class="p-navigation__banner">
107+ <div class="p-navigation__logo">
108+ <a class="p-navigation__link" href="/">
109+ <img class="p-navigation__image"
110+ src=" """ + assets
111+ + """411e1474-releases-lockup.svg"
112+ alt="">
113+ </a>
114+ </div>
115+ </div>
116+ <nav class="p-navigation__nav" role="menubar">
117+ <span class="u-off-screen">
118+ <a href="#pageWrapper">Jump to main content</a>
119+ </span>
120+ </nav>
121+ </div>
122+ </header>
123+ <section class="p-strip--image is-dark"
124+ style="background-image: url('""" + assets
125+ + """775cc62b-vanilla-grad-background.png');
126+ background-position: 75% 50%;">
127+ <div class="row">
128+ <div id="header"><a href="%s"></a></div>
129+ <h1 class="u-no-margin--bottom">%s</h1>
130+ </div>
131+ </section>
132+ <div id="pageWrapper" class="p-strip">
133+ <div class="row">
134+ <div id="main">
135+ """) % (header_href, heading), file=header)
136
137 mirrors_url = "http://www.ubuntu.com/getubuntu/downloadmirrors"
138 reldir = os.path.realpath(directory)
139@@ -1326,8 +1345,9 @@
140 "https://help.ubuntu.com/community/BitTorrent", "BitTorrent")
141
142 for prefix in prefixes:
143- print('<div class="row p-divider"><div class="p-card">',
144- file=header)
145+ if not self.project in ("lubuntu", "lubuntu-next", "kubuntu"):
146+ print('<div class="row p-divider"><div class="p-card">',
147+ file=header)
148 for publish_type in all_publish_types:
149 if not self.find_images(directory, prefix, publish_type):
150 continue
151@@ -1366,8 +1386,9 @@
152 continue
153
154 cdtypestr = self.cdtypestr(publish_type, image_format)
155- print('<div class="col-6 p-divider__block">',
156- file=header)
157+ if not self.project in ("lubuntu", "lubuntu-next", "kubuntu"):
158+ print('<div class="col-6 p-divider__block">',
159+ file=header)
160 print(
161 "<h3>%s</h3>" % self.titlecase(cdtypestr),
162 file=header)
163@@ -1392,9 +1413,12 @@
164
165 print(file=header)
166
167- print('</div>', file=header)
168- print('<div class="col-6 p-divider__block">',
169- file=header)
170+ if self.project in ("lubuntu", "lubuntu-next", "kubuntu"):
171+ print("<dl>", file=header)
172+ else:
173+ print('</div>', file=header)
174+ print('<div class="col-6 p-divider__block">',
175+ file=header)
176
177 for path, arch in paths:
178 base = path.rsplit(".", 1)[0]
179@@ -1424,7 +1448,9 @@
180 self.titlecase(cdtypestr), archstr)
181 archdesc = self.archdesc(arch, publish_type)
182
183- print("<div>", file=header)
184+ if not self.project in ("lubuntu", "lubuntu-next",
185+ "kubuntu"):
186+ print("<div>", file=header)
187 if os.path.exists(path):
188 print(
189 "<a href=\"%s\">%s</a>" %
190@@ -1492,9 +1518,17 @@
191 htaccessimagestr, extstr,
192 os.path.basename(extpath)),
193 file=htaccess)
194- print("</div>", file=header)
195- print('</div>', file=header)
196- print('</div></div>', file=header)
197+ if not self.project in ("lubuntu", "lubuntu-next",
198+ "kubuntu"):
199+ print("</div>", file=header)
200+ if self.project in ("lubuntu", "lubuntu-next",
201+ "kubuntu"):
202+ print("</dl>", file=header)
203+ print(file=header)
204+ else:
205+ print('</div>', file=header)
206+ if not self.project in ("lubuntu", "lubuntu-next", "kubuntu"):
207+ print('</div></div>', file=header)
208 published_ec2_path = os.path.join(
209 directory, "published-ec2-%s.txt" % status)
210 if os.path.exists(published_ec2_path):

Subscribers

People subscribed via source and target branches