8000 Make them look all the same · python/devguide@0f24453 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0f24453

Browse files
committed
Make them look all the same
1 parent 87837ba commit 0f24453

File tree

2 files changed

+140
-88
lines changed

2 files changed

+140
-88
lines changed

_static/devguide_overrides.css

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,38 +45,60 @@
4545

4646
.release-cycle-chart .release-cycle-blob-label {
4747
/* white looks good on both light & dark */
48-
fill: white;
48+
fill: var(--color-foreground-primary);
4949
}
5050

51-
.release-cycle-chart .release-cycle-blob-label.release-cycle-blob-security,
52-
.release-cycle-chart .release-cycle-blob-label.release-cycle-blob-bugfix {
51+
.release-cycle-chart .release-cycle-blob-label.release-cycle-status-security,
52+
.release-cycle-chart .release-cycle-blob-label.release-cycle-status-bugfix {
5353
/* but use black to improve contrast for lighter backgrounds */
5454
fill: black;
5555
}
5656

57-
.release-cycle-chart .release-cycle-blob.release-cycle-blob-end-of-life {
58-
fill: #DD2200;
59-
stroke: #FF8888;
57+
.release-cycle-chart .release-cycle-status-end-of-life {
58+
--status-bg-color: #DD2200;
59+
--status-border-color: #FF8888;
60+
}
61+
62+
.release-cycle-chart .release-cycle-status-security {
63+
--status-bg-color: #FFDD44;
64+
--status-border-color: #FF8800;
6065
}
6166

62-
.release-cycle-chart .release-cycle-blob.release-cycle-blob-security {
63-
fill: #FFDD44;
64-
stroke: #FF8800;
67+
.release-cycle-chart .release-cycle-status-bugfix {
68+
--status-bg-color: #00DD22;
69+
--status-border-color: #008844;
6570
}
6671

67-
.release-cycle-chart .release-cycle-blob.release-cycle-blob-bugfix {
68-
fill: #00DD22;
69-
stroke: #008844;
72+
.release-cycle-chart .release-cycle-status-prerelease {
73+
--status-bg-color: teal;
74+
--status-border-color: darkgreen;
7075
}
7176

72-
.release-cycle-chart .release-cycle-blob.release-cycle-blob-prerelease {
73-
fill: teal;
74-
stroke: darkgreen;
77+
.release-cycle-chart .release-cycle-status-feature {
78+
--status-bg-color: #2222EE;
79+
--status-border-color: #008888;
80+
}
81+
82+
.release-cycle-chart .release-cycle-blob {
83+
fill: var(--status-bg-color);
84+
stroke: transparent;
7585
}
7686

77-
.release-cycle-chart .release-cycle-blob.release-cycle-blob-feature {
78-
fill: #2222EE;
79-
stroke: #008888;
87+
.release-cycle-chart .release-cycle-border {
88+
fill: transparent;
89+
stroke: var(--status-border-color);
90+
stroke-width: 1.6px;
91+
}
92+
93+
.release-cycle-chart .release-cycle-shade {
94+
fill: transparent;
95+
stroke: transparent;
96+
opacity: 50%;
97+
98+
&.release-cycle-status-end-of-life,
99+
&.release-cycle-status-feature {
100+
fill: var(--color-background-primary);
101+
}
80102
}
81103

82104
.good pre {

_tools/release_cycle_template.svg.jinja

Lines changed: 100 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -59,86 +59,116 @@
5959
{% set start_x = date_to_x(version.first_release_date) %}
6060
{% set end_x = date_to_x(version.end_of_life_date) %}
6161

62-
{% if version.status == "bugfix" %}
63-
<!-- bugfix status needs a security tail.
64-
Draw the rectangle with two path elements instead.
65-
Thanks Claude.ai for the conversion.
66-
-->
67-
{% set half_x = date_to_x(version.start_security_date) %}
68-
{% set height = 1.25 * SCALE %}
69-
{% set left_width = (half_x - start_x) * SCALE %}
70-
{% set right_width = (end_x - half_x) * SCALE %}
71-
{% set left_x = start_x * SCALE %}
72-
{% set middle_x = half_x * SCALE %}
73-
{% set right_x = half_x * SCALE %}
74-
{% set recty = (y - 1) * SCALE %}
75-
{% set radius_value = 0.25 * SCALE %}
62+
<!-- bugfix status needs a security tail.
63+
Draw the rectangle with two path elements instead.
64+
Thanks Claude.ai for the conversion.
65+
-->
66+
{% set half_x = [end_x, date_to_x(version.start_security_date)]|min %}
67+
{% set height = 1.25 * SCALE %}
68+
{% set left_width = (half_x - start_x) * SCALE %}
69+
{% set right_width = (end_x - half_x) * SCALE %}
70+
{% set left_x = start_x * SCALE %}
71+
{% set middle_x = half_x * SCALE %}
72+
{% set right_x = half_x * SCALE %}
73+
{% set recty = (y - 1) * SCALE %}
74+
{% set radius_value = 0.25 * SCALE %}
7675

77-
<path
78-
class="release-cycle-blob release-cycle-blob-bugfix"
79-
d="
80-
M{{ left_x + radius_value }},{{ recty }}
81-
Q{{ left_x }},{{ recty }} {{ left_x }},{{ recty + radius_value }}
82-
V{{ recty + height - radius_value }}
83-
Q{{ left_x }},{{ recty + height }} {{ left_x + radius_value }},{{ recty + height }}
84-
H{{ middle_x }}
85-
V{{ recty }}
86-
Z
87-
"
88-
/>
89-
<text
90-
class="release-cycle-blob-label release-cycle-blob-bugfix"
91-
x="{{ (start_x + half_x) / 2 * SCALE }}"
92-
y="{{ (y - 0.1) * SCALE }}"
93-
font-size="{{ SCALE * 0.75 }}"
94-
text-anchor="middle"
95-
>
96-
bugfix
97-
</text>
76+
<path
77+
class="release-cycle-blob release-cycle-status-bugfix"
78+
d="
79+
M{{ left_x + radius_value }},{{ recty }}
80+
q{{ -radius_value }},0 {{ -radius_value }},{{ radius_value }}
81+
v{{ height - 2*radius_value }}
82+
Q{{ left_x }},{{ recty + height }} {{ left_x + radius_value }},{{ recty + height }}
83+
H{{ middle_x }}
84+
V{{ recty }}
85+
Z
86+
"
87+
/>
9888

99-
<path
100-
class="release-cycle-blob release-cycle-blob-security"
101-
d="
89+
{% if version.key != "3.0" %}
90+
<path
91+
class="release-cycle-blob release-cycle-status-security"
92+
d="
10293
M{{ right_x }},{{ recty }}
10394
H{{ right_x + right_width - radius_value }}
10495
Q{{ right_x + right_width }},{{ recty }} {{ right_x + right_width }},{{ recty + radius_value }}
10596
V{{ recty + height - radius_value }}
10697
Q{{ right_x + right_width }},{{ recty + height }} {{ right_x + right_width - radius_value }},{{ recty + height }}
107-
H{{ right_x }}
98+
H{{ middle_x }}
10899
V{{ recty }}
109100
Z
110-
"
111-
/>
112-
<text
113-
class="release-cycle-blob-label release-cycle-blob-security"
114-
x="{{ (half_x + end_x) / 2 * SCALE }}"
115-
y="{{ (y - 0.1) * SCALE }}"
116-
font-size="{{ SCALE * 0.75 }}"
117-
text-anchor="middle"
118-
>
119-
security
120-
</text>
121-
{% else %}
122-
<!-- Most statuses only need a simple rectangle with text. -->
123-
<rect
124-
class="release-cycle-blob release-cycle-blob-{{ version.status }}"
125-
x="{{ start_x * SCALE }}"
126-
y="{{ (y - 1) * SCALE }}"
127-
width="{{ (end_x - start_x) * SCALE }}"
128-
height="{{ 1.25 * SCALE }}"
129-
rx="0.25em"
130-
ry="0.25em"
131-
/>
132-
<text
133-
class="release-cycle-blob-label release-cycle-blob-{{ version.status }}"
134-
x="{{ (start_x + end_x) / 2 * SCALE }}"
135-
y="{{ (y - 0.1) * SCALE }}"
136-
font-size="{{ SCALE * 0.75 }}"
137-
text-anchor="middle"
138-
>
139-
{{ version.status }}
140-
</text>
101+
"
102+
/>
141103
{% endif %}
104+
<rect
105+
class="release-cycle-border release-cycle-status-{{ version.status }}"
106+
x="{{ start_x * SCALE }}"
107+
y="{{ (y - 1) * SCALE }}"
108+
width="{{ (end_x - start_x) * SCALE }}"
109+
height="{{ 1.25 * SCALE }}"
110+
rx="0.25em"
111+
ry="0.25em"
112+
/>
113+
{% if version.status == "bugfix" %}
114+
<text
115+
class="release-cycle-blob-label release-cycle-status-bugfix"
116+
x="{{ (start_x + half_x) / 2 * SCALE }}"
117+
y="{{ (y - 0.1) * SCALE }}"
118+
font-size="{{ SCALE * 0.75 }}"
119+
text-anchor="middle"
120+
>
121+
bugfix
122+
</text>
123+
{% elif version.status == "security" %}
124+
<text
125+
class="release-cycle-blob-label release-cycle-status-security"
126+
x="{{ (half_x + end_x) / 2 * SCALE }}"
127+
y="{{ (y - 0.1) * SCALE }}"
128+
font-size="{{ SCALE * 0.75 }}"
129+
text-anchor="middle"
130+
>
131+
security
132+
</text>
133+
{% elif version.status == "end-of-life" %}
134+
<text
135+
class="release-cycle-blob-label release-cycle-status-end-of-life"
136+
x="{{ (end_x + 0.5) * SCALE }}"
137+
y="{{ (y - 0.1) * SCALE }}"
138+
font-size="{{ SCALE * 0.75 }}"
139+
text-anchor="start"
140+
>
141+
end-of-life
142+
</text>
143+
{% elif version.status == "feature" %}
144+
<text
145+
class="release-cycle-blob-label release-cycle-status-feature"
146+
x="{{ (start_x - 0.5) * SCALE }}"
147+
y="{{ (y - 0.1) * SCALE }}"
148+
font-size="{{ SCALE * 0.75 }}"
149+
text-anchor="end"
150+
>
151+
feature
152+
</text>
153+
{% endif %}
154+
<rect
155+
class="release-cycle-shade release-cycle-status-{{ version.status }}"
156+
x="{{ start_x * SCALE }}"
157+
y="{{ (y - 1) * SCALE }}"
158+
width="{{ (end_x - start_x) * SCALE }}"
159+
height="{{ 1.25 * SCALE }}"
160+
rx="0.25em"
161+
ry="0.25em"
162+
/>
163+
<rect
164+
class="release-cycle-border release-cycle-status-{{ version.status }}"
165+
x="{{ start_x * SCALE }}"
166+
y="{{ (y - 1) * SCALE }}"
167+
width="{{ (end_x - start_x) * SCALE }}"
168+
height="{{ 1.25 * SCALE }}"
169+
rx="0.25em"
170+
ry="0.25em"
171+
/>
142172
{% endfor %}
143173

144174
<!-- A line for today -->

0 commit comments

Comments
 (0)
0