Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add better support for libraries with URL item #190

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 44 additions & 39 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions resources/views/themes/zeus/sky/addons/library-item.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@
<span>{{ $item->created_at->format('Y.m/d') }}-{{ $item->created_at->format('h:i a') }}</span>
</p>

<div class="grid grid-cols-1 @if($item->getFiles()->count() > 1) sm:grid-cols-2 lg:grid-cols-3 @endif gap-2 justify-items-stretch content-stretch">
@foreach($item->getFiles() as $file)
@include($skyTheme.'.addons.library-types.'.strtolower($item->type))
@endforeach
</div>
@if($item->file_path !== null)
@include($skyTheme.'.addons.library-types.'.strtolower($item->type).'-url')
@else
<div class="grid grid-cols-1 @if($item->getFiles()->count() > 1) sm:grid-cols-2 lg:grid-cols-3 @endif gap-2 justify-items-stretch content-stretch">
@foreach($item->getFiles() as $file)
@include($skyTheme.'.addons.library-types.'.strtolower($item->type))
@endforeach
</div>
@endif
</x-filament::section>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<x-filament::button tag="a" target="_blank" href="{{ $item->file_path }}" class="my-2 mx-auto">
{{ __('Show File') }}
</x-filament::button>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<x-filament::button tag="a" target="_blank" href="{{ $file->getFullUrl() }}" class="mx-auto">
{{ __('Show File') }}
{{ $file->getFullUrl() }} {{ __('Show File') }}
</x-filament::button>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<a href="{{ $item->file_path }}" target="_blank">
<img alt="{{ $item->title }}" class="my-2 aspect-video mx-auto" src="{{ $item->file_path }}">
</a>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<video width="100%" class="w-full" controls>
<source src="{{ $item->file_path }}">
Your browser does not support HTML video.
</video>