Skip to content

Commit d43783f

Browse files
authored
Merge pull request #4628 from rtfd/davidfischer/ad-reformat
Make ads more obvious that they are ads
2 parents 3501ca0 + 9858bb6 commit d43783f

File tree

2 files changed

+74
-22
lines changed

2 files changed

+74
-22
lines changed

media/css/readthedocs-doc-embed.css

+72-20
Original file line numberDiff line numberDiff line change
@@ -46,32 +46,68 @@ framework html structure.
4646
4747
*/
4848

49-
div.ethical-sidebar, div.ethical-footer {
49+
div.ethical-sidebar,
50+
div.ethical-footer {
5051
display: block !important;
5152
}
52-
.ethical-sidebar, .ethical-footer {
53-
padding: .5em;
53+
.ethical-sidebar,
54+
.ethical-footer {
55+
padding: 1em;
5456
margin: 1em 0;
5557
}
56-
.ethical-sidebar img, .ethical-footer img {
58+
.ethical-sidebar img,
59+
.ethical-footer img {
5760
width: 120px;
5861
height: 90px;
5962
display: inline-block;
6063
}
61-
.ethical-sidebar .ethical-callout, .ethical-footer .ethical-callout {
64+
.ethical-sidebar .ethical-callout,
65+
.ethical-footer .ethical-callout {
6266
padding-top: 1em;
6367
clear: both;
6468
}
65-
.ethical-sidebar .ethical-pixel, .ethical-footer .ethical-pixel, .ethical-fixedfooter .ethical-pixel {
69+
.ethical-sidebar .ethical-pixel,
70+
.ethical-footer .ethical-pixel,
71+
.ethical-fixedfooter .ethical-pixel {
6672
display: none !important;
6773
}
68-
.ethical-sidebar .ethical-text, .ethical-footer .ethical-text {
74+
.ethical-sidebar .ethical-text,
75+
.ethical-footer .ethical-text {
6976
margin-top: 1em;
7077
}
71-
.ethical-sidebar .ethical-image-link, .ethical-footer .ethical-image-link {
78+
.ethical-sidebar .ethical-image-link,
79+
.ethical-footer .ethical-image-link {
7280
border: 0;
7381
}
7482

83+
.ethical-sidebar,
84+
.ethical-footer {
85+
background-color: #eee;
86+
border: 1px solid #ccc;
87+
border-radius: 5px;
88+
color: #0a0a0a;
89+
font-size: 14px;
90+
line-height: 20px;
91+
}
92+
93+
.ethical-sidebar a,
94+
.ethical-sidebar a:visited,
95+
.ethical-sidebar a:hover,
96+
.ethical-sidebar a:active,
97+
.ethical-footer a,
98+
.ethical-footer a:visited,
99+
.ethical-footer a:hover,
100+
.ethical-footer a:active {
101+
color: #0a0a0a;
102+
text-decoration: underline !important;
103+
border-bottom: 0 !important;
104+
}
105+
106+
.ethical-callout a {
107+
color: #707070 !important;
108+
text-decoration: none !important;
109+
}
110+
75111
/* Sidebar promotions */
76112
.ethical-sidebar {
77113
text-align: center;
@@ -80,14 +116,19 @@ div.ethical-sidebar, div.ethical-footer {
80116
/* Footer promotions */
81117
.ethical-footer {
82118
text-align: left;
83-
font-size: 90%;
119+
120+
font-size: 12px;
121+
line-height: 18px;
84122
}
85123
.ethical-footer img {
86124
float: right;
87125
margin-left: 25px;
88126
}
89127
.ethical-footer .ethical-callout {
90-
text-align: right;
128+
text-align: center;
129+
}
130+
.ethical-footer small {
131+
font-size: 10px;
91132
}
92133

93134
/* Fixed footer promotions */
@@ -127,23 +168,18 @@ div.ethical-sidebar, div.ethical-footer {
127168
}
128169

129170
/* RTD Theme specific customizations */
171+
.wy-nav-side .ethical-rtd {
172+
/* RTD theme doesn't correctly set the sidebar width */
173+
width: 300px;
174+
padding: 1em;
175+
}
130176
.ethical-rtd .ethical-sidebar {
131177
/* RTD theme doesn't set sidebar text color */
132178
color: #b3b3b3;
133179

134-
/* RTD theme doesn't correctly set the sidebar width */
135-
width: 300px;
136-
137180
font-size: 14px;
138181
line-height: 20px;
139182
}
140-
.ethical-rtd .ethical-sidebar a,
141-
.ethical-rtd .ethical-sidebar a:visited,
142-
.ethical-rtd .ethical-sidebar a:hover,
143-
.ethical-rtd .ethical-sidebar a:active {
144-
/* RTD theme doesn't set sidebar link color */
145-
color: #efefef;
146-
}
147183

148184
/* Alabaster specific customizations */
149185
.ethical-alabaster a.ethical-image-link {
@@ -162,6 +198,22 @@ div.ethical-sidebar, div.ethical-footer {
162198
margin-top: 3em;
163199
}
164200

201+
/* Dark theme */
202+
.ethical-dark-theme .ethical-sidebar {
203+
background-color: rgba(255, 255, 255, 0.1);
204+
border: 1px solid #a0a0a0;
205+
color: #c2c2c2 !important;
206+
}
207+
.ethical-dark-theme a,
208+
.ethical-dark-theme a:visited {
209+
color: #e6e6e6 !important;
210+
border-bottom: 0 !important;
211+
}
212+
.ethical-dark-theme .ethical-callout a {
213+
color: #b3b3b3 !important;
214+
}
215+
216+
165217
/* Ad block nag */
166218
.keep-us-sustainable {
167219
padding: .5em;

readthedocs/core/static-src/core/js/doc-embed/sponsorship.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ function create_sidebar_placement() {
2020

2121
if (rtd.is_mkdocs_builder() && rtd.is_rtd_like_theme()) {
2222
selector = 'nav.wy-nav-side';
23-
class_name = 'ethical-rtd';
23+
class_name = 'ethical-rtd ethical-dark-theme';
2424
} else if (rtd.is_rtd_like_theme()) {
2525
selector = 'nav.wy-nav-side > div.wy-side-scroll';
26-
class_name = 'ethical-rtd';
26+
class_name = 'ethical-rtd ethical-dark-theme';
2727
} else if (rtd.is_alabaster_like_theme()) {
2828
selector = 'div.sphinxsidebar > div.sphinxsidebarwrapper';
2929
class_name = 'ethical-alabaster';

0 commit comments

Comments
 (0)