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

Issue #2508 Build - Front End of 'No Bounties' Placeholder on Gitcoin… #2530

Merged
merged 9 commits into from
Nov 5, 2018
10 changes: 10 additions & 0 deletions app/assets/v2/css/profile.css
Original file line number Diff line number Diff line change
Expand Up @@ -231,3 +231,13 @@
.profile-header__stats--funder .works_with_list img {
border: 0.1rem solid #FFCE08;
}

.no-profile-button {
background-color: #3E00FF;
color: #FFFFFF;
font-size: 0.875rem;
}

.no-profile-textcolor {
color: #666666;
}
1 change: 1 addition & 0 deletions app/assets/v2/images/IssueExplorer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/v2/images/Leaderboard.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/v2/images/Slack.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/dashboard/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2273,7 +2273,7 @@ def to_dict(self, activities=True, leaderboards=True, network=None, tips=True):
'works_with_collected': works_with_collected,
'works_with_funded': works_with_funded,
'funded_bounties_count': funded_bounties.count(),
'activities': [{'title': _('No data available.')}],
'activities': [],
'no_times_been_removed': no_times_been_removed,
'sum_eth_on_repos': sum_eth_on_repos,
'works_with_org': works_with_org,
Expand Down
67 changes: 67 additions & 0 deletions app/dashboard/templates/profiles/none.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{% comment %}
Copyright (C) 2018 Gitcoin Core

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
{% endcomment %}
{% load i18n static %}
<div class="row text-center my-4">
<div class="col-12">
<img width="240px" height="225px" src="{% static "v2/images/tree.png" %}"/>
</div>
<div class="col-12 no-profile-textcolor">
<p class="mb-0">{% trans 'Oops! Looks like this user has not participated in any bounty yet.' %}</p>
<p>{% trans 'In the meantime, here are some things you can do:' %}</p>
</div>
</div>
<div class="justify-content-center row mt-2 mb-2">
<div class="card offset-2 col-8 offset-md-0 col-md-6 col-lg-3 py-4 py-md-5 m-2 justify-content-center">
<div class="row justify-content-center">
<img class="m-1" src="{% static "v2/images/IssueExplorer.svg" %}" />
</div>
<div class="row m-2 text-center no-profile-textcolor font-subheader">
{% trans 'Start working on exciting bounties with the Issue Explorer' %}
</div>
<div class="row justify-content-center mt-auto">
<a class="btn btn-xs btn-success mt-3 mb-1 no-profile-button" href="{% url "explorer" %}">
{% trans 'Go to Issue Explorer' %}
</a>
</div>
</div>
<div class="card offset-2 col-8 offset-md-0 col-md-6 col-lg-3 py-4 py-md-5 m-2 justify-content-center">
<div class="row justify-content-center">
<img class="m-1" src="{% static "v2/images/Leaderboard.svg" %}" />
</div>
<div class="row text-center m-2 no-profile-textcolor font-subheader">
{% trans 'Looking for awesome contributors to work on your project?' %}
</div>
<div class="row justify-content-center mt-auto">
<a class="btn btn-xs btn-success mt-3 mb-1 no-profile-button" href="{% url "_leaderboard" %}">
{% trans 'Go to Leaderboard' %}
</a>
</div>
</div>
<div class="card offset-2 col-8 offset-md-0 col-md-6 col-lg-3 py-4 py-md-5 m-2 justify-content-center">
<div class="row justify-content-center">
<img class="m-1" src="{% static "v2/images/Slack.svg" %}" />
</div>
<div class="row m-2 text-center no-profile-textcolor font-subheader">
{% trans 'Have any questions or suggestions? Join our Slack channel!' %}
</div>
<div class="row justify-content-center mt-auto">
<a class="btn btn-xs btn-success mt-3 mb-1 no-profile-button" href="{% url "slack" %}">
{% trans 'Join our Slack' %}
</a>
</div>
</div>
</div>
20 changes: 11 additions & 9 deletions app/dashboard/templates/profiles/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<head>
{% include 'shared/head.html' %}
{% include 'shared/cards_pic.html' %}
<link rel="stylesheet" href={% static "v2/css/dashboard.css" %}>
<link rel="stylesheet" href={% static "v2/css/profile.css" %}>
<link rel="stylesheet" href={% static "v2/css/tag.css" %}>
<link rel="stylesheet" href={% static "v2/css/dashboard.css" %} />
<link rel="stylesheet" href={% static "v2/css/profile.css" %} />
<link rel="stylesheet" href={% static "v2/css/tag.css" %} />
<link rel="stylesheet" href="{% static "v2/css/kudos/styles.css" %}" />
<link rel="stylesheet" href={% static "v2/css/tabs.css" %}>
<link rel="stylesheet" href={% static "v2/css/tabs.css" %} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No syntactical reasoning for adding closures to link

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here for "void elements". I always thought every element needs closure, but apparently, not... My bad, sorry.

</head>
<body class="interior {{ active }} g-font-muli">
{% include 'shared/tag_manager_2.html' %}
Expand All @@ -19,7 +19,7 @@
<div class="row">
<div class="col-12 col-lg-4 profile-header__main-infos">
<div class="clearfix">
<img class="profile-header__avatar mb-1 mr-4" src="{% if profile.avatar and profile.avatar.avatar_url %}{{ profile.avatar.avatar_url }}{% else %}{{ profile.avatar_url }}{% endif %}">
<img class="profile-header__avatar mb-1 mr-4" src="{% if profile.avatar and profile.avatar.avatar_url %}{{ profile.avatar.avatar_url }}{% else %}{{ profile.avatar_url }}{% endif %}" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kuhnchris img tags don't require closure xD

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it depends, are we "just" HTML or XHTML? ;-)
But basically - you are correct.
https://www.w3.org/TR/html5/syntax.html#void-elements

<p class="profile-header__handle font-title">
{% if profile.data.name %}
{{ profile.data.name }}
Expand Down Expand Up @@ -80,7 +80,7 @@
{% endif %}
{% for profile, num_times in works_with_collected.items %}
<a href="{% url 'profile' profile %} ">
<img src='{% avatar_url profile %}' title="<div class='tooltip-info tooltip-xs'>{{ profile }}: {{ num_times }} times</div>">
<img src='{% avatar_url profile %}' title="<div class='tooltip-info tooltip-xs'>{{ profile }}: {{ num_times }} times</div>" />
</a>
{% endfor %}
{% endif %}
Expand Down Expand Up @@ -109,7 +109,7 @@
{% endif %}
{% for profile, num_times in works_with_funded.items %}
<a href="{% url 'profile' profile %} ">
<img src='{% avatar_url profile %}' title="<div class='tooltip-info tooltip-xs'>{{ profile }}: {{ num_times }} times</div>">
<img src='{% avatar_url profile %}' title="<div class='tooltip-info tooltip-xs'>{{ profile }}: {{ num_times }} times</div>" />
</a>
{% endfor %}
{% endif %}
Expand Down Expand Up @@ -232,7 +232,7 @@
{% for tip in tips %}
<div class="row result bounty_row {% if forloop.counter > 5 %}bounty_row--hidden{% endif %} {{ tip.network }}" {% if tip.github_url %}href="{{ tip.github_url }}"{% endif %}>
<div class="avatar-container col-1 justify-content-center special_tag hide_min_viewport">
<img src="{% url "avatar" %}?repo=https://github.com/{% if tip.from_username %}{{ tip.from_username }}{% else %}Self{%endif%}" class="avatar">
<img src="{% url "avatar" %}?repo=https://github.com/{% if tip.from_username %}{{ tip.from_username }}{% else %}Self{%endif%}" class="avatar" />
</div>
<div class="col-12 col-md-8 d-flex flex-column">
<div class="bounty-detail">
Expand Down Expand Up @@ -290,7 +290,9 @@
</div>
{% endfor %}
</div>
</div>
</div>
{% else %}
{% include 'profiles/none.html' %}
{% endif %}
{% endif %}
</div>
Expand Down