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

Fixes weekly email #6534

Merged
merged 13 commits into from
May 1, 2020
4 changes: 3 additions & 1 deletion app/retail/templates/emails/bounty.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
</style>

<div class="text-center bounty-box">
<li style="list-style:none;">
<ul>
<li style="list-style:none; margin-left: 0;">
{% if bounty.avatar_url %}
<img style="border-radius: 20px; display: block; margin-left: auto; margin-right: auto; margin-bottom: 0.5em" src="{{ bounty.avatar_url }}" width=50px height=50px>
<a style="font-weight: bold; text-decoration: none;" href="{% url "profile" highlight.who %}">{{ bounty.org_name }}</a>
Expand All @@ -67,6 +68,7 @@
{% endif %}
</p>
</li>
</ul>

{% if not small %}
{% if bounty.keywords %}
Expand Down
37 changes: 18 additions & 19 deletions app/retail/templates/emails/bounty_roundup.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@
{% load i18n static humanize avatar_tags kudos_extras %}
{% block content %}
<style>
.roundup {
padding-top: 0.5em;
padding-bottom: 0.5em;
padding-left: 2em;
padding-right: 2em;
line-height: 20px;
}
.intro li{
margin-top: 15px;
margin-bottom: 15px;
Expand Down Expand Up @@ -54,8 +47,6 @@
}
.regards img{
border-radius: 50%;
height: 5%;
width: 5%;
vertical-align: middle;
}

Expand Down Expand Up @@ -88,8 +79,10 @@ <h1 class="text-centre">{% trans "The Gitcoin Weekly" %}</h1>
<div class='intro text-left'>
{{ intro|safe }}
{% if sponsor %}
<div style="padding:20px 0; background-color: #f2f6f9; text-align: center; width: 100vw; margin-left: calc(-50vw + 50%)">
<div style="max-width: 60vw; margin-left: auto; margin-right: auto;">
</div>
</div>
<div class="full-width text-center" style="padding:20px 0; background-color: #f2f6f9; text-align: center; margin: 0 auto;">
<div class="sponsor-text" style="margin-left: auto; margin-right: auto;">
<p style=" color: #000000;">Sponsored by <a href="{{ sponsor.link }}" style=" color: #3E00FF;">{{ sponsor.name }}</a></p>
<a href="{{ sponsor.link }}" style="text-align: center; color: #000000; font-weight: bold; font-size: 16px; display: block; text-decoration: none; line-height: 19px;">{{ sponsor.title }}</a>
{% for paragraph in sponsor.body %}
Expand All @@ -107,13 +100,16 @@ <h1 class="text-centre">{% trans "The Gitcoin Weekly" %}</h1>

</div>

<div class="primary-content text-center" style="padding-top: 0">

{% if highlights %}
<h3>{% trans "✨Last Week's Highlights" %}</h3>
<h5>{% trans "Community Members growing open source" %}</h5>

<div style="text-align: center;">
<ul>
{% for highlight in highlights %}
<li style="list-style:none;">
<li style="list-style:none; margin-left: 0; margin-top: 2.5em">
{% if highlight.who_link %}
<img style="border-radius: 20px; vertical-align: middle;" src="{% avatar_url highlight.who%}" width=30px height=30px>
<a style="font-weight: bold; text-decoration: none;" href="{% url "profile" highlight.who %}">{{ highlight.who }}</a>
Expand All @@ -126,6 +122,7 @@ <h5>{% trans "Community Members growing open source" %}</h5>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
<br>
<br>
Expand All @@ -141,7 +138,7 @@ <h5>{% trans "Grow Open Source &amp; Make Some ETH" %}</h5>
{% include 'emails/bounty.html' with bounty=bounty.obj small=1 primer=bounty.primer %}
{% endfor %}

<div class="text-center" style="width: 75%; margin-left: auto; margin-right: auto;">
<div class="text-center" style="margin-left: auto; margin-right: auto;">
<p style="margin-top: 3em;">{% trans "Don't see anything above that strikes your fancy? There are more issues in the Gitcoin Issue Explorer:" %}</p>

<div style="margin-bottom: 2em; margin-top: 1.5em;">
Expand All @@ -150,7 +147,8 @@ <h5>{% trans "Grow Open Source &amp; Make Some ETH" %}</h5>
</div>

{% if leaderboard %}
<div style="background-color: #000000; color: #ffffff; width: 110%; margin-left: -5%; padding-top: 15px; padding-bottom:15px">
</div>
<div class="full-width text-center" style="background-color: #000000; color: #ffffff; margin: 0 auto; padding-top: 15px; padding-bottom:15px">
<h3 style="color: #ffffff;">{% trans "🏆Who's leading the Leaderboard?" %}</h3>
<h5 style="color: #ffffff;">{% trans "See the top Gitcoin Network Members For the last 90 Days" %}</h5>

Expand All @@ -160,7 +158,7 @@ <h5 style="color: #ffffff;">{% trans "See the top Gitcoin Network Members For th
<h4 style="text-align: left; margin-bottom: 10px; margin-left: 1em;">{{ package.title }}</h4>
<ul>
{% for leaderboard_item in package.items %}
<li style="font-size: 0.93em; list-style:none; margin-top: 10px; margin-bottom: 10px; text-align: start;">
<li style="font-size: 0.93em; list-style:none; margin-top: 10px; margin-left: 20px; margin-bottom: 10px; text-align: start;">
{{ leaderboard_item.rank }} <img style="border-radius: 20px; vertical-align: middle; margin: 0 7px" src="{% avatar_url leaderboard_item.profile %}" width=25px height=25px>
<a style="font-size: 0.99em; font-weight: bold; text-decoration: none;" href="{% url "profile" leaderboard_item.github_username %}">{{ leaderboard_item.github_username }}</a> : ${{ leaderboard_item.amount|floatformat:2 }}
</li>
Expand All @@ -178,14 +176,15 @@ <h4 style="text-align: left; margin-bottom: 10px; margin-left: 1em;">{{ package.
{% endif %}

{% if kudos_highlights %}
<div style="background-color: #F7F5FF; width: 110%; margin-left: -5%; padding-top:10px; padding-bottom: 15px;">
<h3>{% trans "♥️Kudos" %}</h3>
</div>
<div class="full-width text-center" style="background-color: #F7F5FF; margin: 0 auto; padding-top:10px; padding-bottom: 15px;">
<h3>{% trans "❤️Kudos" %}</h3>
<h5>{% trans "Recognition throughout the platform" %}</h5>
<div>
<ul style="padding-left: 20px; margin-left: 2vw;">
<ul class="kudos_highlights_items" style="padding: 0 0 0 5%;">
{% for kudos in kudos_highlights %}
{% if kudos.recipient_profile and kudos.sender_profile %}
<li style="background-color: #ffffff; list-style:none; margin: 5px; padding: 10px 20px; min-height: 170px; display: inline-block; float:left; border: 1px solid #ffffff; border-radius: 3px; width: 125px;">
<li class="kudos_transfer" style="background-color: #ffffff; list-style:none; margin-top: 0; margin-right: 10px; margin-left: 0; padding: 10px 20px; display: inline-block; float:left; border: 1px solid #ffffff; border-radius: 3px; width: 125px;">
<a style="font-size: 14px; font-weight: bold; text-decoration: none;" href="{% url "profile" kudos.recipient_profile.handle %}">{{ kudos.recipient_profile.handle }}</a> received <strong>{{ kudos.kudos_token_cloned_from.name|humanize_name }}</strong> from <a style="font-weight: bold; text-decoration: none;" href="{% url 'profile' kudos.sender_profile.handle %}">{{ kudos.sender_profile.handle }}</a><br>
<a href="{% url 'kudos_details' kudos.kudos_token_cloned_from.pk kudos.kudos_token_cloned_from.name %}">

Expand Down
59 changes: 56 additions & 3 deletions app/retail/templates/emails/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
body {
margin: 0px;
padding: 0px;
font-family: 'Roboto', sans-serif;
font-family: 'Roboto', Arial, sans-serif;
}

.rounded {
Expand Down Expand Up @@ -136,7 +136,7 @@
line-height: 1.5;
text-align: center;
text-decoration: none;
font-family: 'Muli';
font-family: 'Muli', Arial, sans-serif;
}

#logo {
Expand Down Expand Up @@ -214,6 +214,10 @@
text-align: center;
}

#preferred_payout a {
font-size: 1em;
}

#footer p {
color: #ccc;
}
Expand Down Expand Up @@ -252,7 +256,13 @@
padding: 2em;
background-color: white;
overflow: hidden;
padding-bottom: 0;
padding-bottom: 20px;
}

.roundup {
padding-top: 0.5em;
padding-bottom: 0.5em;
line-height: 20px;
}

@media screen and (min-width: 35.5em) {
Expand All @@ -274,13 +284,56 @@
max-height: 45px;
max-width: 45px;
}

.full-width {
width: 100%;
}

.kudos_transfer {
min-height: 320px;
}

.roundup {
padding-left: 0.5em;
padding-right: 0.5em;
}
.sponsor-text {
max-width: 80vw;
}
.regards img {
height: 20%;
width: 20%;
}
.kudos_highlights_items {
margin: 2em 0;
}
}

@media screen and (min-width: 48em) {
.primary-content {
margin-left: 10%;
margin-right: 10%;
}
.full-width {
width: 80%;
}
.kudos_transfer {
min-height: 280px;
}
.roundup {
padding-left: 2em;
padding-right: 2em;
}
.sponsor-text {
max-width: 60vw;
}
.regards img {
height: 10%;
width: 10%;
}
.kudos_highlights_items {
margin: 2em;
}
}

@media screen and (max-width: 48em) {
Expand Down