Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions newsletter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,25 @@ permalink: /newsletter.xml
{%- assign cfp_epoch = cfp | date: "%s" | plus: 0 -%}
{%- if cfp_epoch >= today and cfp_epoch <= horizon -%}
{%- assign idx = emitted | modulo: shuffled.size -%}
{%- assign tagline = shuffled[idx] %}
{%- assign tagline = shuffled[idx] -%}
{%- assign today_midnight = site.time | date: "%Y-%m-%d" | date: "%s" | plus: 0 -%}
{%- assign days_until = cfp_epoch | minus: today_midnight | divided_by: 86400 %}
<item>
<title>{{ conf.conference | xml_escape }} {{ conf.year }}</title>
<link>{{ site.url }}{{ site.baseurl }}/conference/{{ conf.conference | slugify: "latin" }}-{{ conf.year }}/</link>
<guid isPermaLink="false">{{ conf.conference | slugify: "latin" }}-{{ conf.year }}</guid>
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
<dc:creator>{{ site.title | xml_escape }}</dc:creator>
<category>{{ conf.sub }}</category>
<description><![CDATA[<p>&#128205; {{ conf.place | xml_escape }} &#183; &#128197; {% translate_file dates/pretty_dates.html start=conf.start end=conf.end %}</p>
<description><![CDATA[<p style="margin:0 0 10px 0;">
{%- if days_until <= 0 -%}<span style="background:#fecaca;color:#991b1b;padding:4px 12px;border-radius:999px;font-size:13px;font-weight:700;display:inline-block;">&#128680; Last day!</span>
{%- elsif days_until == 1 -%}<span style="background:#fed7aa;color:#9a3412;padding:4px 12px;border-radius:999px;font-size:13px;font-weight:700;display:inline-block;">&#128293; 1 day left</span>
{%- elsif days_until <= 3 -%}<span style="background:#fef3c7;color:#92400e;padding:4px 12px;border-radius:999px;font-size:13px;font-weight:700;display:inline-block;">&#9200; {{ days_until }} days left</span>
{%- elsif days_until <= 7 -%}<span style="background:#fef9c3;color:#854d0e;padding:4px 12px;border-radius:999px;font-size:13px;font-weight:700;display:inline-block;">&#9203; {{ days_until }} days left</span>
{%- else -%}<span style="background:#dbeafe;color:#1e40af;padding:4px 12px;border-radius:999px;font-size:13px;font-weight:700;display:inline-block;">&#128197; {{ days_until }} days</span>
{%- endif -%}
</p>
<p>&#128205; {{ conf.place | xml_escape }} &#183; &#128197; {% translate_file dates/pretty_dates.html start=conf.start end=conf.end %}</p>
<p>&#9997; CfP closes {% translate_file dates/pretty_dates.html start=cfp end=cfp %} &#8212; {{ tagline }}</p>]]></description>
</item>
{%- assign emitted = emitted | plus: 1 -%}
Expand Down