mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 11:51:05 -05:00
Docs: css tweaks
* Add vertical space between items in "open" lists (rtfd/sphinx_rtd_theme#590) * Distinguish shell prompts in console examples, and omit them if the code is copied * Add css and js extras directly from Sphinx conf.py (no need to override template)
This commit is contained in:
21
docs/_static/anymail-theme.css
vendored
Normal file
21
docs/_static/anymail-theme.css
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
/* Anymail modifications to sphinx-rtd-theme styles */
|
||||
|
||||
/* List item spacing: https://github.com/rtfd/sphinx_rtd_theme/issues/590 */
|
||||
.rst-content .section ol li p:last-child,
|
||||
.rst-content .section ul li p:last-child {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
|
||||
/* Pygments shell/console prompt: */
|
||||
.highlight .gp {
|
||||
/* The RTD theme shows prompts the same color as other code.
|
||||
We want to distinguish them (like most Pygments themes do). */
|
||||
color: #d14;
|
||||
|
||||
/* Exclude prompt characters when copying from highlighted code. */
|
||||
user-select: none;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
}
|
||||
3
docs/_templates/layout.html
vendored
3
docs/_templates/layout.html
vendored
@@ -1,3 +0,0 @@
|
||||
{% extends "!layout.html" %}
|
||||
|
||||
{% set script_files = script_files + ["_static/version-alert.js"] %}
|
||||
@@ -145,6 +145,11 @@ html_static_path = ['_static']
|
||||
# typographically correct entities.
|
||||
# html_use_smartypants = True
|
||||
|
||||
# If true, a list all whose items consist of a single paragraph and/or a
|
||||
# sub-list all whose items etc… (recursive definition) will not use the <p>
|
||||
# element for any of its items. This is standard docutils behavior.
|
||||
# html_compact_lists = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
# html_sidebars = {}
|
||||
|
||||
@@ -272,6 +277,9 @@ intersphinx_mapping = {
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.add_stylesheet("anymail-theme.css")
|
||||
app.add_javascript("version-alert.js")
|
||||
|
||||
# Django-specific roles, from https://github.com/django/django/blob/master/docs/_ext/djangodocs.py:
|
||||
app.add_crossref_type(
|
||||
directivename="setting",
|
||||
|
||||
@@ -118,14 +118,12 @@ To use batch sending with Anymail (for ESPs that support it):
|
||||
or with some ESPs you can use merge fields directly in your
|
||||
:class:`~django.core.mail.EmailMessage` (meaning the message itself
|
||||
is treated as an on-the-fly template).
|
||||
|
||||
* Set the message's :attr:`~AnymailMessage.merge_data` attribute to define merge field
|
||||
substitutions for each recipient, and optionally set :attr:`~AnymailMessage.merge_global_data`
|
||||
to defaults or values to use for all recipients.
|
||||
|
||||
* Specify all of the recipients for the batch in the message's `to` list.
|
||||
|
||||
.. caution::
|
||||
.. caution::
|
||||
|
||||
It's critical to set the :attr:`~AnymailMessage.merge_data` attribute:
|
||||
this is how Anymail recognizes the message as a batch send.
|
||||
|
||||
Reference in New Issue
Block a user