forked from coala/community
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
community/: Add web-page displaying mentors
The web-page displays all the mentors of the upcoming summer/winter program or of previous year, if no mentors are being found for upcoming program Closes coala#271
- Loading branch information
Showing
8 changed files
with
211 additions
and
3 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
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,23 @@ | ||
# Generated by Django 2.1.7 on 2019-08-02 14:29 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('data', '0010_unassignedissuesactivity'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Mentor', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('username', models.CharField(max_length=100)), | ||
('name', models.CharField(max_length=100)), | ||
('year', models.SmallIntegerField(verbose_name='Mentoring year')), | ||
('program', models.CharField(max_length=20, verbose_name='Mentoring program')), | ||
], | ||
), | ||
] |
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,13 @@ | ||
.mentors-list { | ||
width: 100%; | ||
} | ||
|
||
.program-input-field { | ||
width: 200px; | ||
float: right; | ||
margin-right: 20px; | ||
} | ||
|
||
.program-input-field label { | ||
font-size: 1.3em; | ||
} |
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,15 @@ | ||
$(document).ready(function () { | ||
var program_selector = $('select#program'); | ||
program_selector.on('change', function () { | ||
var page_name = program_selector.val(); | ||
$('.page-name').text(page_name); | ||
if(page_name.search('Summer') > 0){ | ||
$('.gsoc-mentors').css('display', 'flex'); | ||
$('.gci-mentors').css('display', 'none'); | ||
} | ||
else if(page_name.search('Code-In') > 0){ | ||
$('.gsoc-mentors').css('display', 'none'); | ||
$('.gci-mentors').css('display', 'flex'); | ||
} | ||
}); | ||
}); |
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,98 @@ | ||
{% extends 'base.html' %} | ||
{% load staticfiles %} | ||
|
||
{% block add_css_files %} | ||
<link rel="stylesheet" href="{% static 'css/contributors.css' %}"> | ||
<link rel="stylesheet" href="{% static 'css/mentors.css' %}"> | ||
{% endblock %} | ||
|
||
{% block add_js_files %} | ||
<script src="{% static 'js/mentors.js' %}"></script> | ||
{% endblock %} | ||
|
||
{% block main-content %} | ||
|
||
<div class="web-page-details apply-flex center-content"> | ||
<h3 style="padding-right: 15px">~</h3> | ||
<h3 class="page-name"> | ||
{{ gsoc_section_name }} | ||
</h3> | ||
<h3 style="padding-left: 15px">~</h3> | ||
</div> | ||
|
||
<div class="apply-flex-center"> | ||
<p class="container web-page-description"> | ||
Thank You! Mentors for mentoring the potential contributors to get | ||
there work completed on time by helping them out in their project & | ||
reviewing their works too. <i class="fa fa-smile-o"></i> | ||
</p> | ||
</div> | ||
|
||
<div class="organization-mentors"> | ||
<div class="program-input-field"> | ||
<label for="program">Program-</label> | ||
<select id="program"> | ||
<option value="{{ gsoc_section_name }}">Google Summer of Code</option> | ||
<option value="{{ gci_section_name }}">Google Code-In</option> | ||
</select> | ||
</div> | ||
<div class="gsoc-mentors mentors-list apply-flex center-content"> | ||
{% for mentor in gsoc_mentors %} | ||
<div class="contributor-card"> | ||
<div class="contributor-image"> | ||
<img src="//github.com/{{ mentor.username }}.png/?size=210" | ||
alt="mentor-image"> | ||
</div> | ||
<div class="contributor-details"> | ||
<a class="bold-text large-font" href="//github.com/{{ mentor.username }}" target="_blank"> | ||
{% if contributor.name %} | ||
{{ mentor.name }} | ||
{% else %} | ||
{{ mentor.username }} | ||
{% endif %} | ||
</a> | ||
</div> | ||
</div> | ||
{% empty %} | ||
<h6 class="bold-text custom-green-color-font"> | ||
Note: They are currently no mentor records in our database. | ||
</h6> | ||
{% endfor %} | ||
{% if gsoc_previous_mentors %} | ||
<h6 class="bold-text custom-green-color-font"> | ||
Note: They are currently no mentors for upcoming Google Summer of | ||
Code. | ||
</h6> | ||
{% endif %} | ||
</div> | ||
<div class="gci-mentors mentors-list apply-flex center-content display-none"> | ||
{% for mentor in gci_mentors %} | ||
<div class="contributor-card"> | ||
<div class="contributor-image"> | ||
<img src="//github.com/{{ mentor.username }}.png/?size=210" | ||
alt="mentor-image"> | ||
</div> | ||
<div class="contributor-details"> | ||
<a class="bold-text large-font" href="//github.com/{{ mentor.username }}" target="_blank"> | ||
{% if contributor.name %} | ||
{{ mentor.name }} | ||
{% else %} | ||
{{ mentor.username }} | ||
{% endif %} | ||
</a> | ||
</div> | ||
</div> | ||
{% empty %} | ||
<h6 class="bold-text custom-green-color-font"> | ||
Note: They are currently no mentor records in our database. | ||
</h6> | ||
{% endfor %} | ||
{% if gsoc_previous_mentors %} | ||
<h6 class="bold-text custom-green-color-font"> | ||
Note: They are currently no mentors for upcoming Google Code-In. | ||
</h6> | ||
{% endif %} | ||
</div> | ||
</div> | ||
|
||
{% endblock %} |