Files
postgres-web/media/css/admin_pgweb.css
Magnus Hagander e4453cdda9 Add support for sending out news as HTML email
When a news article is approved, it gets delivered as an email to the
pgsql-announce mailinglist. It will render the markdown of the news
article into a HTML part of the email, and include the markdown raw as
the text part (for those unable or unwilling to read html mail).

For each organisation, a mail template can be specified. Initially only
two templates are supported, one "default" and one "pgproject" which is
for official project news. The intention is *not* to provide generic
templates, but we may want to extend this to certain related projects in
the future *maybe* (such as regional NPOs).

These templates are stored in templates/news/mail/*.html, and for each
template *all* images found in templates/news/mail/img.<template>/ will
be attached to the email. "Conditional image inclusion" currently not
supported.

To do CSS inlining on top of the markdown output, module pynliner is now
required (available in the python3-pynliner package on Debian).

A testing script is added as news_send_email.py in order to easier test
out templates. This is *not* intended for production sending, so it will
for example send unmoderated news. By sending, it adds it to the
outgoing mailqueue in the system, so unless the cronjob is set up to
send, nothing will happen until that is run manually.

Support is included for tagged delivery using pglister, by directly
mapping NewsTags to pglister tags.

While at it, update the moderation preview forms to preview news items
using the HTML template for the email (while leaving other types of
items previewing without a particular stylesheet).
2020-09-10 14:52:41 +02:00

63 lines
927 B
CSS

a.admbutton {
padding: 10px 15px;
}
div.modadmfield input,
div.modadmfield select,
div.modadmfield textarea {
width: 500px;
}
.moderation-form-row div {
display: inline-block;
vertical-align: top;
}
.moderation-form-row div.txtpreview {
border: 1px solid gray;
padding: 5px;
border-radius: 5px;
white-space: pre;
width: 650px;
overflow-x: auto;
margin-right: 20px;
}
.moderation-form-row iframe.mdpreview {
border: 1px solid gray;
padding: 5px;
border-radius: 5px;
width: 650px;
overflow-x: auto;
}
.moderation-form-row div.mdpreview-data {
display: none;
}
.moderation-form-row div.simplepreview {
max-width: 800px;
}
.moderror {
color: red !important;
}
div.modhelp {
display: block;
color: #999;
font-size: 11px;
}
#new_notification {
width: 400px;
}
.wspre {
white-space: pre;
}
.nowrap {
white-space: nowrap;
}