2020-08-04 11:21:23 +00:00
|
|
|
@extends("admin.layout.base")
|
|
|
|
@extends("admin.layout.header")
|
|
|
|
|
|
|
|
@section("title")
|
|
|
|
Opret Vejledning
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section("path")
|
|
|
|
<a href="{{ route('guides.create') }}" class="text-white">Opret Vejledning</a> /
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section("content")
|
|
|
|
<style>
|
|
|
|
.ck-editor__main {
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
}
|
2020-08-07 07:47:23 +00:00
|
|
|
.toggle__label::before, .toggle__label::after {
|
|
|
|
border-color: black;
|
|
|
|
}
|
|
|
|
.toggle__text::before {
|
|
|
|
border-color: black;
|
|
|
|
}
|
2020-08-04 11:21:23 +00:00
|
|
|
</style>
|
|
|
|
<script src="https://cdn.ckeditor.com/ckeditor5/21.0.0/classic/ckeditor.js"></script>
|
|
|
|
<h1>Opret Vejledning</h1>
|
|
|
|
<form method="post" action="{{ route("guides.store") }}">
|
|
|
|
@csrf
|
|
|
|
<label for="title">Titel på guiden</label>
|
|
|
|
<input type="text" name="name" id="title" required>
|
2020-08-04 11:37:06 +00:00
|
|
|
<textarea name="guide_articles" id="editor"></textarea>
|
2020-08-07 07:47:23 +00:00
|
|
|
<label class="toggle">
|
|
|
|
<input class="toggle__input" type="checkbox" name="newsoption">
|
|
|
|
<span class="toggle__label">
|
|
|
|
<span class="toggle__text">Opret som nyhed</span>
|
|
|
|
</span>
|
|
|
|
</label>
|
2020-08-04 11:21:23 +00:00
|
|
|
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
ClassicEditor
|
2020-08-05 12:59:41 +00:00
|
|
|
.create( document.querySelector( '#editor' ) )
|
|
|
|
.then( editor => {
|
|
|
|
console.log( editor );
|
2020-08-04 11:21:23 +00:00
|
|
|
} )
|
|
|
|
.catch( error => {
|
2020-08-05 12:59:41 +00:00
|
|
|
console.error( error );
|
2020-08-04 11:21:23 +00:00
|
|
|
} );
|
|
|
|
</script>
|
|
|
|
|
|
|
|
@endsection
|