diff --git a/www/conservancy/templates/news/pressrelease_partial.html b/www/conservancy/templates/news/pressrelease_partial.html new file mode 100644 index 0000000000000000000000000000000000000000..dc0fb6877e242df693da2cc984b0ce57803c9775 --- /dev/null +++ b/www/conservancy/templates/news/pressrelease_partial.html @@ -0,0 +1,49 @@ +{% comment %} + +This partial requires these parameters: + +* `pressr`: The PressRelease object to render. + +This partial accepts these optional parameters: + +* `show`: How much of the PressRelease to render. Accepted values are + "headline", "dateline", "subhead", "summary", and "body". + Every value will render the parts listed before it. Default "body". +* `htag`: Name of the HTML tag to render the pressr headline. + If you're passing show="subhead" or a greater detail level, this + must be a headline tag h1 through h5, inclusive. Default "h3". + +{% endcomment %} + +
+ +<{{ htag|default:"h3" }} class="clear" + >{% if show|default:"body" != "body" %}{% endif %}{{ pressr.headline|safe }}{% if show|default:"body" != "body" %}{% endif %} + +{% if show != "headline" %} +{% if show != "dateline" and pressr.subhead %} + {# This filter sequence generates the "next" hN tag from htag #} + {{ pressr.subhead|safe }} +{% endif %} + +

{{ pressr.pub_date|date:"F j, Y" }}

+ +{% if show != "dateline" and show != "subhead" %} + {% if pressr.summary %} + {{ pressr.summary|safe }} + {% endif %} + + {% if pressr.body %} + {% if show == "summary" %} +

Read More…

+ {% else %} + {{ pressr.body|safe }} + {% endif %} + {% endif %} +{% endif %} + +{% endif %}{# show != "headline" #} + +