Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Event List Component #374

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/scss/components/_section.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,14 @@
}

.section__link {
@include link-border;
flex: 0 0 auto;
// @include link-border;
text-decoration: underline;
flex: 0 0 25%;
text-align: right;

&:hover {
text-decoration: none;
}

@include breakpoint(md) {
.section__title + & {
Expand Down
20 changes: 20 additions & 0 deletions src/templates/paragraphs/related-events.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<section class="section mt-9" data-digest-content>
<div class="section__header">
<h2 class="section__title">
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Eveniet, sunt sit impedit aliquid eum vero officiis saepe natus veritatis, ullam quaerat similique quasi molestias numquam voluptate quam incidunt, provident fugiat?
</h2>
{# <p class="f3"> #}
<a href="#" class="section__link">Lorem, ipsum dolor sit amet consectetur adipisicing elit. Eveniet, sunt sit impedit aliquid eum vero officiis saepe natus veritatis.</a>
{# </p> #}
</div>

<ul class="list list--dividers list--md">
{% for i in 0..3 %}
<li class="list__item">
{% include 'partials/event-teaser.twig' with {
event_list: false
} %}
</li>
{% endfor %}
</ul>
</section>
16 changes: 9 additions & 7 deletions src/templates/partials/basic-content.twig
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
<div class="paragraph--text typography" data-digest-content>
<h2>
There&rsquo;s a heading after intro. 360&deg; degrees. You’ve got
questions. We’ve "got“ answers!
questions. We’ve "got“ answers!
</h2>
<p>
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Possimus facilis
consectetur adipisci minus libero natus assumenda pariatur, architecto
nisi sed rerum ad rem recusandae? Sapiente blanditiis consectetur maxime
incidunt voluptatibus?
consectetur adipisci minus libero natus assumenda pariatur, architecto
nisi sed rerum ad rem recusandae? Sapiente blanditiis consectetur maxime
incidunt voluptatibus?
</p>
<p>
Sapiente cumque, quibusdam illo eaque itaque deleniti hic quos
perspiciatis aut, nostrum at aspernatur deserunt dolor delectus officia
odio aperiam atque eligendi, sit ab tempora expedita quod accusantium
autem. Repellat!
perspiciatis aut, nostrum at aspernatur deserunt dolor delectus officia
odio aperiam atque eligendi, sit ab tempora expedita quod accusantium
autem. Repellat!
</p>
</div>

Expand Down Expand Up @@ -94,6 +94,8 @@

{% include 'paragraphs/text-short.twig' %}

{% include 'paragraphs/related-events.twig' %}

{% include 'paragraphs/link-list.twig' %}

{% include 'paragraphs/embed.twig' %}
Expand Down
60 changes: 31 additions & 29 deletions src/templates/partials/event-list.twig
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
{% set filter_active = true %}

{% embed 'partials/sidebar-layout.twig' %}
{% block nav %}
{% include 'partials/event-search.twig' %}
{% include 'partials/event-filters.twig' %}
{% endblock %}
{% block content %}
{% if filter_active %}
{% include 'partials/active-filters.twig' %}
{% endif %}
{% block nav %}
{% include 'partials/event-search.twig' %}
{% include 'partials/event-filters.twig' %}
{% endblock %}
{% block content %}
{% if filter_active %}
{% include 'partials/active-filters.twig' %}
{% endif %}

{% if no_results %}
<p class="lead">
There are no events on this date.
</p>
{% endif %}
{% if no_results %}
<p class="lead">
There are no events on this date.
</p>
{% endif %}

{% for y in 0..2 %}
<section class="section">
<h2 class="section__title">
Sunday, May 23
</h2>
{% for y in 0..2 %}
<section class="section">
<h2 class="section__title">
Sunday, May 23
</h2>

<ul class="list list--dividers list--md">
{% for i in 0..3 %}
<li class="list__item">
{% include 'partials/event-teaser.twig' %}
</li>
{% endfor %}
</ul>
</section>
{% endfor %}
<ul class="list list--dividers list--md">
{% for i in 0..3 %}
<li class="list__item">
{% include 'partials/event-teaser.twig' with {
event_list: true
} %}
</li>
{% endfor %}
</ul>
</section>
{% endfor %}

{% include 'partials/pagination.twig' %}
{% endblock %}
{% include 'partials/pagination.twig' %}
{% endblock %}
{% endembed %}
84 changes: 47 additions & 37 deletions src/templates/partials/event-teaser.twig
Original file line number Diff line number Diff line change
@@ -1,41 +1,51 @@
<article class="d-flex" aria-labelledby="midd-event-{{ i }}-header">
<time datetime="" class="text-center mt-1 lh-solid">
<span class="f3 d-block">Jun</span>
<span class="f7 d-block">24</span>
</time>
<div class="w-100 pl-3 clearfix">
<figure class="mb-2 float-md-right ml-md-3">
<a href="">
{% include 'partials/img.twig' with {
<time datetime="" class="text-center mt-1 lh-solid">
<span class="f3 d-block">Jun</span>
<span class="f7 d-block">24</span>
<span class="f3 d-block pt-1 mt-1 border-t border-navy">2019</span>
</time>
<div class="w-100 pl-3 clearfix">
<figure class="mb-2 float-md-right ml-md-3">
<a href="">
{% include 'partials/img.twig' with {
name: 'event_teaser'
} %}
</a>
</figure>
<h3 class="h3" id="midd-event-{{ i }}-header">
<a href="{{ url|default('#') }}"
title="{{ title }} on June 24, 2017 &middot; 11:45 AM">
Museum of Art Lecture Series
</a>
</h3>
<time datetime="" class="d-block font-medium">11:45 AM</time>
<p class="f3 my-3">
{% set max_length = (i * 30) + 20 %}
{% set text =
'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Amet
asperiores illum quas, voluptatum atque voluptas, animi ipsam magni sit
quo quae ut fugit. Accusantium explicabo sunt laborum? Soluta, placeat
nisi.'
%}
{# naive example of truncate event text to 100 #}
{{ (text|striptags|length) > max_length
? (text|striptags|slice(0, max_length)) ~ '...'
: text|striptags }}
</p>
<p class="f3 font-medium">
McCone Irvine Auditorium
</p>
{% if env.test or random(1) %}
<small class="f2 text-gray">Open to the Public</small>
{% endif %}
</div>
</a>
</figure>
<h3 class="h3" id="midd-event-{{ i }}-header">
<a href="{{ url|default('#') }}" title="{{ title }} on June 24, 2017 &middot; 11:45 AM">
Museum of Art Lecture Series
</a>
</h3>
{% if event_list %}
<time datetime="" class="d-block font-medium">11:45 AM</time>
<p class="f3 my-3">
{% set max_length = (i * 30) + 20 %}
{% set text =
'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Amet
asperiores illum quas, voluptatum atque voluptas, animi ipsam magni sit
quo quae ut fugit. Accusantium explicabo sunt laborum? Soluta, placeat
nisi.'
%}
{# naive example of truncate event text to 100 #}
{{ (text|striptags|length) > max_length
? (text|striptags|slice(0, max_length)) ~ '...'
: text|striptags }}
</p>
<p class="f3 font-medium">
McCone Irvine Auditorium
</p>
{% if env.test or random(1) %}
<small class="f2 text-gray">Open to the Public</small>
{% endif %}
{% else %}
<p class="f3 font-medium">
McCone Irvine Auditorium
</p>
<time datetime="" class="d-block font-medium">11:45 AM</time>
<p class="f2 mt-3">
<a href="#" class="link-underline">Continue Reading</a>
</p>
{% endif %}
</div>
</article>
2 changes: 2 additions & 0 deletions src/templates/partials/top-level-paragraphs.twig
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@

{% include 'paragraphs/two-col-text.twig' %}

{% include 'paragraphs/related-events.twig' %}

{% include 'paragraphs/schedule.twig' %}

{% include 'paragraphs/cta-group.twig' %}