Compare commits

...
2 Commits
Author SHA1 Message Date
NH Gooi 58ea5c0c85 iframe blocktype toegevoegd [#00033] 2024-10-03 19:32:44 +02:00
NH Gooi 8616cb3d56 Relatieve links gefixt in Lees Ook blok 2024-10-03 19:22:25 +02:00
2 changed files with 23 additions and 1 deletions

No files matched your search

+5
View File
@@ -1669,4 +1669,9 @@ a, a:hover, a:active {
padding: 0.4rem; padding: 0.4rem;
} }
.article-iframe {
width: 100%;
aspect-ratio: 1;
}
/*# sourceMappingURL=style.css.map */ /*# sourceMappingURL=style.css.map */
+18 -1
View File
@@ -121,7 +121,7 @@
<div class="col-4"> <div class="col-4">
<a href="{{ route('nieuws.detail', ['id' => $article->id, 'title' => $article->slug]) }}" <a href="{{ route('nieuws.detail', ['id' => $article->id, 'title' => $article->slug]) }}"
title="{{ $article->title }}"> title="{{ $article->title }}">
<img src="{{ $article->image }}" alt="{{ $article->image_title }}"> <img src="{{ $article->image[0] == '/' ? '' : '/' }}{{ $article->image }}" alt="{{ $article->image_title }}">
</a> </a>
</div> </div>
@endif @endif
@@ -140,5 +140,22 @@
</ul> </ul>
</div> </div>
</div> </div>
@elseif($block->type == 'iframe')
<iframe src="{{ $block->url }}" class="article-iframe" id="{{ $id = uniqid('iframe_') }}"></iframe>
<style>
@if(isset($block->ratio))
#{{ $id }}.article-iframe {
aspect-ratio: {{ str_replace(":", "/", $block->ratio) }};
}
@endif
@if(isset($block->ratioMobile))
@media (max-width: 768px) {
#{{ $id }}.article-iframe {
aspect-ratio: {{ str_replace(":", "/", $block->ratioMobile) }};
}
}
@endif
</style>
@endif @endif
@endforeach @endforeach