diff --git a/skolehjem/app/Http/Controllers/GuidesCategoryController.php b/skolehjem/app/Http/Controllers/GuidesCategoryController.php index c42a52c..8fb7c83 100644 --- a/skolehjem/app/Http/Controllers/GuidesCategoryController.php +++ b/skolehjem/app/Http/Controllers/GuidesCategoryController.php @@ -148,4 +148,20 @@ class GuidesCategoryController extends Controller } } + + public function guideCategoryCreate(Request $request){ + $data = $request->validate([ + "guidesCategoryName" => "required", + ]); + + $category = new GuidesCategory($data); + + $categories = GuidesCategory::query()->where('guidesCategoryName', 'LIKE', $request->guidesCategoryName)->get(); + + if(count($categories) > 0 && $request->guidesCategoryName !== NULL){ + return 1; + } else { + $category->save(); + } + } } diff --git a/skolehjem/resources/sass/app/general/_sizes.scss b/skolehjem/resources/sass/app/general/_sizes.scss index c345966..9dda82a 100644 --- a/skolehjem/resources/sass/app/general/_sizes.scss +++ b/skolehjem/resources/sass/app/general/_sizes.scss @@ -65,6 +65,10 @@ a { height: 10%; } +.vh-50 { + height: 50vh; +} + .bg-sde-blue { background-color: $sde-blue; } diff --git a/skolehjem/resources/views/admin/guides/create.blade.php b/skolehjem/resources/views/admin/guides/create.blade.php index be1e59e..35fec96 100644 --- a/skolehjem/resources/views/admin/guides/create.blade.php +++ b/skolehjem/resources/views/admin/guides/create.blade.php @@ -22,6 +22,37 @@ #editor { margin-bottom: 1rem; } + .modal { + display: none; /* Hidden by default */ + position: fixed; /* Stay in place */ + z-index: 1; /* Sit on top */ + padding-top: 100px; /* Location of the box */ + left: 0; + top: 0; + width: 100%; /* Full width */ + height: 100%; /* Full height */ + overflow: auto; /* Enable scroll if needed */ + background-color: rgb(0,0,0); /* Fallback color */ + background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ + } + + /* Modal Content */ + .modal-content { + background-color: #fefefe; + margin: auto; + padding: 20px; + border: 1px solid #888; + width: 330px; + min-width: 400px; + } + + /* The Close Button */ + .close { + color: #aaaaaa; + float: right; + font-size: 28px; + font-weight: bold; + }

Opret Vejledning

@@ -30,14 +61,14 @@ -
+
- CreateOpret kategori +
For at kunne indsætte et link, skal du markere den text du vil lave som et link først. @@ -57,6 +88,16 @@ + @endsection @section("scripts") + +