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 horizontal listing news #714

Merged
merged 3 commits into from
May 6, 2024
Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<div class="card-slider-wrapper">
<div class="card-slider">
{% for i in 1..10 %}
<div class="card-slider-cell">
<a href="#" class="card link-trapeze-horizontal">
<div class="card-body">
{% include '@atoms/picture/picture.twig' with {'variant':'news-thumb'} %}
<div itemscope itemtype="http://schema.org/Article">
<h3 class="card-title h5 mt-3" itemprop="name">Physics: new e-books for the AIAA Education Series</h3>
<p>
<time datetime="2018-03-26" itemprop="datePublished"><span class="sr-only">Published:</span>26.03.2018</time>
<span class="text-muted" itemprop="description">— Lorem ipsum dolor sit amet, consectetur adipiscing elit. Si enim ad populum me vocas, eum. Quid enim me prohiberet
Epicureum esse, si probarem, quae ille diceret?</span>
</p>
</div>
</div>
</a>
</div>
{% endfor %}
</div>

<div class="card-slider-footer">
<div>
<button role="button" id="card-slider-prev" class="card-slider-btn link-trapeze-horizontal disabled">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-chevron-left"></use>
</svg>
</button>
<button role="button" id="card-slider-next" class="card-slider-btn link-trapeze-horizontal">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-chevron-right"></use>
</svg>
</button>
</div>
</div>
</div>
36 changes: 36 additions & 0 deletions assets/components/content-types/news/news-horizontal-listing.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<div class="card-slider-wrapper">
<div class="card-slider">
{% for i in 1..10 %}
<div class="card-slider-cell">
<a href="#" class="card card-gray link-trapeze-horizontal">
<div class="card-body">
{% include '@atoms/picture/picture.twig' with {'variant':'news-thumb'} %}
<div itemscope itemtype="http://schema.org/Article">
<h3 class="card-title h5 mt-3" itemprop="name">Physics: new e-books for the AIAA Education Series</h3>
<p>
<time datetime="2018-03-26" itemprop="datePublished"><span class="sr-only">Published:</span>26.03.2018</time>
<span class="text-muted" itemprop="description">— Lorem ipsum dolor sit amet, consectetur adipiscing elit. Si enim ad populum me vocas, eum. Quid enim me prohiberet
Epicureum esse, si probarem, quae ille diceret?</span>
</p>
</div>
</div>
</a>
</div>
{% endfor %}
</div>

<div class="card-slider-footer">
<div>
<button role="button" id="card-slider-prev" class="card-slider-btn link-trapeze-horizontal disabled">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-chevron-left"></use>
</svg>
</button>
<button role="button" id="card-slider-next" class="card-slider-btn link-trapeze-horizontal">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-chevron-right"></use>
</svg>
</button>
</div>
</div>
</div>
7 changes: 7 additions & 0 deletions assets/components/content-types/news/news.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
title: News
name: news
variants:
- name: horizontal-listing
title: Horizontal Listing
notes: Don't forget to wrap your card slider with a wrapper that will hide the overflow (`.overflow-hidden` helper class will achieve just that).
- name: horizontal-listing-gray
title: Horizontal Listing with gray background
notes: Don't forget to wrap your card slider with a wrapper that will hide the overflow (`.overflow-hidden` helper class will achieve just that).
wrapper: bg-gray-100 py-4 my-4
- name: highlighted
title: Highlighted
- name: highlighted-carousel
Expand Down
Loading