-
-
Notifications
You must be signed in to change notification settings - Fork 775
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add hackathon projects to profile (#5802)
- Loading branch information
1 parent
cc3dec8
commit 9e35a0d
Showing
4 changed files
with
118 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
{% load i18n static %} | ||
|
||
<style> | ||
|
||
.card-bg { | ||
padding: 1em; | ||
background-size: cover; | ||
} | ||
|
||
.project-grid { | ||
display: grid; | ||
grid-template-columns: repeat(1, 1fr); | ||
grid-gap: 5rem 3rem; | ||
} | ||
|
||
.card-project { | ||
/* padding: 2em; */ | ||
text-align: center; | ||
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); | ||
} | ||
|
||
.card-badge { | ||
right: 1em; | ||
top: 1em; | ||
filter: drop-shadow(0 0.3rem 0.2rem rgba(0,0,0,0.25)); | ||
width: 4em; | ||
} | ||
|
||
.card-project-logo { | ||
background-color: rgba(255, 255, 255, 0.30); | ||
object-fit: contain; | ||
} | ||
|
||
@media (min-width: 768px) { | ||
.project-grid { | ||
grid-template-columns: repeat(2, 1fr); | ||
} | ||
} | ||
|
||
@media (min-width: 992px) { | ||
.project-grid { | ||
grid-template-columns: repeat(2, 1fr); | ||
} | ||
} | ||
|
||
@media (min-width: 1200px) { | ||
.project-grid { | ||
grid-template-columns: repeat(3, 1fr); | ||
} | ||
} | ||
|
||
</style> | ||
<div class="project-grid"> | ||
|
||
{% for project in projects %} | ||
<div class="card card-project"> | ||
{% if project.badge %} | ||
<img class="position-absolute card-badge" width="50" src="{{project.badge}}" alt="badge" /> | ||
{% endif %} | ||
|
||
<div class="card-bg rounded-top" style="background-image: url({% firstof project.profiles.first.profile_wallpaper or '/static/wallpapers/burst-pink.png' %})"> | ||
{% if project.logo %} | ||
<img class="card-project-logo m-auto mw-100 rounded shadow" height="200" width="200" src="{{MEDIA_URL}}{{project.logo}}" alt="Hackathon logo" /> | ||
{% else %} | ||
<img class="card-project-logo m-auto mw-100 rounded shadow" height="200" width="200" src="{{ project.bounty.avatar_url }}" alt="{{project.bounty.org_name}}" /> | ||
{% endif %} | ||
</div> | ||
<div class="card-body"> | ||
<h5 class="card-title text-uppercase">{{ project.name }}</h5> | ||
<a href="{{project.work_url}}" target="_blank" class="font-weight-bold card-subtitle">Project Home</a> | ||
<div class="my-2"> | ||
<b class="text-muted">Project Summary</b> | ||
<p> | ||
{{project.summary | truncatechars:90}} | ||
</p> | ||
</div> | ||
<div class="mb-2"> | ||
<b class="text-muted">Team Members</b> | ||
<div class="mt-1"> | ||
{% for profile in project.profiles.all %} | ||
<a href="{% url 'profile' profile %}" class=""> | ||
<img src="{{profile.avatar_url}}" alt="{{profile}}" title="@{{profile}}" width="30" height="30" class="rounded-circle"> | ||
</a> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
<div class="mb-2"> | ||
<a href="{{project.bounty.url}}">Prize Bounty</a> | ||
</div> | ||
<div class="font-smaller-2"> | ||
<b class="text-muted">Sponsor</b> | ||
<img class="" width="20" src="{{ project.bounty.avatar_url }}" alt="{{project.bounty.org_name}}" /> | ||
<a href="{% url 'profile' project.bounty.org_name %}">{{project.bounty.org_name}}</a> | ||
</div> | ||
<div class="font-smaller-2"> | ||
<a href="{% url 'hackathon' project.bounty.event.slug %}" class="uppercase">{{project.bounty.event.name}}</a> | ||
</div> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters