+$breakpoint-modal-list = 768px
+
+.modal-list-wrapper
+ display: flex
+
+ +below($breakpoint-modal-list)
+ display: block
+
.modal-list
list-style-type: none
+ flex: 1 1 50%
+ horizontal-spacing(5vw)
+
+ &:not(:last-child)
+ margin-bottom: 1.75em // When columns stack, match spacing between other items
+
+ +below($breakpoint-modal-list)
+ padding-left: 0
+ padding-right: 0
&-item
position: relative
a
color: $colors.headings
+ display: flex
+ align-items: baseline
&:hover
color: $colors.blue
svg
- position: absolute
- top: 0.4em
- left: -1.3em
+ flex: 0 0 auto
height: 0.625em
width: auto
+ margin-right: 0.8em
path
fill: currentColor
max-height: 90vh !important // Gives 5% top and bottom gap
overflow-y: auto // Scroll internally if content is too tall for screen
+ +below(768px)
+ padding-top: 75px
+
&-title
color: $colors.headings
font-size: 26px
{{-- TEXT MODAL LIST --}}
-<ul class="modal-list">
+<div class="modal-list-wrapper">
- {{--TODO: split into 2 cols? --}}
+ @php
+ // Split items into two list for columns
+ $columns = array_chunk($items, ceil(count($items) / 2));
+ @endphp
- @foreach ($items as $index => $item)
+ @foreach ($columns as $column)
+ <ul class="modal-list">
- @php
- $lightbox_ID = 'lightbox_'. $ID .'_'. $index; // Unique ID for lightbox content
- @endphp
+ @foreach ($column as $item)
- <li class="modal-list-item">
+ @php
+ $lightbox_ID = 'lightbox_'. $item['_id']; // Unique ID for lightbox content
+ @endphp
- <a href="#{{ $lightbox_ID }}" data-lity>
+ <li class="modal-list-item">
- @svg('arrow') {{ $item['title'] }}
+ <a href="#{{ $lightbox_ID }}" data-lity>
- {{-- Lightbox Content --}}
- <div id="{{ $lightbox_ID }}" class="lity-hide modal-list-lightbox">
+ @svg('arrow') {{ $item['title'] }}
- <h3 class="modal-list-title">{{ $item['title'] }}</h3>
+ {{-- Lightbox Content --}}
+ <div id="{{ $lightbox_ID }}" class="lity-hide modal-list-lightbox">
- <div class="modal-list-body">
- {!! $item['body'] !!}
- </div>
+ <h3 class="modal-list-title">{{ $item['title'] }}</h3>
- </div>
+ <div class="modal-list-body">
+ {!! $item['body'] !!}
+ </div>
- </a> {{-- .modal-list-item --}}
+ </div>
- </li>
+ </a> {{-- .modal-list-item --}}
+ </li>
+ @endforeach
+ </ul>
@endforeach
-</ul>
+</div>
<div class="profile-carousel elementor-slick-slider" data-slick="{{ $slick }}">
- @foreach ($items as $index => $item)
+ @foreach ($items as $item)
@php
- $lightbox_ID = 'lightbox_'. $ID .'_'. $index; // Unique ID for lightbox content
+ $lightbox_ID = 'lightbox_'. $item['_id']; // Unique ID for lightbox content
@endphp
<a href="#{{ $lightbox_ID }}" data-lity class="profile-carousel-item slick-slide">