-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#145 Product Page: Learners Carousel
- Loading branch information
Ahmed Belal
committed
May 11, 2019
1 parent
6272cf3
commit e7981aa
Showing
20 changed files
with
474 additions
and
7 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,93 @@ | ||
# Generated by Django 2.1.7 on 2019-05-08 20:08 | ||
|
||
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", "0014_resourcepage"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="UserTestimonialsPage", | ||
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 on this section.", | ||
max_length=255, | ||
), | ||
), | ||
( | ||
"subhead", | ||
models.CharField( | ||
help_text="Subhead to display below the heading.", | ||
max_length=255, | ||
), | ||
), | ||
( | ||
"items", | ||
wagtail.core.fields.StreamField( | ||
[ | ||
( | ||
"testimonial", | ||
wagtail.core.blocks.StructBlock( | ||
[ | ||
( | ||
"name", | ||
wagtail.core.blocks.CharBlock( | ||
help_text="Name of the attestant.", | ||
max_length=100, | ||
), | ||
), | ||
( | ||
"title", | ||
wagtail.core.blocks.CharBlock( | ||
help_text="The title to display after the name.", | ||
max_length=255, | ||
), | ||
), | ||
( | ||
"image", | ||
wagtail.images.blocks.ImageChooserBlock( | ||
blank=True, | ||
help_text="The image to display on the testimonial", | ||
null=True, | ||
), | ||
), | ||
( | ||
"quote", | ||
wagtail.core.blocks.TextBlock( | ||
help_text="The quote that appears on the testimonial." | ||
), | ||
), | ||
] | ||
), | ||
) | ||
], | ||
help_text="Add testimonials to display in this section.", | ||
), | ||
), | ||
], | ||
options={"verbose_name": "Testimonials Page"}, | ||
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
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,49 @@ | ||
{% load wagtailimages_tags wagtailcore_tags %} | ||
<div class="learners-block"> | ||
<div class="container"> | ||
<div class="head"> | ||
<h1>{{ testimonials.heading }}</h1> | ||
<h3>{{ testimonials.subhead }}</h3> | ||
</div> | ||
<div class="learners-slider"> | ||
{% for testimonial in testimonials.items %} | ||
<div class="slide"> | ||
<div class="slide-holder"> | ||
{% if testimonial.value.image %} | ||
{% image testimonial.value.image fill-75x75 %} | ||
{% endif %} | ||
<h2>{{ testimonial.value.name }}, {{ testimonial.value.title }}</h2> | ||
<p>{{ testimonial.value.quote|truncatechars:150 }}</p> | ||
<a data-toggle="modal" href="#testimonial-{{ forloop.counter }}" class="read-more">Continue Reading</a> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
{% for testimonial in testimonials.items %} | ||
<div class="modal fade" id="testimonial-{{ forloop.counter }}" role="dialog"> | ||
<div class="modal-dialog modal-dialog-centered"> | ||
<div class="modal-content"> | ||
<div class="modal-body"> | ||
<div class="container no-gutters px-0"> | ||
<div class="d-flex flex-row-reverse"> | ||
<a class="text-dark" href="testimonial-{{ forloop.counter }}" data-dismiss="modal"><span class="icon-close-outline" aria-hidden="true"></span></a> | ||
</div> | ||
</div> | ||
<div class="container px-4"> | ||
<div class="row py-2"> | ||
{% image testimonial.value.image fill-100x100 class="border rounded-circle headshot-image" %} | ||
</div> | ||
<div class="row mb-4"> | ||
<h2 class="modal-title text-uppercase">{{ testimonial.value.name }}, {{ testimonial.value.title }}</h2> | ||
</div> | ||
<div class="row quote-container"> | ||
<p>{{ testimonial.value.quote }}</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
</div> |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.