updates from most recent website build
This commit is contained in:
0
resources/views/blocks/bad-example.blade.php
Normal file
0
resources/views/blocks/bad-example.blade.php
Normal file
15
resources/views/components/image.blade.php
Normal file
15
resources/views/components/image.blade.php
Normal file
@@ -0,0 +1,15 @@
|
||||
@php($image = wp_get_attachment_image_src(@$id, 'medium'))
|
||||
|
||||
<img
|
||||
@if(@$lazy)
|
||||
src="{{ wp_get_attachment_image_src($id, 'lazy')[0] }}"
|
||||
data-src="{{ $image[0] }}"
|
||||
class="lazy"
|
||||
@else
|
||||
src="{{ $image[0] }}"
|
||||
@endif
|
||||
|
||||
alt="{{ get_post_meta( $id, '_wp_attachment_image_alt', true ) }}"
|
||||
width="{{ $image[1] }}"
|
||||
height="{{ $image[2] }}"
|
||||
/>
|
||||
12
resources/views/components/socials.blade.php
Normal file
12
resources/views/components/socials.blade.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<ul class="socials nolist">
|
||||
@foreach($socials as $social)
|
||||
<li>
|
||||
<a
|
||||
class="fa-brands fa-{{ get_field('fontawesome_brands', $social) }}"
|
||||
href="{{ get_field('url', $social) }}"
|
||||
rel="noopener nofollow noreferrer"
|
||||
target="_blank"
|
||||
><span class="visually-hidden">{{ get_the_title($social) }}</span></a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
34
resources/views/layouts/block.blade.php
Normal file
34
resources/views/layouts/block.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<section id="{{ $block['id'] }}" class="{{ implode(' ', $data['section_classes']) }} {{ @$block['className'] }}">
|
||||
@if(@$data['heading'] || @$data['blurb'])
|
||||
<div class="section-intro container container-narrow align-centre wysiwyg bg-watermarked-content {{ @$data['knockout'] }}">
|
||||
<h2>{{ @$data['heading'] }}</h2>
|
||||
@include('components.divider')
|
||||
<p>{{ @$data['blurb'] }}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="section container container-large block-content bg-watermarked-content">
|
||||
@yield('block-content')
|
||||
</div>
|
||||
|
||||
@if(@$data['links'])
|
||||
<div class="section-footer container container-narrow align-centre wysiwyg bg-watermarked-content {{ @$data['knockout'] }}">
|
||||
<div class="button-wrap">
|
||||
@foreach($data['links'] as $link)
|
||||
@include('components.button', $link)
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(@$data['bg_image'])
|
||||
<div class="bg-watermarked-image" style="opacity: {!! (@$data['bg_opacity'] ?: 30) * 0.01 !!}">
|
||||
{!! $ImageSrcset->render([
|
||||
'image' => $data['bg_image'],
|
||||
'name' => 'hero',
|
||||
'lazy' => true,
|
||||
]) !!}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</section>
|
||||
Reference in New Issue
Block a user