Skip to content

Commit

Permalink
New horizontal listing news (#714)
Browse files Browse the repository at this point in the history
- Create new horizontal listing news, based on Organisms > Card Slider
  • Loading branch information
xentenza authored May 6, 2024
1 parent 69711ca commit d681a1c
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
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

0 comments on commit d681a1c

Please sign in to comment.