first commit

This commit is contained in:
vanalmsick 2025-09-27 18:19:06 +01:00
commit e7f627801f
152 changed files with 35352 additions and 0 deletions

View file

@ -0,0 +1,146 @@
<mjml>
<!-- Written with https://mjml.io/ -->
<mj-head>
<mj-preview>The "{{ competition.name }}" competition kicks off tomorrow! Give it a strong start, build momentum your best is waiting! But first, here's how the goals work and how to earn points.</mj-preview>
<mj-attributes>
<mj-text line-height="1.2" />
</mj-attributes>
</mj-head>
<mj-body background-color="#E1E8ED">
<mj-hero mode="fixed-height" height="200px" background-url="{{ MAIN_HOST }}/running_email.jpg" background-size="cover" background-repeat="no-repeat" background-color="#075985">
<mj-text align="center" font-size="30px" color="#ffffff" padding-bottom="10px" padding-top="45px" css-class="no-invert">
Workout Challenge
</mj-text>
<mj-button background-color="#075985" color="#fff" border-radius="24px" border="1px solid #fff" href="{{ MAIN_HOST }}/login" font-family="Helvetica, Arial, sans-serif" padding="10px 25px">
LOGIN
</mj-button>
</mj-hero>
<mj-section padding-top="0px" padding-bottom="0px" background-color="white">
<mj-column padding-bottom="0px">
<mj-text padding-bottom="0px">
<p>Hi {{ first_name }},</p>
<p>The "{{ competition.name }}" competition kicks off tomorrow!</p>
<p>Give it a strong start, build momentum your best is waiting!</p>
<p>But first, here's how the goals work and how to earn points.</p>
</mj-text>
<mj-divider border-color="#E1E8ED" border-width="2px"></mj-divider>
</mj-column>
</mj-section>
<mj-section background-color="white" padding-top="5px">
<mj-column padding-top="0px">
<mj-text padding-top="10px" padding-bottom="15px">
<h3>How to earn activity points?</h3>
<ul>
<li>Each competition has its own activity goals.</li>
<li>You earn <b>1 point for every 1%</b> progress toward a goal.</li>
<li>For example, if the goal is 100 minutes of exercise and you work out 50 minutes, you earn 50 points.</li>
<li><i>Note:</i> Some goals have <b>minimum or maximum limits</b>. Activities above/below these limits wont earn you points and are marked with an asterisk (*).</li>
<li>Hover over a goal to view its limits, or over the asterisk for more details.</li>
</ul>
</mj-text>
</mj-column>
<mj-column>
<mj-raw>
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="" width="100%">
<tbody>
<tr>
<td align="left" style="font-size:0px;padding:10px 25px;padding-bottom:0px;word-break:break-word;">
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1.2;text-align:left;color:#000000;">
<h3>Activity Goals:</h3>
</div>
</td>
</tr>
<tr>
<td align="left" style="font-size:0px;padding:10px 25px;padding-top:0px;word-break:break-word;">
{% for goal in goals %}
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td style="height:10px; font-size:0; line-height:0;">&nbsp;</td>
</tr>
<tr>
<td style="background-color:#f9f9f9; border-radius:8px; padding:18px;">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td style="font-size:14px; line-height:16px; mso-line-height-rule:exactly; font-weight:bold; color: #6b7280;">{{ goal.name }}</td>
<td align="right" style="font-size:14px; line-height:16px; mso-line-height-rule:exactly; color: #6b7280;">{{ goal.goal|floatformat:0 }} {{ goal.metric }} <span style="font-size:10px;">/ {{ goal.period }}</span></td>
</tr>
<tr>
<td colspan="2" height="12" style="padding-top:8px; line-height:0; font-size:0;">
<!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" arcsize="50%" strokecolor="#e5e5e5" strokeweight="1px" style="width:250%;height:12px;" fillcolor="#e5e5e5">
<v:fill color="#e5e5e5" />
</v:roundrect>
<![endif]-->
<!--[if !mso]><!-- -->
<div style="background:#e5e5e5; border-radius:4px; width:100%; height:12px;">
</div>
<!--<![endif]-->
</td>
</tr>
{% if goal.min_per_workout > 0 or goal.max_per_workout > 0 or goal.min_per_day > 0 or goal.max_per_day > 0 or goal.min_per_week > 0 or goal.max_per_week > 0 %}
<tr>
<td style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1.2;text-align:left;color:#6b7280;padding-top: 7px;" colspan="2"><b>Limits:</b>
<ul style="margin: 0px;">
{% if goal.min_per_workout > 0 %}<li>min <b>{{ goal.min_per_workout|floatformat:0 }} {{ goal.metric }}</b> <span style="font-size:10px">/ workout</span></li>{% endif %}
{% if goal.max_per_workout > 0 %}<li>max <b>{{ goal.max_per_workout|floatformat:0 }} {{ goal.metric }}</b> <span style="font-size:10px">/ workout</span></li>{% endif %}
{% if goal.min_per_day > 0 %}<li>min <b>{{ goal.min_per_day|floatformat:0 }} {{ goal.metric }}</b> <span style="font-size:10px">/ day</span></li>{% endif %}
{% if goal.max_per_day > 0 %}<li>max <b>{{ goal.max_per_day|floatformat:0 }} {{ goal.metric }}</b> <span style="font-size:10px">/ day</span></li>{% endif %}
{% if goal.min_per_week > 0 %}<li>min <b>{{ goal.min_per_week|floatformat:0 }} {{ goal.metric }}</b> <span style="font-size:10px">/ week</span></li>{% endif %}
{% if goal.max_per_week > 0 %}<li>max <b>{{ goal.max_per_week|floatformat:0 }} {{ goal.metric }}</b> <span style="font-size:10px">/ week</span></li>{% endif %}
</ul>
</td>
</tr>
{% endif %}
</table>
</td>
</tr>
</table>
{% endfor %}
</td>
</tr>
</tbody>
</table>
</mj-raw>
</mj-column>
</mj-section>
<mj-raw> {% if goal_equalizer_note %} </mj-raw>
<!-- Goal Equalizer -->
<mj-section background-color="#075985" vertical-align="middle">
<mj-column width="100%" vertical-align="middle">
<mj-text align="center" color="#ffffff" font-size="18px" padding-bottom="10px" padding-top="20px">Make it fair by enabling the Goal Equalizer!</mj-text>
<mj-divider border-color="#fff" border-style="solid" border-width="1px" padding-left="100px" padding-right="100px" padding-bottom="20px"></mj-divider>
<mj-text align="center" color="#e5e7eb" font-size="11px" padding-bottom="25px" padding-top="0px">Everyone has a unique <b>Basal Metabolic Rate (BMR)</b>, dependent on factors like age, gender, height, and weight. The default goals are calibrated for a 35y/o 1.8m tall man. To ensure a fair competition, login and personalise your goals using the "Goal Equalizer" right below your personal settings.</mj-text>
</mj-column>
</mj-section>
<mj-raw> {% endif %} </mj-raw>
<!-- Final remarks -->
<mj-section padding-top="0px" padding-bottom="0px" background-color="white">
<mj-column>
<mj-raw> {% if goal_equalizer_note is None %} </mj-raw>
<mj-divider border-color="#E1E8ED" border-width="2px"></mj-divider>
<mj-raw> {% endif %} </mj-raw>
<mj-text padding-top="20px">Login to see who else is participating, change your team, and adjust the goal equalizers:</mj-text>
<mj-button align="center" background-color="#075985" color="#ffffff" border-radius="24px" href="{{ MAIN_HOST }}/login" font-family="Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif" padding-bottom="2px" padding-top="5px">LOGIN</mj-button>
<mj-text padding-bottom="10px" padding-top="0px">
<p>Enjoy the Competition.</p>
<p>Good luck!</p>
</mj-text>
</mj-column>
</mj-section>
<!-- Footnote -->
<mj-section full-width="full-width">
<mj-column width="100%" vertical-align="middle">
<mj-text align="center" color="#9a9ea6" font-size="11px" padding-bottom="0px" padding-top="0">
<span class="apple-link">Workout Challenge</span>
<br> Any issues? <a href="mailto:{{ EMAIL_REPLY_TO }}">Send us an Email</a>. <br> See the <a href="https://github.com/vanalmsick/workout_challenge">Source Code</a>.
</mj-text>
</mj-column>
</mj-section>
</mj-body>
</mjml>