mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Reformat code with automated tools
Apply standardized code style
This commit is contained in:
2
docs/_static/anymail-config.js
vendored
2
docs/_static/anymail-config.js
vendored
@@ -1,4 +1,4 @@
|
||||
window.RATETHEDOCS_OPTIONS = {
|
||||
contactLink: "/help/#contact",
|
||||
privacyLink: "/docs_privacy/"
|
||||
privacyLink: "/docs_privacy/",
|
||||
};
|
||||
|
||||
5
docs/_static/anymail-theme.css
vendored
5
docs/_static/anymail-theme.css
vendored
@@ -1,6 +1,5 @@
|
||||
/* Anymail modifications to sphinx-rtd-theme styles */
|
||||
|
||||
|
||||
/* Sticky table first column (used for ESP feature matrix) */
|
||||
table.sticky-left td:first-of-type,
|
||||
table.sticky-left th:first-of-type {
|
||||
@@ -18,7 +17,6 @@ table.sticky-left th:first-of-type[colspan] > p {
|
||||
left: 17px; /* (.wy-table $table-padding-size) + (docutils border="1" in html) */
|
||||
}
|
||||
|
||||
|
||||
/* Show code cross-reference links as clickable $link-color (blue).
|
||||
|
||||
Sphinx-rtd-theme usually wants `.rst-content a code` to be $link-color [1], but has
|
||||
@@ -44,13 +42,12 @@ table.sticky-left th:first-of-type[colspan] > p {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
|
||||
/* Inline search forms (Anymail addition) */
|
||||
.anymail-inline-search-form {
|
||||
margin-top: -1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.anymail-inline-search-form input[type=search] {
|
||||
.anymail-inline-search-form input[type="search"] {
|
||||
width: 280px;
|
||||
max-width: 100%;
|
||||
border-radius: 50px;
|
||||
|
||||
26
docs/_static/version-alert.js
vendored
26
docs/_static/version-alert.js
vendored
@@ -4,31 +4,35 @@
|
||||
// but adds admonition for the "latest" version -- which is (unreleased) main branch.
|
||||
|
||||
function warnOnLatestVersion() {
|
||||
|
||||
// The warning text and link is really specific to RTD hosting,
|
||||
// so we can just check their global to determine version:
|
||||
if (!window.READTHEDOCS_DATA || window.READTHEDOCS_DATA.version !== "latest") {
|
||||
return; // not latest, or not on RTD
|
||||
return; // not latest, or not on RTD
|
||||
}
|
||||
|
||||
var warning = document.createElement('div');
|
||||
warning.setAttribute('class', 'admonition danger');
|
||||
warning.innerHTML = "<p class='first admonition-title'>Note</p> " +
|
||||
var warning = document.createElement("div");
|
||||
warning.setAttribute("class", "admonition danger");
|
||||
warning.innerHTML =
|
||||
"<p class='first admonition-title'>Note</p> " +
|
||||
"<p class='last'> " +
|
||||
"This document is for an <strong>unreleased development version</strong>. " +
|
||||
"Documentation is available for the <a href='/en/stable/'>current stable release</a>, " +
|
||||
"or for older versions through the “v:” menu at bottom left." +
|
||||
"</p>";
|
||||
warning.querySelector('a').href = window.location.pathname.replace('/latest', '/stable');
|
||||
warning.querySelector("a").href = window.location.pathname.replace(
|
||||
"/latest",
|
||||
"/stable"
|
||||
);
|
||||
|
||||
var parent = document.querySelector('div.body')
|
||||
|| document.querySelector('div.document')
|
||||
|| document.body;
|
||||
var parent =
|
||||
document.querySelector("div.body") ||
|
||||
document.querySelector("div.document") ||
|
||||
document.body;
|
||||
parent.insertBefore(warning, parent.firstChild);
|
||||
}
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', warnOnLatestVersion);
|
||||
if (document.readyState === "loading") {
|
||||
document.addEventListener("DOMContentLoaded", warnOnLatestVersion);
|
||||
} else {
|
||||
warnOnLatestVersion();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user