Skip to content

Commit

Permalink
Change create post layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
hackedhorizon committed Sep 30, 2024
1 parent 82be2bb commit f6cd0ea
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions resources/views/livewire/admin-panel/post-create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'autoresize advlist link image lists anchor autolink charmap codesample emoticons media searchreplace table visualblocks wordcount',
'statusbar' => true,
'toolbar' =>
'undo redo | quickimage quicktable undo redo | blocks fontfamily fontsize | bold italic underline strikethrough | link image media table | align lineheight | numlist bullist indent outdent | emoticons charmap | removeformat',
'undo redo | quickimage quicktable | blocks fontfamily fontsize | bold italic underline strikethrough | link image media table | align lineheight | numlist bullist indent outdent | emoticons charmap | removeformat',
'quickbars_selection_toolbar' => 'bold italic link',
'menubar' => 'file edit view',
'resize' => true,
Expand All @@ -13,41 +13,41 @@
];
@endphp

<div>
<h2 class="py-5 text-xl font-semibold">{{ __('posts.Create Article') }}</h2>
<div class="w-full max-w-4xl min-h-screen p-6 mx-auto my-4 rounded-lg shadow-md md:min-h-fit bg-surface-300">
<h2 class="mb-5 text-2xl font-semibold text-center">{{ __('posts.Create Article') }}</h2>

<x-form wire:submit.prevent="createPost" class="grid gap-6 p-6 rounded-sm bg-surface-300 lg:grid-cols-2">
<div class="flex flex-col gap-5">
<x-form wire:submit.prevent="createPost" class="space-y-6">
<div class="space-y-4">
<x-input label="{{ __('posts.Title') }}" wire:model.blur="title" placeholder="{{ __('posts.Title') }}"
clearable class="w-full" />
<x-editor label="{{ __('posts.Content') }}" :config="$config" wire:model.defer="content"
class="w-full h-64" />
class="w-full h-64 border rounded-lg" />
</div>

<div class="flex flex-col gap-5">
<x-toggle label="{{ __('Featured') }}" wire:model.live="featured" right />
<x-toggle label="{{ __('posts.Auto translate') }}" wire:model.live="autoTranslate" right />
<div class="grid grid-cols-1 gap-6 ">
<x-toggle label="{{ __('Featured') }}" wire:model.live="featured" />
<x-toggle label="{{ __('posts.Auto translate') }}" wire:model.live="autoTranslate" />

@if (!$autoTranslate)
<x-choices label="{{ __('posts.Select languages for translation') }}" wire:model="selectedLanguages"
:options="$languages" option-label="label" option-value="value" multiple />
:options="$languages" option-label="label" multiple compact allow-all option-value="value" multiple />
@endif

<x-toggle label="{{ __('posts.Publish now') }}" wire:model.live="published" right />
<x-toggle label="{{ __('posts.Publish now') }}" wire:model.live="published" />

@if (!$published)
@php
$config1 = ['dateFormat' => 'Y-m-d H:i', 'enableTime' => 'true', 'time_24hr' => 'true'];
$config1 = ['dateFormat' => 'Y-m-d H:i', 'enableTime' => true, 'time_24hr' => true];
@endphp
<x-datepicker label="{{ __('posts.Publish at a specific time') }}" wire:model="publicationDate"
icon="o-calendar" :config="$config1" />
@endif

<x-choices label="{{ __('posts.Select categories') }}" wire:model="selectedCategories" :options="$categories"
option-label="label" option-value="value" multiple />
option-label="label" option-value="value" multiple compact allow-all />
</div>

<div class="flex justify-end col-span-full">
<div class="flex justify-end">
<x-button class="mt-5 btn-success bg-surface-300 text-lime-main hover:bg-surface-500 w-fit" type="submit"
spinner="createPost" label="{{ __('Create') }}" />
</div>
Expand Down

0 comments on commit f6cd0ea

Please sign in to comment.