Merge branch 'master' into buecherverleih

This commit is contained in:
SirRufusss
2023-08-03 21:08:53 +02:00
committed by GitHub
43 changed files with 3450 additions and 2987 deletions

View File

@@ -0,0 +1,98 @@
<div class="bg-21gray flex flex-col h-screen">
{{-- HEADER --}}
<livewire:frontend.header :country="null"/>
<div class="mx-auto max-w-screen-2xl px-4 py-10 sm:px-6 lg:px-8">
<div class="flex flex-col sm:flex-row">
<div>
<div class="py-6">
@if(auth()->id() == config('portal.bonus.fiat-tracker-user-id'))
<x-button icon="plus"
:href="route('library.libraryItem.form', ['country' => 'de', 'isBindle' => true])">
{{ __('Neues Bindle hochladen') }}
</x-button>
@endif
</div>
<div>
<div class="flex space-x-6">
<h1 class="text-4xl text-white py-8">Sent from my #₿indle🧡</h1>
<x-input label="{{ __('Suche') }}" wire:model.debounce="search"/>
</div>
<ul role="list"
class="grid grid-cols-1 gap-x-4 gap-y-8 md:grid-cols-3 md:gap-x-6 lg:grid-cols-4 xl:gap-x-8">
@foreach($bindles as $bindle)
<li wire:key="image_{{ $bindle->id }}">
<div>
<div
class="aspect-h-7 aspect-w-10 block w-full rounded-lg bg-gray-100">
<a target="_blank" href="{{ $bindle->getFirstMediaUrl('main') }}">
<img src="{{ $bindle->getFirstMediaUrl('main') }}" alt="{{ $bindle->name }}"
class="object-cover">
</a>
</div>
<p class="mt-2 block truncate text-md font-medium text-gray-100">{{ $bindle->name }}</p>
<p class="mt-2 block truncate text-md font-medium text-gray-100">{{ $bindle->created_at->asDate() }}</p>
<div>
@php
$url = $bindle->value;
$url = strtok($url, "?");
@endphp
<div class="text-white mt-4">{{ __('Wurde zuerst hier gepostet:') }}</div>
<div class="break-words">
<a href="{{ $url }}" target="_blank" class="text-md font-medium text-orange-400">{{ $url }}</a>
</div>
</div>
</div>
<div class="text-sm font-medium text-gray-100 py-4">
@if(auth()->id() == config('portal.bonus.fiat-tracker-user-id'))
<x-button
negative
xs
icon="trash"
label="{{ __('Delete') }}"
x-on:confirm="{
title: 'Are you sure you want to delete this bindle?',
icon: 'warning',
method: 'deleteBindle',
params: {{ $bindle->id }}
}"
/>
@endif
</div>
</li>
@endforeach
</ul>
</div>
</div>
<div class="xl:fixed xl:right-4 xl:top-24">
<div wire:ignore>
<div
class="flex flex-col justify-center text-center space-x-4 py-4 mt-4">
<h1 class="text-2xl text-gray-200">value-4-value</h1>
<div wire:ignore>
<lightning-widget
name="fiattracker"
accent="#f7931a"
to="fiattracker@current.tips"
image="https://primal.b-cdn.net/media-cache?s=m&a=1&u=https%3A%2F%2Fphoto.starbackr.com%2F6398268f7354d37fe0b31829%2Fprofile%2F1674719214461.jpg"
amounts="21,210,2100,21000"
/>
</div>
</div>
<script src="https://embed.twentyuno.net/js/app.js"></script>
</div>
</div>
</div>
</div>
</div>

View File

@@ -63,6 +63,12 @@
{{ __('Podcast Episodes') }}
</a>
<a href="{{ route('bindles', ['country' => null]) }}"
class="flex gap-x-4 py-2 text-sm font-semibold leading-6 text-gray-900">
<i class="fa-thin fa-image flex-none text-gray-400 w-6 h-5 mr-2 -ml-1"></i>
{{ __('Bindles') }}
</a>
@auth
<a href="{{ route('library.table.lecturer', ['country' => $country]) }}"
class="flex gap-x-4 py-2 text-sm font-semibold leading-6 text-gray-900">

View File

@@ -53,11 +53,13 @@
{{ __('Submit news articles') }}
</a>
<a href="{{ route('school.table.lecturer', ['country' => $country]) }}"
class="flex gap-x-4 py-2 text-sm font-semibold leading-6 text-gray-900">
<i class="fa-thin fa-list flex-none text-gray-400 w-6 h-5 mr-2 -ml-1"></i>
{{ __('Manage content creators') }}
</a>
@if($country)
<a href="{{ route('school.table.lecturer', ['country' => $country]) }}"
class="flex gap-x-4 py-2 text-sm font-semibold leading-6 text-gray-900">
<i class="fa-thin fa-list flex-none text-gray-400 w-6 h-5 mr-2 -ml-1"></i>
{{ __('Manage content creators') }}
</a>
@endif
</div>
</div>

View File

@@ -1,6 +1,6 @@
<div class="h-screen w-full">
<livewire:frontend.header :country="null"/>
<livewire:frontend.header :country="\App\Models\Country::query()->where('code', 'de')->first()"/>
<div class="px-2 sm:px-24">
<iframe allowfullscreen="true" src="https://www.easyzoom.com/embed/afa0fda48faa425eb20f323e03cae346" width="100%"

View File

@@ -39,13 +39,13 @@
wire:model="libraryItem.lecturer_id"
:searchable="true"
:async-data="[
'api' => route('api.lecturers.index'),
'method' => 'GET', // default is GET
]"
'api' => route('api.lecturers.index'),
'method' => 'GET', // default is GET
]"
:template="[
'name' => 'user-option',
'config' => ['src' => 'image']
]"
'name' => 'user-option',
'config' => ['src' => 'image']
]"
option-label="name"
option-value="id"
/>
@@ -133,38 +133,43 @@
@error('image') <span class="text-red-500">{{ $message }}</span> @enderror
</x-input.group>
<x-input.group :for="md5('libraryItem.main_image_caption')" :label="__('Main image caption')">
<x-input autocomplete="off" wire:model.debounce="libraryItem.main_image_caption"
:placeholder="__('Main image caption')"
:cornerHint="__('Ex: Photo by Timothy Vollmer/ CC BY')"/>
</x-input.group>
@if(!$isBindle)
<x-input.group :for="md5('libraryItem.main_image_caption')"
:label="__('Main image caption')">
<x-input autocomplete="off" wire:model.debounce="libraryItem.main_image_caption"
:placeholder="__('Main image caption')"
:cornerHint="__('Ex: Photo by Timothy Vollmer/ CC BY')"/>
</x-input.group>
@endif
<x-input.group :for="md5('libraryItem.name')" :label="__('Title')">
<x-input autocomplete="off" wire:model.debounce="libraryItem.name"
:placeholder="__('Title')"/>
</x-input.group>
<x-input.group :for="md5('libraryItem.subtitle')" :label="__('Subtitle')">
<x-input autocomplete="off" wire:model.debounce="libraryItem.subtitle"
:placeholder="__('Subtitle')"/>
</x-input.group>
@if(!$isBindle)
<x-input.group :for="md5('libraryItem.subtitle')" :label="__('Subtitle')">
<x-input autocomplete="off" wire:model.debounce="libraryItem.subtitle"
:placeholder="__('Subtitle')"/>
</x-input.group>
<x-input.group :for="md5('libraryItem.excerpt')" :label="__('Excerpt')">
<x-textarea autocomplete="off" wire:model.debounce="libraryItem.excerpt"
:placeholder="__('Excerpt')"/>
</x-input.group>
<x-input.group :for="md5('libraryItem.excerpt')" :label="__('Excerpt')">
<x-textarea autocomplete="off" wire:model.debounce="libraryItem.excerpt"
:placeholder="__('Excerpt')"/>
</x-input.group>
<x-input.group :for="md5('libraryItem.language_code')" :label="__('Language Code')">
<x-select
placeholder="{{ __('Choose language') }}"
wire:model="libraryItem.language_code"
:clearable="false"
:searchable="true"
:async-data="route('api.languages.index')"
option-label="name"
option-value="language"
/>
</x-input.group>
<x-input.group :for="md5('libraryItem.language_code')" :label="__('Language Code')">
<x-select
placeholder="{{ __('Choose language') }}"
wire:model="libraryItem.language_code"
:clearable="false"
:searchable="true"
:async-data="route('api.languages.index')"
option-label="name"
option-value="language"
/>
</x-input.group>
@endif
@if($libraryItem->type === App\Enums\LibraryItemType::MarkdownArticleExtern())
<x-input.group :for="md5('libraryItem.value')" :label="__('Article as Markdown')">
@@ -186,10 +191,13 @@
</x-input.group>
@endif
<x-input.group :for="md5('libraryItem.read_time')" :label="__('Time to read')">
<x-inputs.number min="1" autocomplete="off" wire:model.debounce="libraryItem.read_time"
:placeholder="__('Time to read')" :hint="__('How many minutes to read?')"/>
</x-input.group>
@if(!$isBindle)
<x-input.group :for="md5('libraryItem.read_time')" :label="__('Time to read')">
<x-inputs.number min="1" autocomplete="off" wire:model.debounce="libraryItem.read_time"
:placeholder="__('Time to read')"
:hint="__('How many minutes to read?')"/>
</x-input.group>
@endif
<x-input.group :for="md5('meetupEvent.link')" label="">
<x-button primary wire:click="save">