diff --git a/corpus/accounts/admin.py b/corpus/accounts/admin.py index eb0ad9e6..6ef42ab9 100644 --- a/corpus/accounts/admin.py +++ b/corpus/accounts/admin.py @@ -1,10 +1,10 @@ from django.contrib import admin from django.contrib.auth.admin import UserAdmin +from .models import Core from .models import ExecutiveMember -from .models import User from .models import Faculty -from .models import Core +from .models import User # Register your models here. @@ -83,8 +83,10 @@ class ExecutiveMemberAdmin(admin.ModelAdmin): ) ordering = ("user",) + class CoreAdmin(admin.ModelAdmin): - list_display = ("user", "sig", "post", "term_start") + list_display = ("executivemember", "sig", "post", "term_start") + class FacultyAdmin(admin.ModelAdmin): list_display = ("user", "sig", "post", "term_start") diff --git a/corpus/accounts/migrations/0004_executivemember_profile_picture_and_more.py b/corpus/accounts/migrations/0004_executivemember_profile_picture_and_more.py new file mode 100644 index 00000000..7befcbce --- /dev/null +++ b/corpus/accounts/migrations/0004_executivemember_profile_picture_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.7 on 2024-01-26 20:50 +from django.db import migrations +from django.db import models + + +class Migration(migrations.Migration): + + dependencies = [ + ("accounts", "0003_alter_executivemember_date_joined"), + ] + + operations = [ + migrations.AddField( + model_name="executivemember", + name="profile_picture", + field=models.ImageField(blank=True, null=True, upload_to=""), + ), + migrations.AlterField( + model_name="executivemember", + name="date_joined", + field=models.DateTimeField(verbose_name="Date Joined"), + ), + ] diff --git a/corpus/accounts/migrations/0005_alter_executivemember_date_joined_and_more.py b/corpus/accounts/migrations/0005_alter_executivemember_date_joined_and_more.py new file mode 100644 index 00000000..a7f472a8 --- /dev/null +++ b/corpus/accounts/migrations/0005_alter_executivemember_date_joined_and_more.py @@ -0,0 +1,101 @@ +# Generated by Django 4.2.10 on 2024-03-12 16:35 +import django.db.models.deletion +import django.utils.timezone +from django.conf import settings +from django.db import migrations +from django.db import models + + +class Migration(migrations.Migration): + + dependencies = [ + ("config", "0004_sig_society_sigs"), + ("accounts", "0004_executivemember_profile_picture_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="executivemember", + name="date_joined", + field=models.DateTimeField( + default=django.utils.timezone.now, verbose_name="Date Joined" + ), + ), + migrations.AlterField( + model_name="executivemember", + name="github", + field=models.CharField( + blank=True, max_length=200, null=True, verbose_name="GitHub Username" + ), + ), + migrations.AlterField( + model_name="executivemember", + name="profile_picture", + field=models.ImageField( + blank=True, null=True, upload_to="execmember/profile_picture" + ), + ), + migrations.CreateModel( + name="Faculty", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("post", models.CharField(max_length=100)), + ("term_start", models.DateField(default=django.utils.timezone.now)), + ("term_end", models.DateField(null=True)), + ( + "sig", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, to="config.sig" + ), + ), + ( + "user", + models.OneToOneField( + on_delete=django.db.models.deletion.CASCADE, + to=settings.AUTH_USER_MODEL, + ), + ), + ], + options={ + "verbose_name_plural": "faculties", + }, + ), + migrations.CreateModel( + name="Core", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("post", models.CharField(max_length=100)), + ("term_start", models.DateField(default=django.utils.timezone.now)), + ("term_end", models.DateField(null=True)), + ( + "sig", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, to="config.sig" + ), + ), + ( + "user", + models.OneToOneField( + on_delete=django.db.models.deletion.CASCADE, + to=settings.AUTH_USER_MODEL, + ), + ), + ], + ), + ] diff --git a/corpus/accounts/migrations/0006_remove_core_user_core_executivemember_and_more.py b/corpus/accounts/migrations/0006_remove_core_user_core_executivemember_and_more.py new file mode 100644 index 00000000..91d4e312 --- /dev/null +++ b/corpus/accounts/migrations/0006_remove_core_user_core_executivemember_and_more.py @@ -0,0 +1,119 @@ +# Generated by Django 4.2.10 on 2024-03-13 16:58 +import django.db.models.deletion +from django.db import migrations +from django.db import models + + +class Migration(migrations.Migration): + + dependencies = [ + ("accounts", "0005_alter_executivemember_date_joined_and_more"), + ] + + operations = [ + migrations.RemoveField( + model_name="core", + name="user", + ), + migrations.AddField( + model_name="core", + name="executivemember", + field=models.OneToOneField( + default=0, + on_delete=django.db.models.deletion.CASCADE, + to="accounts.executivemember", + ), + preserve_default=False, + ), + migrations.AddField( + model_name="faculty", + name="website", + field=models.URLField(blank=True, null=True), + ), + migrations.AlterField( + model_name="core", + name="post", + field=models.IntegerField( + choices=[ + (1, "Convenor"), + (2, "Chairperson"), + (3, "Vice Chairperson"), + (4, "Secretary"), + (5, "Joint Secretary"), + (6, "Treasurer(Branch)"), + (7, "Treasurer(Institute)"), + (8, "Webmaster"), + (9, "Media Lead"), + (10, "Outreach Lead"), + (11, "Envision Lead"), + (12, "Labs Lead"), + (13, "CompSoc Chair"), + (14, "CompSoc Vice Chair"), + (15, "CompSoc Secretary"), + (16, "CompSoc Project Head"), + (17, "CompSoc Project Coordinator"), + (18, "CIS Chair"), + (19, "CIS Secretary"), + (20, "CIS Project Head"), + (21, "Diode Chair"), + (22, "SPS Chair"), + (23, "SPS Vice Chair"), + (24, "SPS Secretary"), + (25, "CAS Chair"), + (26, "CAS Vice Chair"), + (27, "CAS Secretary"), + (28, "RAS Chair"), + (29, "RAS Secretary"), + (30, "Piston Chair"), + (31, "Piston Vice Chair"), + (32, "Piston Secretary"), + (33, "IAS Chair"), + (34, "IAS Secretary"), + ] + ), + ), + migrations.AlterField( + model_name="core", + name="term_end", + field=models.DateField(), + ), + migrations.AlterField( + model_name="core", + name="term_start", + field=models.DateField(), + ), + migrations.AlterField( + model_name="faculty", + name="post", + field=models.CharField( + blank=True, + choices=[ + ("BRANCH COUNSELOR", "Branch Counselor"), + ("CIS FACULTY ADVISOR", "CIS Faculty Advisor"), + ("COMPSOC FACULTY ADVISOR", "CompSoc Faculty Advisor"), + ("CAS FACULTY ADVISOR", "CAS Faculty Advisor"), + ("SPS FACULTY ADVISOR", "SPS Faculty Advisor"), + ( + "PHOTONIC SOCIETY FACULTY ADVISOR", + "Photonic Society Faculty Advisor", + ), + ("WIE FACULTY ADVISOR", "WIE Faculty Advisor"), + ("IAS FACULTY ADVISOR", "IAS Faculty Advisor"), + ("SIGHT CHAIR", "SIGHT Chair"), + ("RAS FACULTY ADVISOR", "RAS Faculty Advisor"), + ("GRSS FACULTY ADVISOR", "GRSS Faculty Advisor"), + ], + max_length=100, + ), + ), + migrations.AlterField( + model_name="faculty", + name="term_end", + field=models.DateField(), + ), + migrations.AlterField( + model_name="faculty", + name="term_start", + field=models.DateField(), + ), + ] diff --git a/corpus/accounts/migrations/0007_alter_faculty_post.py b/corpus/accounts/migrations/0007_alter_faculty_post.py new file mode 100644 index 00000000..f576e9db --- /dev/null +++ b/corpus/accounts/migrations/0007_alter_faculty_post.py @@ -0,0 +1,37 @@ +# Generated by Django 4.2.10 on 2024-03-13 17:40 +from django.db import migrations +from django.db import models + + +class Migration(migrations.Migration): + + dependencies = [ + ("accounts", "0006_remove_core_user_core_executivemember_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="faculty", + name="post", + field=models.CharField( + blank=True, + choices=[ + ("Branch Counselor", "Branch Counselor"), + ("CIS Faculty Advisor", "CIS Faculty Advisor"), + ("CompSoc Faculty Advisor", "CompSoc Faculty Advisor"), + ("CAS Faculty Advisor", "CAS Faculty Advisor"), + ("SPS Faculty Advisor", "SPS Faculty Advisor"), + ( + "Photonic Society Faculty Advisor", + "Photonic Society Faculty Advisor", + ), + ("WIE Faculty Advisor", "WIE Faculty Advisor"), + ("IAS Faculty Advisor", "IAS Faculty Advisor"), + ("SIGHT Chair", "SIGHT Chair"), + ("RAS Faculty Advisor", "RAS Faculty Advisor"), + ("GRSS Faculty Advisor", "GRSS Faculty Advisor"), + ], + max_length=100, + ), + ), + ] diff --git a/corpus/accounts/models.py b/corpus/accounts/models.py index 5ed93ed1..185a8731 100644 --- a/corpus/accounts/models.py +++ b/corpus/accounts/models.py @@ -1,5 +1,3 @@ -from datetime import datetime - from config.models import SIG from django.contrib.auth.base_user import BaseUserManager from django.contrib.auth.models import AbstractUser @@ -144,9 +142,7 @@ class ExecutiveMember(models.Model): max_length=200, blank=True, null=True, verbose_name="GitHub Username" ) is_nep = models.BooleanField(default=False, verbose_name="Is NEP Member?") - date_joined = models.DateTimeField( - verbose_name="Date Joined", default=datetime.now() - ) + date_joined = models.DateTimeField(verbose_name="Date Joined", default=now) def save(self, *args, **kwargs): self.roll_number = self.roll_number.upper() @@ -158,19 +154,81 @@ def __str__(self): class Core(models.Model): - user = models.OneToOneField(User, null=False, on_delete=models.CASCADE) - post = models.CharField(max_length=100, null=False) + + POST_CHOICES = ( + (1, "Convenor"), + (2, "Chairperson"), + (3, "Vice Chairperson"), + (4, "Secretary"), + (5, "Joint Secretary"), + (6, "Treasurer(Branch)"), + (7, "Treasurer(Institute)"), + (8, "Webmaster"), + (9, "Media Lead"), + (10, "Outreach Lead"), + (11, "Envision Lead"), + (12, "Labs Lead"), + (13, "CompSoc Chair"), + (14, "CompSoc Vice Chair"), + (15, "CompSoc Secretary"), + (16, "CompSoc Project Head"), + (17, "CompSoc Project Coordinator"), + (18, "CIS Chair"), + (19, "CIS Secretary"), + (20, "CIS Project Head"), + (21, "Diode Chair"), + (22, "SPS Chair"), + (23, "SPS Vice Chair"), + (24, "SPS Secretary"), + (25, "CAS Chair"), + (26, "CAS Vice Chair"), + (27, "CAS Secretary"), + (28, "RAS Chair"), + (29, "RAS Secretary"), + (30, "Piston Chair"), + (31, "Piston Vice Chair"), + (32, "Piston Secretary"), + (33, "IAS Chair"), + (34, "IAS Secretary"), + ) + executivemember = models.OneToOneField( + ExecutiveMember, null=False, on_delete=models.CASCADE + ) + post = models.IntegerField(null=False, choices=POST_CHOICES) sig = models.ForeignKey(SIG, null=False, on_delete=models.CASCADE) - term_start = models.DateField(default=now, null=False) - term_end = models.DateField(null=True) + term_start = models.DateField() + term_end = models.DateField() + + def __str__(self): + self_user = self.executivemember.user + return f"{self_user.first_name} {self_user.last_name}" + + def get_post_display(self): + return dict(Core.POST_CHOICES).get(self.post) class Faculty(models.Model): class Meta: verbose_name_plural = "faculties" + FACULTY_POSTS = ( + ("Branch Counselor", "Branch Counselor"), + ("CIS Faculty Advisor", "CIS Faculty Advisor"), + ("CompSoc Faculty Advisor", "CompSoc Faculty Advisor"), + ("CAS Faculty Advisor", "CAS Faculty Advisor"), + ("SPS Faculty Advisor", "SPS Faculty Advisor"), + ("Photonic Society Faculty Advisor", "Photonic Society Faculty Advisor"), + ("WIE Faculty Advisor", "WIE Faculty Advisor"), + ("IAS Faculty Advisor", "IAS Faculty Advisor"), + ("SIGHT Chair", "SIGHT Chair"), + ("RAS Faculty Advisor", "RAS Faculty Advisor"), + ("GRSS Faculty Advisor", "GRSS Faculty Advisor"), + ) user = models.OneToOneField(User, null=False, on_delete=models.CASCADE) sig = models.ForeignKey(SIG, null=False, on_delete=models.CASCADE) - post = models.CharField(max_length=100, null=False) - term_start = models.DateField(default=now, null=False) - term_end = models.DateField(null=True) + post = models.CharField( + max_length=100, null=False, choices=FACULTY_POSTS, blank=True + ) + term_start = models.DateField() + term_end = models.DateField() + website = models.URLField(max_length=200, null=True, blank=True) diff --git a/corpus/corpus/urls.py b/corpus/corpus/urls.py index 572a3107..250f6754 100644 --- a/corpus/corpus/urls.py +++ b/corpus/corpus/urls.py @@ -14,11 +14,11 @@ 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ +from django.conf import settings +from django.conf.urls.static import static from django.contrib import admin from django.urls import include from django.urls import path -from django.conf import settings -from django.conf.urls.static import static urlpatterns = [ path("admin/", admin.site.urls), diff --git a/corpus/impulse/views.py b/corpus/impulse/views.py index 826c545c..7ffc43d3 100644 --- a/corpus/impulse/views.py +++ b/corpus/impulse/views.py @@ -492,7 +492,12 @@ def mark_payment_complete(request, pk): send_email( "Payment Complete | Impulse", "emails/impulse/payment_complete.html", - {"team": team, "user": member.user, "payment_status": payment_status, "final_message": final_message}, + { + "team": team, + "user": member.user, + "payment_status": payment_status, + "final_message": final_message, + }, bcc=[member.user.email], ) messages.success( @@ -514,7 +519,12 @@ def mark_payment_incomplete(request, pk): send_email( "Payment Incomplete | Impulse", "emails/impulse/payment_incomplete.html", - {"team": team, "user": member.user, "payment_status": payment_status, "final_message": final_message}, + { + "team": team, + "user": member.user, + "payment_status": payment_status, + "final_message": final_message, + }, bcc=[member.user.email], ) messages.success(request, "Successfully marked payment as incomplete!") diff --git a/corpus/pages/views.py b/corpus/pages/views.py index 458d9737..eeb6ea67 100644 --- a/corpus/pages/views.py +++ b/corpus/pages/views.py @@ -1,12 +1,12 @@ -from config.models import SIG -from config.models import Society from accounts.models import Core -from accounts.models import Faculty from accounts.models import ExecutiveMember +from accounts.models import Faculty +from config.models import SIG +from config.models import Society +from django.db.models import Q from django.shortcuts import get_object_or_404 from django.shortcuts import render -from django.db.models import Q -from django.db.models import Case, When, Value, CharField + def index(request): # Get all societies to render on landing page Societies section @@ -48,123 +48,29 @@ def sig(request, sig_name): def team(request): - members = ExecutiveMember.objects.filter( - Q(user__core__isnull=True) | Q(user__core=None) -) - ieee_core_posts = [ - "Convenor", - "Chairperson", - "Vice Chairperson", - "Secretary", - "Joint Secretary", - "Treasurer(Branch)", - "Treasurer(Institute)", - "Webmaster", - "Media Lead", - "Outreach Lead", - "Envision Lead", - "Labs Lead", - ] - - - compsoc_core_posts = [ - "CompSoc Chair", - "CompSoc Vice Chair", - "CompSoc Secretary", - "CompSoc Project Head", - "CompSoc Project Coordinator", - "CIS Chair", - "CIS Secretary", - "CIS Project Head", - - ] - - diode_core_posts = [ - "Diode Chair", - "SPS Chair", - "SPS Vice Chair", - "SPS Secretary", - "CAS Chair", - "CAS Vice Chair", - "CAS Secretary", - "RAS Chair", - "RAS Secretary", - ] - - piston_core_posts = [ - "Piston Chair", - "Piston Vice Chair", - "Piston Secretary", - "Piston Project Head", - "IAS Chair", - "IAS Secretary", - ] - - ieee_core = Core.objects.filter(post__in=ieee_core_posts).order_by( - Case( - When(post="Convenor", then=Value(1)), - When(post="Chairperson", then=Value(2)), - When(post="Vice Chairperson", then=Value(3)), - When(post="Secretary", then=Value(4)), - When(post="Joint Secretary", then=Value(5)), - When(post="Treasurer(Branch)", then=Value(6)), - When(post="Treasurer(Institute)", then=Value(7)), - When(post="Webmaster", then=Value(8)), - When(post="Media Lead", then=Value(9)), - When(post="Outreach Lead", then=Value(10)), - When(post="Envision Lead", then=Value(11)), - When(post="Labs Lead", then=Value(12)), - When(post="WiE Chair", then=Value(13)), - ) + compsoc_members = ExecutiveMember.objects.filter( + Q(core__isnull=True) and Q(sig__name="CompSoc") ) - - compsoc_core = Core.objects.filter(post__in=compsoc_core_posts).order_by( - Case( - When(post="CompSoc Chair", then=Value(1)), - When(post="CompSoc Vice Chair", then=Value(2)), - When(post="CompSoc Secretary", then=Value(3)), - When(post="CompSoc Project Head", then=Value(4)), - When(post="CompSoc Project Coordinator", then=Value(5)), - When(post="CIS Chair", then=Value(6)), - When(post="CIS Secretary", then=Value(7)), - When(post="CIS Project Head", then=Value(8)), - When(post="Webmaster", then=Value(9)), - ) + diode_members = ExecutiveMember.objects.filter( + Q(core__isnull=True) and Q(sig__name="Diode") ) - - diode_core = Core.objects.filter(post__in=diode_core_posts).order_by( - Case( - When(post="Diode Chair", then=Value(1)), - When(post="SPS Chair", then=Value(2)), - When(post="SPS Vice Chair", then=Value(3)), - When(post="SPS Secretary", then=Value(4)), - When(post="CAS Chair", then=Value(5)), - When(post="CAS Vice Chair", then=Value(6)), - When(post="CAS Secretary", then=Value(7)), - When(post="RAS Chair", then=Value(8)), - When(post="RAS Secretary", then=Value(9)), - ) + piston_members = ExecutiveMember.objects.filter( + Q(core__isnull=True) and Q(sig__name="Piston") ) - - piston_core = Core.objects.filter(post__in=piston_core_posts).order_by( - Case( - When(post="Piston Chair", then=Value(1)), - When(post="Piston Vice Chair", then=Value(2)), - When(post="Piston Secretary", then=Value(3)), - When(post="Piston Project Head", then=Value(4)), - When(post="IAS Chair", then=Value(5)), - When(post="IAS Secretary", then=Value(6)), - ) - ) - + ieee_core = Core.objects.filter(sig__name="ExeCom").order_by("post") + compsoc_core = Core.objects.filter(sig__name="CompSoc").order_by("post") + diode_core = Core.objects.filter(sig__name="Diode").order_by("post") + piston_core = Core.objects.filter(sig__name="Piston").order_by("post") faculty = Faculty.objects.all() context = { - "members":members, + "compsoc_members": compsoc_members, + "diode_members": diode_members, + "piston_members": piston_members, "ieee_core": ieee_core, - "compsoc_core":compsoc_core, - "diode_core":diode_core, - "piston_core":piston_core, - "faculty":faculty, + "compsoc_core": compsoc_core, + "diode_core": diode_core, + "piston_core": piston_core, + "faculty": faculty, } - return render(request, "pages/team.html", context) \ No newline at end of file + return render(request, "pages/team.html", context) diff --git a/corpus/skyward_expedition/apps.py b/corpus/skyward_expedition/apps.py index d44ef13f..a050910c 100644 --- a/corpus/skyward_expedition/apps.py +++ b/corpus/skyward_expedition/apps.py @@ -2,5 +2,5 @@ class SkywardExpeditionConfig(AppConfig): - default_auto_field = 'django.db.models.BigAutoField' - name = 'skyward_expedition' + default_auto_field = "django.db.models.BigAutoField" + name = "skyward_expedition" diff --git a/corpus/templates/components/general_dropdown.html b/corpus/templates/components/general_dropdown.html index da21d2b7..16448b8e 100644 --- a/corpus/templates/components/general_dropdown.html +++ b/corpus/templates/components/general_dropdown.html @@ -2,6 +2,7 @@
  • General
  • Home
  • About Us
  • +
  • Team
  • Blog
  • Gyan
  • Virtual Expo diff --git a/corpus/templates/emails/impulse/payment_update.html b/corpus/templates/emails/impulse/payment_update.html index 48b98113..31847417 100644 --- a/corpus/templates/emails/impulse/payment_update.html +++ b/corpus/templates/emails/impulse/payment_update.html @@ -10,4 +10,4 @@

    Hi {{ user }},

    Your payment status for Robotrix has been updated to {{ payment_status }}.

    {{ final_message }}

    -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/corpus/templates/emails/robotrix/payment_update.html b/corpus/templates/emails/robotrix/payment_update.html index 48b98113..31847417 100644 --- a/corpus/templates/emails/robotrix/payment_update.html +++ b/corpus/templates/emails/robotrix/payment_update.html @@ -10,4 +10,4 @@

    Hi {{ user }},

    Your payment status for Robotrix has been updated to {{ payment_status }}.

    {{ final_message }}

    -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/corpus/templates/pages/team.html b/corpus/templates/pages/team.html index aa2c0162..e5d0a099 100644 --- a/corpus/templates/pages/team.html +++ b/corpus/templates/pages/team.html @@ -1,88 +1,24 @@ {% extends 'base.html' %} {% load static %} -{% block content %} - - - - - +{% block style %} + + + + +{% endblock %} +{% block content %}

    Teams

    - IEEE - CompSoc - Diode - Piston -
    @@ -91,25 +27,29 @@

    IEEE Faculty

    {% for fac in faculty %} - {% if fac.post == "Branch Counselor" %} + {% if fac.sig.name == "ExeCom" %}
    - photo +

    {{fac.user}}

    {{fac.post}}


    + {% if fac.user.executivemember.linkedin is not Blank %}
    -
    {% endif %} {% endfor %} -

    IEEE Core


    @@ -120,15 +60,15 @@

    IEEE Core

    - photo + photo
    -

    {{core.user}}

    -

    {{core.post}}

    +

    {{core.executivemember.user}}

    +

    {{core.get_post_display}}


    - - + +
    @@ -148,15 +88,22 @@

    CompSoc Faculty

    - photo + photo

    {{fac.user}}

    {{fac.post}}


    + {% if fac.user.executivemember.linkedin is not Blank %}
    + {% endif %} + {% if fac.website is not Blank %} +
    + +
    + {% endif %}
    @@ -173,15 +120,15 @@

    CompSoc Core

    - photo + photo
    -

    {{core.user}}

    -

    {{core.post}}

    +

    {{core.executivemember.user}}

    +

    {{core.get_post_display}}


    - - + +
    @@ -193,24 +140,22 @@

    Members


    - {% for member in members %} - {% if member.sig.name == "CompSoc" %} + {% for member in compsoc_members %}
    - photo + photo

    {{member.user}}


    - - + +
    - {% endif %} {% endfor %}
    @@ -226,15 +171,19 @@

    Diode Faculty

    - photo + photo

    {{fac.user}}

    {{fac.post}}


    + {% if fac.user.executivemember.linkedin is not Blank %}
    -
    + {% endif %} + {% if fac.website is not Blank %} + + {% endif %}
    @@ -251,11 +200,11 @@

    Diode Core

    - photo + photo
    -

    {{core.user}}

    -

    {{core.post}}

    +

    {{core.executivemember.user}}

    +

    {{core.get_post_display}}


    @@ -271,24 +220,22 @@

    Members


    - {% for member in members %} - {% if member.sig.name == "Diode" %} + {% for member in diode_members %}
    - photo + photo

    {{member.user}}


    - - + +
    - {% endif %} {% endfor %}
    @@ -304,14 +251,19 @@

    Piston Faculty

    - photo + photo

    {{fac.user}}

    {{fac.post}}


    + {% if fac.user.executivemember.linkedin is not Blank %}
    + {% endif %} + {% if fac.website is not Blank %} + + {% endif %}
    @@ -329,15 +281,15 @@

    Piston Core

    - photo + photo
    -

    {{core.user}}

    -

    {{core.post}}

    +

    {{core.executivemember.user}}

    +

    {{core.get_post_display}}


    - - + +
    @@ -349,24 +301,22 @@

    Members


    - {% for member in members %} - {% if member.sig.name == "Piston" %} + {% for member in piston_members %}
    - photo + photo

    {{member.user}}


    - - + +
    - {% endif %} {% endfor %}
    diff --git a/corpus/templates/static/css/team.css b/corpus/templates/static/css/team.css new file mode 100644 index 00000000..dbdf4c02 --- /dev/null +++ b/corpus/templates/static/css/team.css @@ -0,0 +1,59 @@ +.flex-container { + display: flex; + flex-flow: row wrap; + align-items: flex-start; + align-content: space-between; + align-content: center; + text-align: center; + } + +.profile-pic { + height: 150px; + width: 170px; + border-radius: 50%; + } + +.title { + font-family: 'Ubuntu'; + font-style: normal; + font-weight: 400; + margin-top: 20px; + margin-bottom: 20px; + text-align: center; + font-size: 50px; + } + +.section-heading { + margin-top: 20px; + font-family: 'Ubuntu'; + font-style: normal; + text-align: center; + font-size: 30px; + } + +.margins { + margin-top: 15px; + margin-left: 20px; + margin-right: 20px; + margin-bottom: 15px; + } + +.card-post { + font-family: 'Ubuntu'; + font-style: normal; + font-weight: normal; + margin-top: 15px; + margin-bottom: 5px; + text-align: center; + font-size: 25px; + } + +.card-title { + font-family: 'Ubuntu'; + font-style: normal; + font-weight: bold; + margin-top: 15px; + margin-bottom: 5px; + text-align: center; + font-size: 25px; + } diff --git a/corpus/templates/static/img/default_profile_picture.png b/corpus/templates/static/img/default_profile_picture.png new file mode 100644 index 00000000..cd018601 Binary files /dev/null and b/corpus/templates/static/img/default_profile_picture.png differ