Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #221 from mitodl/ahmedbelal/146-product-page-facul…
…ty-carousel #146 Product Page: Faculty Carousel
- Loading branch information
Showing
13 changed files
with
381 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,84 @@ | ||
# Generated by Django 2.1.7 on 2019-05-06 15:25 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import wagtail.core.blocks | ||
import wagtail.core.fields | ||
import wagtail.images.blocks | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("wagtailcore", "0041_group_collection_permissions_verbose_name_plural"), | ||
("cms", "0015_user_testimonials_subpage"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="FacultyMembersPage", | ||
fields=[ | ||
( | ||
"page_ptr", | ||
models.OneToOneField( | ||
auto_created=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
parent_link=True, | ||
primary_key=True, | ||
serialize=False, | ||
to="wagtailcore.Page", | ||
), | ||
), | ||
( | ||
"heading", | ||
models.CharField( | ||
help_text="The heading to display for this section on the product page.", | ||
max_length=255, | ||
), | ||
), | ||
( | ||
"subhead", | ||
models.CharField( | ||
help_text="The subhead to display for this section on the product page.", | ||
max_length=255, | ||
), | ||
), | ||
( | ||
"members", | ||
wagtail.core.fields.StreamField( | ||
[ | ||
( | ||
"member", | ||
wagtail.core.blocks.StructBlock( | ||
[ | ||
( | ||
"name", | ||
wagtail.core.blocks.CharBlock( | ||
help_text="Name of the faculty member.", | ||
max_length=100, | ||
), | ||
), | ||
( | ||
"image", | ||
wagtail.images.blocks.ImageChooserBlock( | ||
help_text="Profile image size must be at least 300x300 pixels." | ||
), | ||
), | ||
( | ||
"description", | ||
wagtail.core.blocks.RichTextBlock( | ||
help_text="A brief description about the faculty member." | ||
), | ||
), | ||
] | ||
), | ||
) | ||
], | ||
help_text="The faculty members to display on this page", | ||
), | ||
), | ||
], | ||
options={"abstract": False}, | ||
bases=("wagtailcore.page",), | ||
) | ||
] |
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
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 @@ | ||
{% load wagtailimages_tags %} | ||
<div class="faculty-block"> | ||
<div class="container"> | ||
<div class="head"> | ||
<h1 class="text-uppercase">{{ course.faculty.heading }}</h1> | ||
<h3>{{ course.faculty.subhead }}</h3> | ||
</div> | ||
<div class="faculty-slider"> | ||
{% for member in course.faculty.members %} | ||
<div class="slide"> | ||
<div class="slide-holder"> | ||
{% image member.value.image fill-300x300 as faculty_image %} | ||
<img src="{{ faculty_image.url }}" alt="{{ member.value.name }}"> | ||
<h2>{{ member.value.name }}</h2> | ||
<div class="text-holder"> | ||
{{ member.value.description|safe }} | ||
</div> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
</div> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Oops, something went wrong.