Refactor button display logic and add new layout file

This commit is contained in:
Julian Prieber 2024-09-19 12:53:52 +02:00
parent c428bb2ef7
commit 608abc73d7
3 changed files with 46 additions and 33 deletions

View File

@ -6,8 +6,14 @@
@foreach($links as $link) @foreach($links as $link)
@if(isset($link->custom_html) && $link->custom_html) @if(isset($link->custom_html) && $link->custom_html)
@if(isset($link->ignore_container) && $link->ignore_container)
</div></div></div>
@endif
@php setBlockAssetContext($link->type); @endphp @php setBlockAssetContext($link->type); @endphp
@include('blocks::' . $link->type . '.display', ['link' => $link, 'initial' => $initial++]) @include('blocks::' . $link->type . '.display', ['link' => $link, 'initial' => $initial++])
@if(isset($link->ignore_container) && $link->ignore_container)
<div class="container"><div class="row"><div class="column">
@endif
@else @else
@switch($link->name) @switch($link->name)
@case('icon') @case('icon')

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
@include('layouts.lang')
<head>
@include('linkstack.modules.meta')
@stack('linkstack-head')
@include('linkstack.modules.assets')
@foreach($information as $info)
@stack('linkstack-head-end')
</head>
<body>
@stack('linkstack-body-start')
@include('linkstack.modules.admin-bar')
@include('linkstack.modules.share-button')
@include('linkstack.modules.report-icon')
<div class="container">
<div class="row">
<div class="column" style="margin-top: 5%">
@include('linkstack.elements.avatar')
@include('linkstack.elements.heading')
@include('linkstack.elements.bio')
@include('linkstack.elements.icons')
@endforeach
@yield('content')
@include('linkstack.modules.footer')
</div>
</div>
</div>
@stack('linkstack-body-end')
</body>
</html>

View File

@ -1,31 +1,7 @@
<!DOCTYPE html> @extends('linkstack.layout')
@include('layouts.lang') @section('content')
<head> @push('linkstack-head-end')
@include('linkstack.modules.meta')
@include('linkstack.modules.theme') @include('linkstack.modules.theme')
@stack('linkstack-head') @endpush
@include('linkstack.modules.assets')
@foreach($information as $info)
@stack('linkstack-head-end')
</head>
<body>
@stack('linkstack-body-start')
@include('linkstack.modules.admin-bar')
@include('linkstack.modules.share-button')
@include('linkstack.modules.report-icon')
<div class="container">
<div class="row">
<div class="column" style="margin-top: 5%">
@include('linkstack.elements.avatar')
@include('linkstack.elements.heading')
@include('linkstack.elements.bio')
@include('linkstack.elements.icons')
@endforeach
@include('linkstack.elements.buttons') @include('linkstack.elements.buttons')
@include('linkstack.modules.footer') @endsection
</div>
</div>
</div>
@stack('linkstack-body-end')
</body>
</html>