diff --git a/app/assets/v2/css/grants/profile.css b/app/assets/v2/css/grants/profile.css index f6bf3e49008..dec740434e4 100644 --- a/app/assets/v2/css/grants/profile.css +++ b/app/assets/v2/css/grants/profile.css @@ -1,4 +1,28 @@ .header-line { color: #fff; font-style: normal; +} + +h2.title { + border-bottom: 1px solid #D0D0D0; +} + +.avatar { + max-width: 3.125rem; + max-height: 3.125rem; + margin-right: auto; + margin-left: auto; +} + +.transaction-history:hover { + background-color: #F9F9F9; +} + +.grants-container .info { + color: #9B9B9B; +} + +.grants-container .txn-link a { + color: #7F8FA4; + text-decoration: none; } \ No newline at end of file diff --git a/app/assets/v2/css/tag.css b/app/assets/v2/css/tag.css index 211a3b7013c..5f8d1dcd4ba 100644 --- a/app/assets/v2/css/tag.css +++ b/app/assets/v2/css/tag.css @@ -9,6 +9,10 @@ cursor: pointer; } +.tag-lg { + padding: 6px 16px; +} + .tag p { margin-bottom: 1px; } diff --git a/app/grants/templates/grants/profile.html b/app/grants/templates/grants/profile.html index 7f3ac57fe83..9ca53c3fdd1 100644 --- a/app/grants/templates/grants/profile.html +++ b/app/grants/templates/grants/profile.html @@ -20,7 +20,9 @@ {% include 'shared/head.html' %} {% include 'shared/cards.html' %} + + @@ -41,7 +43,7 @@
- {% include 'grants/profile_body.html' with grants=grants %} + {% include 'grants/profile_body.html' with grants=grants history=history %}
@@ -50,7 +52,7 @@
- {% include 'grants/profile_body.html' with grants=grants %} + {% include 'grants/profile_body.html' with grants=grants history=history %}
diff --git a/app/grants/templates/grants/profile_body.html b/app/grants/templates/grants/profile_body.html index 187aabf5a8d..38ade4a6ac6 100644 --- a/app/grants/templates/grants/profile_body.html +++ b/app/grants/templates/grants/profile_body.html @@ -17,13 +17,53 @@ {% load static i18n %} {% if grants %} -
- {% for grant in grants %} - {% if forloop.counter0|divisibleby:3 %}
{% endif %} -
- {% include 'grants/card.html' %} -
- {% if forloop.counter|divisibleby:3 or forloop.last %}
{% endif %} - {% endfor %} -
+
+ {% for grant in grants %} + {% if forloop.counter0|divisibleby:3 %}
{% endif %} +
+ {% include 'grants/card.html' %} +
+ {% if forloop.counter|divisibleby:3 or forloop.last %}
{% endif %} + {% endfor %} +

{% trans "Transaction History" %}

+ {% for transaction in history %} +
+
+ {{ transaction.date }} +
+
+ +
+
+
+ {{ transaction.title }} +
+
+ {{ transaction.value_true }} {{ transaction.token_name }} / {{ transaction.frequency }} +
+
+ +
+
+

+ {{ transaction.value_true }} + {{ transaction.token_name }} +

+
+ {% if transaction.value_in_usdt_now %} +
+

+ {{ transaction.value_in_usdt_now }} + USD +

+
+ {% endif %} +
+
+ {% endfor %} +
{% endif %} \ No newline at end of file diff --git a/app/grants/views.py b/app/grants/views.py index 71a912a0f44..2590bdae349 100644 --- a/app/grants/views.py +++ b/app/grants/views.py @@ -225,10 +225,35 @@ def profile(request): """Show grants profile of logged in user.""" # profile = request.user.profile if request.user.is_authenticated else None grants = Grant.objects.all() # TODO: show only logged in users grants + + history = [ + { + 'date': '16 Mar', + 'value_true': 1.0, + 'token_name': 'ETH', + 'frequency': 'days', + 'value_in_usdt_now': 80, + 'title': 'Lorem ipsum dolor sit amet', + 'link': 'https://etherscan.io/txs?a=0xcf267ea3f1ebae3c29fea0a3253f94f3122c2199&f=3', + 'avatar_url': 'https://c.gitcoin.co/avatars/57e79c0ae763bb27095f6b265a1a8bf3/thelostone-mc.svg' + }, + { + 'date': '24 April', + 'value_true': 90, + 'token_name': 'DAI', + 'frequency': 'months', + 'value_in_usdt_now': 90, + 'title': 'Lorem ipsum dolor sit amet', + 'link': 'https://etherscan.io/txs?a=0xcf267ea3f1ebae3c29fea0a3253f94f3122c2199&f=3', + 'avatar_url': 'https://c.gitcoin.co/avatars/57e79c0ae763bb27095f6b265a1a8bf3/thelostone-mc.svg' + } + ] + params = { 'active': 'profile', 'title': _('My Grants'), - 'grants': grants + 'grants': grants, + 'history': history } return TemplateResponse(request, 'grants/profile.html', params)