@@ -87,7 +87,7 @@ class="origin-top-right absolute right-0 mt-2 -mr-1 w-56 rounded-md shadow-lg bg
87
87
x-transition:leave-end =" translate-x-full"
88
88
class =" w-screen max-w-md"
89
89
>
90
- <div class =" h-full flex flex-col py-6 bg-skin-card shadow-xl overflow-y-scroll" >
90
+ <div class =" h-full flex flex-col py-6 bg-skin-card shadow-xl overflow-y-scroll lg:pb-12 " >
91
91
<div class =" px-4 sm:px-6" >
92
92
<div class =" flex items-start justify-between" >
93
93
<h2 class =" text-lg font-medium text-skin-inverted" id =" slide-over-title" >
@@ -102,68 +102,72 @@ class="w-screen max-w-md"
102
102
</div >
103
103
</div >
104
104
<div class =" mt-6 relative flex-1 px-4 sm:px-6" >
105
- <div class =" absolute inset-0 px-4 sm:px-6" >
106
- <div class =" h-full" aria-hidden =" true" >
107
- <x-label for =" cover_photo" >
108
- Image de couverture
109
- </x-label >
110
- <div class =" mt-2" >
111
- <x-forms .single-upload
112
- id =" file"
113
- wire:click =" removeImage"
114
- wire:model =" file"
115
- :file =" $file"
116
- :preview =" isset($preview) ? $preview : null"
117
- :error =" $errors->first('file')"
118
- />
119
- </div >
105
+ <div class =" h-full" aria-hidden =" true" >
106
+ <x-label for =" cover_photo" >
107
+ Image de couverture
108
+ </x-label >
109
+ <div class =" mt-2" >
110
+ <x-forms .single-upload
111
+ id =" file"
112
+ wire:click =" removeImage"
113
+ wire:model =" file"
114
+ :file =" $file"
115
+ :preview =" isset($preview) ? $preview : null"
116
+ :error =" $errors->first('file')"
117
+ />
118
+ </div >
120
119
121
- <div x-data =" { on: @entangle (' show_toc' ) }" class =" mt-8 flex-grow flex items-center justify-between" >
122
- <div >
123
- <dt class =" text-sm leading-7 font-semibold text-skin-base" >Afficher le Sommaire</dt >
124
- </div >
125
- <button type =" button"
126
- class =" relative inline-flex shrink-0 h-6 w-11 border border-skin-base rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500 bg-skin-card-muted"
127
- :class =" { 'bg-green-600': on, 'bg-skin-card-muted': !(on) }"
128
- aria-pressed =" false"
129
- x-ref =" switch"
130
- x-state:on =" Enabled"
131
- x-state:off =" Not Enabled"
132
- aria-labelledby =" availability-label"
133
- :aria-pressed =" on.toString()"
134
- @click =" on = !on"
135
- >
136
- <span class =" sr-only" >{{ __ (' Afficher le sommaire' ) } } </span >
137
- <span aria-hidden =" true" class =" pointer-events-none inline-block h-5 w-5 rounded-full bg-skin-menu shadow transform ring-0 transition ease-in-out duration-200 translate-x-0" x-state:on =" Enabled" x-state:off =" Not Enabled" :class =" { 'translate-x-5': on, 'translate-x-0': !(on) }" ></span >
138
- </button >
120
+ <div x-data =" { on: @entangle (' show_toc' ) }" class =" mt-8 flex-grow flex items-center justify-between" >
121
+ <div >
122
+ <dt class =" text-sm leading-7 font-semibold text-skin-base" >Afficher le Sommaire</dt >
139
123
</div >
124
+ <button type =" button"
125
+ class =" relative inline-flex items-center shrink-0 h-6 w-11 border border-skin-base rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500 bg-skin-card-muted"
126
+ :class =" { 'bg-green-600': on, 'bg-skin-card-muted': !(on) }"
127
+ aria-pressed =" false"
128
+ x-ref =" switch"
129
+ x-state:on =" Enabled"
130
+ x-state:off =" Not Enabled"
131
+ aria-labelledby =" availability-label"
132
+ :aria-pressed =" on.toString()"
133
+ @click =" on = !on"
134
+ >
135
+ <span class =" sr-only" >{{ __ (' Afficher le sommaire' ) } } </span >
136
+ <span aria-hidden =" true" class =" pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200 translate-x-0" x-state:on =" Enabled" x-state:off =" Not Enabled" :class =" { 'translate-x-5': on, 'translate-x-0': !(on) }" ></span >
137
+ </button >
138
+ </div >
140
139
141
- @if (Auth:: user ()-> hasAnyRole ([' admin' , ' moderator' ]) )
142
- <div class =" mt-8" >
143
- <x-label for =" published_at" >Date de publication</x-label >
144
- <x-input wire:model.defer =" published_at" id =" published_at" name =" published_at" class =" mt-1" type =" date" />
145
- </div >
146
- @endif
140
+ <div class =" mt-8" >
141
+ <x-label for =" published_at" >Date de publication</x-label >
142
+ <x-datetime-picker
143
+ placeholder =" Sélectionner une date"
144
+ name =" published_at"
145
+ class =" mt-1"
146
+ wire:model.defer =" published_at"
147
+ :min =" now()->subDay()"
148
+ time-format =" 24"
149
+ without-timezone
150
+ />
151
+ </div >
147
152
148
- <div class =" mt-8" >
149
- <x-label for =" slug" >URL Slug</x-label >
150
- <x-input wire:model.debounce.500ms =" slug" id =" slug" name =" slug" class =" mt-1" type =" text" autocomplete =" off" required />
151
- </div >
153
+ <div class =" mt-8" >
154
+ <x-label for =" slug" >URL Slug</x-label >
155
+ <x-input wire:model.debounce.500ms =" slug" id =" slug" name =" slug" class =" mt-1" type =" text" autocomplete =" off" required />
156
+ </div >
152
157
153
- <div class =" mt-8" >
154
- <x-label for =" canonical_url" >Canonical URL</x-label >
155
- <span class =" text-xs leading-3 text-skin-muted" >Modifiez si l'article a été publié pour la première fois ailleurs (comme sur votre propre blog).</span >
156
- <x-input wire:model.defer =" canonical_url" id =" canonical_url" name =" canonical_url" class =" mt-1" type =" text" autocomplete =" off" required />
157
- </div >
158
+ <div class =" mt-8" >
159
+ <x-label for =" canonical_url" >Canonical URL</x-label >
160
+ <span class =" text-xs leading-3 text-skin-muted" >Modifiez si l'article a été publié pour la première fois ailleurs (comme sur votre propre blog).</span >
161
+ <x-input wire:model.defer =" canonical_url" id =" canonical_url" name =" canonical_url" class =" mt-1" type =" text" autocomplete =" off" />
162
+ </div >
158
163
159
- <div class =" mt-8 standard" wire:ignore >
160
- <x-label for =" tags_selected" >Tags</x-label >
161
- <x-forms .select wire:model =" tags_selected" id =" tags_selected" class =" mt-2" x-data =" {}" x-init =" function () { choices($el) }" multiple >
162
- @foreach ($tags as $tag )
163
- <option value =" {{ $tag -> id } }" @if (in_array ($tag -> id , $tags_selected ) ) selected @endif >{{ $tag -> name } } </option >
164
- @endforeach
165
- </x-forms .select >
166
- </div >
164
+ <div class =" mt-8 standard" wire:ignore >
165
+ <x-label for =" tags_selected" >Tags</x-label >
166
+ <x-forms .select wire:model =" tags_selected" id =" tags_selected" class =" mt-2" x-data =" {}" x-init =" function () { choices($el) }" multiple >
167
+ @foreach ($tags as $tag )
168
+ <option value =" {{ $tag -> id } }" @if (in_array ($tag -> id , $tags_selected ) ) selected @endif >{{ $tag -> name } } </option >
169
+ @endforeach
170
+ </x-forms .select >
167
171
</div >
168
172
</div >
169
173
</div >
@@ -174,7 +178,7 @@ class="relative inline-flex shrink-0 h-6 w-11 border border-skin-base rounded-fu
174
178
</div >
175
179
</div >
176
180
177
- <main class =" relative max-w-4xl mx-auto py-10 px-4 sm:px-6 lg:px-8 z-0 " >
181
+ <main class =" relative max-w-4xl mx-auto py-10 z-0 px-4 sm:px-6 lg:px-8 lg:pb-16 " >
178
182
<x-validation-errors />
179
183
180
184
@if (! isset ($article ) )
@@ -193,6 +197,9 @@ class="block w-full h-auto px-0 py-4 text-3xl sm:text-4xl font-bold placeholder-
193
197
autocomplete =" off"
194
198
/>
195
199
<livewire:markdown-x :content =" $body" />
200
+ <div class =" mt-6 text-right text-skin-base" >
201
+ Temps de lecture estimé : <span class =" text-skin-inverted" >{{ $reading_time } } min</span >
202
+ </div >
196
203
</div >
197
204
</main >
198
205
0 commit comments