Skip to content

Commit c9c0a5b

Browse files
ewdurbindomdfcoding
authored andcommitted
Tweaks for sponsor logo placements (pypi#10367)
Follows on from pypi#9979 - Updates CSP for connect-src used for placement view reporting - Tweaks CSS to better style/differentiate logo placement
1 parent cad590b commit c9c0a5b

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

tests/unit/test_csp.py

+1
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ def test_includeme():
202202
"'self'",
203203
"https://api.github.com/repos/",
204204
"*.fastly-insights.com",
205+
"*.ethicalads.io",
205206
"sentry.io",
206207
"https://api.pwnedpasswords.com",
207208
"https://2p66nmmycsj3.statuspage.io",

warehouse/csp.py

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def includeme(config):
8181
SELF,
8282
"https://api.github.com/repos/",
8383
"*.fastly-insights.com",
84+
"*.ethicalads.io",
8485
"sentry.io",
8586
"https://api.pwnedpasswords.com",
8687
]

warehouse/static/sass/blocks/_sidebar-section.scss

+16-2
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,30 @@
3838
@include link-focus-state($primary-color);
3939
}
4040

41+
.ethical-sidebar {
42+
border: 2px solid $border-color;
43+
border-radius: 5px;
44+
padding: 1rem 1rem .25rem 1em;
45+
}
46+
4147
.ethical-content {
42-
text-align-last: center;
43-
text-align: left;
48+
text-align: center;
4449

4550
img {
4651
width: 60%;
4752
display: inline-block;
4853
}
4954
}
5055

56+
.ethical-image-link {
57+
@include link-without-underline;
58+
}
59+
60+
.ethical-text {
61+
padding-top: 1rem;
62+
padding-bottom: 1rem;
63+
}
64+
5165
&:last-of-type {
5266
margin-bottom: 0;
5367
padding-bottom: 0;

0 commit comments

Comments
 (0)