Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add byline and rearrange templates data [CPCN-674][CPCN-531] #168

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
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: 8 additions & 6 deletions server/theme/email_item.fr_ca.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<h1>{{ get_highlighted_field(item, ["headline"]) | safe }}</h1>

<p style="font-size: 0.875rem; font-weight: 400; line-height: 1.3; font-family: 'Lato', sans-serif; color: #444;">
<span style="font-weight: 600;">Voir cet élément dans votre compte: </span><a href="{{ url_for_wire(item, True, section) }}">{{ url_for_wire(item, True, section) }}</a><br />
{% if topic_name %}<span style="font-weight: 600;">Nouvel élément pour votre sujet suivi: </span>{{ topic_name }}<br />{% endif %}
{% if item.service %}<span style="font-weight: 600;">Catégorie: </span>{{ item.service[0].name }}<br />{% endif %}
<span style="font-weight: 600;">Nombre de mots: </span>{{ item.wordcount }}<br />
</p>

<p style="font-size: 0.875rem; font-weight: 400; line-height: 1.3; font-family: 'Lato', sans-serif; color: #444;">
{% if item.slugline %}<span style="font-weight: 600;">Titre de rappel: </span>{{ get_highlighted_field(item, ["slugline"]) | safe }}<br />{% endif %}
{% if item.source %}<span style="font-weight: 600;">Source: </span>{{ item.source }}<br />{% endif %}
<span style="font-weight: 600;">Publié: </span>{{ item.versioncreated | datetime_long }}<br />
{% if item.byline %}<span style="font-weight: 600;">{{ item.byline }}</span>{% endif %}
</p>

<div style="font-size: 0.9375rem; font-weight: 400; line-height: 1.55; font-family: 'Lato', sans-serif; color: #333">
{% if item.body_html %}{{ get_highlighted_field(item, ["body_html"]) | safe }}{% elif item.body_txt %}<pre>{{ item.body_txt }}</pre>{% endif %}
</div>

<p style="font-size: 0.875rem; font-weight: 400; line-height: 1.3; font-family: 'Lato', sans-serif; color: #444;">
<span style="font-weight: 600;">Nombre de mots: </span>{{ item.wordcount }}<br />
{% if item.service %}<span style="font-weight: 600;">Catégorie: </span>{{ item.service[0].name }}<br />{% endif %}
{% if topic_name %}<span style="font-weight: 600;">Nouvel élément pour votre sujet suivi: </span>{{ topic_name }}<br />{% endif %}
<span style="font-weight: 600;">Voir cet élément dans votre compte: </span><a href="{{ url_for_wire(item, True, section) }}">{{ url_for_wire(item, True, section) }}</a><br />
</p>
11 changes: 6 additions & 5 deletions server/theme/email_item.fr_ca.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{{ item.headline }}
Voir cet élément dans votre compte: {{ url_for_wire(item, True, section) }}
{% if topic_name %}Nouvel élément pour votre sujet suivi: {{ topic_name }}{% endif %}
{% if item.service %}Catégorie: {{ item.service[0].name }}{% endif %}
Nombre de mots: {{ item.wordcount }}

{% if item.slugline %}Titre de rappel: {{ item.slugline }}{% endif %}
{% if item.source %}Source: {{ item.source }}{% endif %}
Publié: {{ item.versioncreated | datetime_long }}

{% if item.body_txt %}{{ item.body_txt }}{% elif item.body_html %}{{ item.body_html | plain_text }}{% endif %}
{% if item.byline %}{{ item.byline }}{% endif %}

Nombre de mots: {{ item.wordcount }}
{% if item.service %}Catégorie: {{ item.service[0].name }}{% endif %}
{% if topic_name %}Nouvel élément pour votre sujet suivi: {{ topic_name }}{% endif %}
Voir cet élément dans votre compte: {{ url_for_wire(item, True, section) }}
{% if item.body_txt %}{{ item.body_txt }}{% elif item.body_html %}{{ item.body_html | plain_text }}{% endif %}
14 changes: 8 additions & 6 deletions server/theme/email_item.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
<h1 style="font-size: 1.5rem; font-weight: 700; line-height: 1.4; font-family: 'Titilium Web', sans-serif; color: #333;">
{{ get_highlighted_field(item, ["headline"]) | safe }}
</h1>
<p style="font-size: 0.875rem; font-weight: 400; line-height: 1.3; font-family: 'Lato', sans-serif; color: #444;">
<span style="font-weight: 600;">View this item in your account: </span><a href="{{ url_for_wire(item, True, section) }}">{{ url_for_wire(item, True, section) }}</a>
{% if topic_name %}<span style="font-weight: 600;">New item for followed topic: </span>{{ topic_name }}<br />{% endif %}
{% if item.service %}<span style="font-weight: 600;">Category: </span>{{ item.service[0].name }}<br />{% endif %}
<span style="font-weight: 600;">Word count: </span>{{ item.wordcount }}<br />
<br />
</p>

<p style="font-size: 0.875rem; font-weight: 400; line-height: 1.3; font-family: 'Lato', sans-serif; color: #444;">
{% if item.slugline %}<span style="font-weight: 600;">Slugline: </span>{{ get_highlighted_field(item, ["slugline"]) | safe }}<br />{% endif %}
{% if item.source %}<span style="font-weight: 600;">Source: </span>{{ item.source }}<br />{% endif %}
<span style="font-weight: 600;">Published: </span>{{ item.versioncreated | datetime_long }}<br />
{% if item.byline %}<span style="font-weight: 600;">{{ item.byline }}</span>{% endif %}
</p>

<div style="font-size: 0.9375rem; font-weight: 400; line-height: 1.55; font-family: 'Lato', sans-serif; color: #333">
{% if item.body_html %}{{ get_highlighted_field(item, ["body_html"]) | safe }}{% elif item.body_txt %}<pre>{{ item.body_txt }}</pre>{% endif %}
</div>

<p style="font-size: 0.875rem; font-weight: 400; line-height: 1.3; font-family: 'Lato', sans-serif; color: #444;">
<span style="font-weight: 600;">Word count: </span>{{ item.wordcount }}<br />
{% if item.service %}<span style="font-weight: 600;">Category: </span>{{ item.service[0].name }}<br />{% endif %}
{% if topic_name %}<span style="font-weight: 600;">New item for followed topic: </span>{{ topic_name }}<br />{% endif %}
<span style="font-weight: 600;">View this item in your account: </span><a href="{{ url_for_wire(item, True, section) }}">{{ url_for_wire(item, True, section) }}</a><br />
</p>
11 changes: 6 additions & 5 deletions server/theme/email_item.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{{ item.headline }}
View this item in your account: {{ url_for_wire(item, True, section) }}
{% if topic_name %}New item for followed topic: {{ topic_name }}{% endif %}
{% if item.service %}Category: {{ item.service[0].name }}{% endif %}
Word count: {{ item.wordcount }}

{% if item.slugline %}Slugline: {{ item.slugline }}{% endif %}
{% if item.source %}Source: {{ item.source }}{% endif %}
Published: {{ item.versioncreated | datetime_long }}

{% if item.body_txt %}{{ item.body_txt }}{% elif item.body_html %}{{ item.body_html | plain_text }}{% endif %}
{% if item.byline %}{{ item.byline }}{% endif %}

Word count: {{ item.wordcount }}
{% if item.service %}Category: {{ item.service[0].name }}{% endif %}
{% if topic_name %}New item for followed topic: {{ topic_name }}{% endif %}
View this item in your account: {{ url_for_wire(item, True, section) }}
{% if item.body_txt %}{{ item.body_txt }}{% elif item.body_html %}{{ item.body_html | plain_text }}{% endif %}
Loading