Skip to content

Commit

Permalink
Merge pull request #784 from thelostone-mc/avatar
Browse files Browse the repository at this point in the history
bounty: fixed avatar url + tooltip style
  • Loading branch information
owocki authored Apr 6, 2018
2 parents 6d13c6a + cad1eee commit 3bae6a1
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 29 deletions.
31 changes: 23 additions & 8 deletions app/assets/v2/css/bounty.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,23 @@ body {
padding-bottom: 15px;
}

#avatar_url {
padding-top: 3em;
}

.bounty_details .avatar {
width: 50px;
height: 50px;
margin: 0px auto;
border-radius: 50px;
margin-top: 0px;
}

#avatar_url .avatar {
width: 80px;
height: 80px;
}

#status {
color: #00A55E;
text-transform: uppercase;
Expand Down Expand Up @@ -112,6 +129,7 @@ body {

#bounty_details .tags {
float: right;
text-align: center;
}

#bounty_details .tag {
Expand Down Expand Up @@ -259,14 +277,6 @@ a.btn {
font-size: 12px;
}

.bounty_details .avatar {
max-width: 50px;
max-height: 50px;
margin: 0px auto;
border-radius: 50px;
margin-top: 0px;
}

.started-status-column div {
display: inline-block;
margin: 5px;
Expand Down Expand Up @@ -324,6 +334,11 @@ a.btn {
}

@media (max-width: 767px) {

#title {
padding-top: 1em;
}

.bounty-actions {
display: block;
}
Expand Down
7 changes: 7 additions & 0 deletions app/assets/v2/js/pages/bounty_details.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ var link_ize = function(key, val, result) {
// rows in the 'about' page
var rows = [
'avatar_url',
'issuer_avatar_url',
'title',
'github_url',
'value_in_token',
Expand Down Expand Up @@ -86,6 +87,12 @@ var callbacks = {
'avatar_url': function(key, val, result) {
return [ 'avatar', '<a href="/profile/' + result['org_name'] + '"><img class=avatar src="' + val + '"></a>' ];
},
'issuer_avatar_url': function(key, val, result) {
var username = result['bounty_owner_github_username'] ? result['bounty_owner_github_username'] : 'Self';

return [ 'issuer_avatar_url', '<a href="/profile/' + result['bounty_owner_github_username'] +
'"><img class=avatar src="/funding/avatar?repo=https://github.com/' + username + '"></a>' ];
},
'status': function(key, val, result) {
var ui_status = val;

Expand Down
47 changes: 26 additions & 21 deletions app/dashboard/templates/bounty_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,28 +60,33 @@ <h6>{% trans "Be the OSS Funding you wish to see in the world." %}</h6>

<div class="col-12" id="bounty_details">
<div class="row font-body">
<div class="col-12">
<h4 id="title" class="font-title"></h4>
</div>
<div class="col-12">
<div id="status"></div>
<div class="d-none d-lg-block col-lg-1">
<div id="avatar_url"></div>
</div>
<div class="col-12 bounty-info">
<div>
<span class="bounty-info-heading">{% trans "Expires In" %} </span>
<span class="bounty-info-text" id="expires_date"></span>
</div>
<div>
<span class="bounty-info-heading">{% trans "Opened" %} </span>
<span class="bounty-info-text" id="web3_created"></span>
<div class="col-12 col-lg-11 pl-lg-4">
<div class="col-12">
<h4 id="title" class="font-title"></h4>
</div>
<div>
<span class="bounty-info-heading">{% trans "Experience Level" %} </span>
<span class="bounty-info-text" id="experience_level"></span>
<div class="col-12">
<div id="status"></div>
</div>
<div>
<span class="bounty-info-heading">{% trans "Issue Type" %} </span>
<span class="bounty-info-text" id="bounty_type"></span>
<div class="col-12 bounty-info">
<div>
<span class="bounty-info-heading">{% trans "Expires In" %} </span>
<span class="bounty-info-text" id="expires_date"></span>
</div>
<div>
<span class="bounty-info-heading">{% trans "Opened" %} </span>
<span class="bounty-info-text" id="web3_created"></span>
</div>
<div>
<span class="bounty-info-heading">{% trans "Experience Level" %} </span>
<span class="bounty-info-text" id="experience_level"></span>
</div>
<div>
<span class="bounty-info-heading">{% trans "Issue Type" %} </span>
<span class="bounty-info-text" id="bounty_type"></span>
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -142,7 +147,7 @@ <h5 class="bounty-heading">{% trans "All Activity" %}</h5>
<h5 class="bounty-heading">{% trans "Funder" %}</h5>
<div class="row box">
<div class="col-12 col-md-1 funder-avatar">
<div id="avatar_url"></div>
<div id="issuer_avatar_url"></div>
</div>
<div class="col-12 col-md-11">
<div id="bounty_owner_name" class="font-subheader"></div>
Expand Down Expand Up @@ -241,7 +246,7 @@ <h5 class="bounty-heading">{% trans "Funder" %}</h5>
</div>
[[if uninterest_possible]]
<div>
<span title="Remove this user's started work on the bounty">
<span title="<div class='tooltip-info tooltip-sm'>Remove this user's started work on the bounty</div>">
<a id="remove-[[:name]]" class="button button--primary" role="button" href="remove-handle">
<span class="font-smaller-4">Stop work</span>
</a>
Expand Down

0 comments on commit 3bae6a1

Please sign in to comment.