Added XenForo route system and custom menu render.

This commit is contained in:
2026-05-21 13:20:16 +02:00
parent 95f0b4ff01
commit 7cd6dfddda
13 changed files with 310 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
.modal-overlay {
display: none;
display: flex;
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background-color: rgba(0, 0, 0, 0.7);

View File

@@ -19,5 +19,3 @@ window.EasyMDE = EasyMDE;
// Hashes.
window.calculateHashes = calculateHashes;

View File

@@ -11,15 +11,17 @@
<div class="menu-navigation">
<div class="menu-group">
<div class="menu-group-title">Website</div>
<a href="{{ route('home') }}"
@class(['menu-item', 'active' => request()->routeIs('home')]) >
<i data-lucide="home"></i><span>Home</span>
</a>
</div>
@foreach( config('menu') as $menu )
<div class="menu-group">
<div class="menu-group-title">{{ $menu['name'] }}</div>
@foreach( $menu['items'] as $item )
<a href="{{ isset($item['xf_route']) ? xfRoute($item['xf_route']) : route($item['route']) }}"
@class(['menu-item', 'active' => request()->routeIs( $item['route'] ?? '' )]) >
<i data-lucide="{{ $item['icon'] }}"></i><span>{{ $item['name'] }}</span>
</a>
@endforeach
</div>
@endforeach
</div>

View File

@@ -56,7 +56,7 @@
@endif
</div>
<div class="hack-actions">
<button class="btn primary">
<button class="btn primary" onclick="Livewire.dispatch('entryOpenFilesModal', { entryId: {{ $entry->id }} })">
<i data-lucide="download"></i> Download
</button>
<button class="btn">
@@ -94,4 +94,5 @@
@endif
</div>
</article>
@livewire('entry-files-modal')
@endsection

View File

@@ -7,4 +7,6 @@
Ceci est un block !
</div>
<x-error-block error-type="page-not-allowed" />
{{ xfRoute( 'profile-posts.comments', ['profile_post_comment_id' => 1] ) }}
@endsection

View File

@@ -0,0 +1,33 @@
<div class="modal-overlay"
x-data
x-cloak
x-show="$wire.open"
x-transition.opacity
@click.self="$wire.close()"
@keydown.escape.window="$wire.close()"
@modal:opened.window="refreshIcons($el)"
>
<div class="modal-window" x-transition x-show="$wire.open">
<div class="modal-header">
<span class="modal-title">Download files</span>
<button type="button" class="modal-close" @click="$wire.close()">
<i data-lucide="x" size="20"></i>
</button>
</div>
<div class="modal-body">
<div class="file-list">
@forelse( $files as $file )
<div class="file-item">
<div class="file-info">
<span class="file-name">{{ $file->filename }}</span>
<span class="file-meta">{{ $file->filesize }} - 0 downloads</span>
</div>
<a href="{{ route('fs.download', ['entry_id' => $entryId, 'file' => $file->file_uuid] ) }}" class="btn primary"><i data-lucide="download"></i> Download</a>
</div>
@empty
No files found
@endforelse
</div>
</div>
</div>
</div>