v0.5.5 - Added news on the admin panel
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
@extends("admin.layout.base")
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Opret Nyheder
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('news.create') }}" class="text-white">Opret Nyheder</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<style>
|
||||
.ck-editor__main {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
</style>
|
||||
<script src="https://cdn.ckeditor.com/ckeditor5/21.0.0/classic/ckeditor.js"></script>
|
||||
<h1>Opret Nyhed</h1>
|
||||
<form method="post" action="{{ route("news.store") }}">
|
||||
@csrf
|
||||
<label for="title">Titel på nyheden:</label>
|
||||
<input type="text" name="name" id="title" placeholder="OBS: Menuplanen er ændret" required>
|
||||
<textarea name="content" id="editor"></textarea>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
ClassicEditor
|
||||
.create( document.querySelector( '#editor' ) )
|
||||
.then( editor => {
|
||||
console.log( editor );
|
||||
} )
|
||||
.catch( error => {
|
||||
console.error( error );
|
||||
} );
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
Reference in New Issue
Block a user