-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
contributors.html: Add bootstrap card design
This enhancement commit shows the contributor's data on [contributors](http://community.coala.io/contributors/) web-page in a bootstrap card design form. Closes #140
- Loading branch information
Showing
2 changed files
with
52 additions
and
21 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 |
---|---|---|
@@ -1,40 +1,46 @@ | ||
<!DOCTYPE html> | ||
{% load staticfiles %} | ||
<html lang="en"> | ||
<head> | ||
<!-- Required meta tags --> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<!-- Bootstrap CSS --> | ||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> | ||
<link href="{% static 'main.css' %}" rel="stylesheet"> | ||
<title>Contributors Data</title> | ||
</head> | ||
<body> | ||
<h1>Details of all the contributors</h1> | ||
<ul> | ||
{% for contributor in contributors %} | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-sm-6 col-md-4"> | ||
<div class="thumbnail"> | ||
<div class="caption"> | ||
<p>login: {{ contributor.login }}</p> | ||
<p>name: {{ contributor.name }}</p> | ||
<p>bio: {{ contributor.bio }}</p> | ||
<p>num_commits: {{ contributor.num_commits }}</p> | ||
<p>reviews: {{ contributor.reviews }}</p> | ||
<p>issues_opened: {{ contributor.issues_opened }}</p> | ||
<p>teams: | ||
{% for team in contributor.teams.all %} | ||
{{ team.name }} | ||
{% endfor %}{# for team in contributor.teams.all #} | ||
</p> | ||
</div> | ||
</div> | ||
<div class="contributors"> | ||
{% for contributor in contributors %} | ||
<div class="card contributor-data"> | ||
<img class="card-img-top contributor-image" | ||
src="//avatars.githubusercontent.com/{{ contributor.login }}" | ||
alt="Profile picture"> | ||
<div class="card-body"> | ||
<h5 class="card-title"> | ||
{% if contributor.name %} | ||
{{ contributor.name }} | ||
{% else %} | ||
{{ contributor.login }} | ||
{% endif %}{# if contributor.name #} | ||
<span class="github-icon"> | ||
<a href="//github.com/{{ contributor.login }}" target="_blank"> | ||
<i class="fa fa-github icon"></i> | ||
</a> | ||
</span> | ||
</h5> | ||
<p class="card-text">Bio: {{ contributor.bio }}</p> | ||
<p class="card-text">Commits: {{ contributor.num_commits }}</p> | ||
<p class="card-text">Reiviews: {{ contributor.reviews }}</p> | ||
<p class="card-text">Issues Opened: {{ contributor.issues_opened }}</p> | ||
</div> | ||
</div> | ||
{% endfor %}{# for contributor in contributors #} | ||
</div> | ||
<hr> | ||
{% endfor %}{# for contributor in contributors #} | ||
</ul> | ||
</body> | ||
</html> |