diff --git a/.idea/php.xml b/.idea/php.xml
index 8c7b72c..ea2c04b 100644
--- a/.idea/php.xml
+++ b/.idea/php.xml
@@ -116,6 +116,9 @@
+
+
+
diff --git a/.idea/skolehjem-webapp.iml b/.idea/skolehjem-webapp.iml
index 6b38422..924e151 100644
--- a/.idea/skolehjem-webapp.iml
+++ b/.idea/skolehjem-webapp.iml
@@ -28,6 +28,8 @@
+
+
@@ -39,6 +41,7 @@
+
diff --git a/skolehjem/app/Event.php b/skolehjem/app/Event.php
index 64fb4c2..7ccc3ac 100644
--- a/skolehjem/app/Event.php
+++ b/skolehjem/app/Event.php
@@ -6,5 +6,12 @@ use Illuminate\Database\Eloquent\Model;
class Event extends Model
{
- //
+ /**
+ * The attributes that are mass assignable.
+ *
+ * @var array
+ */
+ protected $fillable = [
+ "name", "description"
+ ];
}
diff --git a/skolehjem/app/ExternalLink.php b/skolehjem/app/ExternalLink.php
index 63ffc06..02745fa 100644
--- a/skolehjem/app/ExternalLink.php
+++ b/skolehjem/app/ExternalLink.php
@@ -6,5 +6,12 @@ use Illuminate\Database\Eloquent\Model;
class ExternalLink extends Model
{
- //
+ /**
+ * The attributes that are mass assignable.
+ *
+ * @var array
+ */
+ protected $fillable = [
+ 'name', "link"
+ ];
}
diff --git a/skolehjem/app/Helpers/Detector.php b/skolehjem/app/Helpers/Detector.php
new file mode 100644
index 0000000..6b9481d
--- /dev/null
+++ b/skolehjem/app/Helpers/Detector.php
@@ -0,0 +1,22 @@
+isMobile()) {
+ return view(config("detector.mobilePath") . "." . $viewName, $args);
+ }
+ return view(config("detector.defaultPath") . "." . $viewName, $args);
+ }
+}
diff --git a/skolehjem/app/Http/Controllers/CalendarDateController.php b/skolehjem/app/Http/Controllers/CalendarDateController.php
index f47373f..e32daba 100644
--- a/skolehjem/app/Http/Controllers/CalendarDateController.php
+++ b/skolehjem/app/Http/Controllers/CalendarDateController.php
@@ -1,84 +1,95 @@
paginate($request->input("limit", 20));
+//
+// return view("calendar-date.index", [
+// "calendarDates" => $calendarDates
+// ]);
+// }
+//
+// /**
+// * Show the form for creating a new resource.
+// *
+// * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
+// */
+// public function create()
+// {
+// return view("calendar-date.create");
+// }
+//
+// /**
+// * Store a newly created resource in storage.
+// *
+// * @param \Illuminate\Http\Request $request
+// * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
+// */
+// public function store(Request $request)
+// {
+// $fields = $request->validate([
+// "" => ""
+// ]);
+//
+// $calendarDate = new CalendarDate()
+//
+// return view("calendar-date.store");
+// }
+//
+// /**
+// * Display the specified resource.
+// *
+// * @param int $id
+// * @return \Illuminate\Http\Response
+// */
+// public function show($id)
+// {
+// //
+// }
+//
+// /**
+// * Show the form for editing the specified resource.
+// *
+// * @param int $id
+// * @return \Illuminate\Http\Response
+// */
+// public function edit($id)
+// {
+// //
+// }
+//
+// /**
+// * Update the specified resource in storage.
+// *
+// * @param \Illuminate\Http\Request $request
+// * @param int $id
+// * @return \Illuminate\Http\Response
+// */
+// public function update(Request $request, $id)
+// {
+// //
+// }
+//
+// /**
+// * Remove the specified resource from storage.
+// *
+// * @param int $id
+// * @return \Illuminate\Http\Response
+// */
+// public function destroy($id)
+// {
+// //
+// }
+//}
diff --git a/skolehjem/app/Http/Controllers/EventController.php b/skolehjem/app/Http/Controllers/EventController.php
index 881efd2..95e95b5 100644
--- a/skolehjem/app/Http/Controllers/EventController.php
+++ b/skolehjem/app/Http/Controllers/EventController.php
@@ -2,6 +2,7 @@
namespace App\Http\Controllers;
+use App\Event;
use App\User;
use Illuminate\Http\Request;
@@ -10,56 +11,65 @@ class EventController extends Controller
/**
* Display a listing of the resource..
*
- * @return \Illuminate\Http\Response
+ * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function index(Request $request)
{
- $users = User::query()->paginate($request->query("limit", 20));
+ $events = Event::query()->paginate($request->input("limit", 20));
- return view("user.index", [ "users" => $users]);
+ return Response::detect("admin.events.index", [ "events" => $events]);
}
/**
* Show the form for creating a new resource.
*
- * @return \Illuminate\Http\Response
+ * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function create()
{
- return view("user.create");
+ return Response::detect("admin.events.create");
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
- * @return \Illuminate\Http\Response
+ * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function store(Request $request)
{
- //
+ $requestBody = $request->validate([
+ "name" => "required|unique:events|max:255",
+ "description" => "required|max:255"
+ ]);
+
+ $event = new Event($requestBody);
+
+ $event->save();
+
+ return Response::detect("admin.events.store");
}
/**
* Display the specified resource.
*
- * @param int $id
- * @return \Illuminate\Http\Response
+ * @param Event $id
+ * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
- public function show($id)
+ public function show(Event $id)
{
- //
+ return Response::detect("admin.events.show", [ "event" => $id ]);
}
/**
* Show the form for editing the specified resource.-
*
* @param int $id
- * @return \Illuminate\Http\Response
+ * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
- public function edit($id)
+ public function edit(Event $id)
{
- //
+ return Response::detect("admin.events.edit", [ "event" => $id ]);
}
/**
@@ -67,21 +77,32 @@ class EventController extends Controller
*
* @param \Illuminate\Http\Request $request
* @param int $id
- * @return \Illuminate\Http\Response
+ * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
- public function update(Request $request, $id)
+ public function update(Request $request, Event $id)
{
- //
+ $requestBody = $request->validate([
+ "name" => "unique:events|max:255",
+ "description" => "max:255"
+ ]);
+
+ $id->update($requestBody);
+ $id->save();
+
+ return Response::detect("admin.events.update");
}
/**
* Remove the specified resource from storage.
*
- * @param int $id
- * @return \Illuminate\Http\Response
+ * @param Event $id
+ * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
+ * @throws \Exception
*/
- public function destroy($id)
+ public function destroy(Event $id)
{
- //
+ $id->delete();
+
+ return Response::detect("admin.events.destroy");
}
}
diff --git a/skolehjem/app/Http/Controllers/ExternalLinkController.php b/skolehjem/app/Http/Controllers/ExternalLinkController.php
index 1a71828..2e028d1 100644
--- a/skolehjem/app/Http/Controllers/ExternalLinkController.php
+++ b/skolehjem/app/Http/Controllers/ExternalLinkController.php
@@ -2,6 +2,7 @@
namespace App\Http\Controllers;
+use App\ExternalLink;
use Illuminate\Http\Request;
class ExternalLinkController extends Controller
@@ -9,32 +10,43 @@ class ExternalLinkController extends Controller
/**
* Display a listing of the resource.
*
- * @return \Illuminate\Http\Response
+ * @param Request $request
+ * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
- public function index()
+ public function index(Request $request)
{
- //
+ $externalLink = ExternalLink::query()->paginate($request->input("limit", 20));
+
+ return Response::detect("external-links.index", [ "externalLink" => $externalLink ]);
}
/**
* Show the form for creating a new resource.
*
- * @return \Illuminate\Http\Response
+ * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function create()
{
- //
+ return Response::detect("external-links.create");
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
- * @return \Illuminate\Http\Response
+ * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function store(Request $request)
{
- //
+ $requestBody = $request->validate([
+ "name" => "required|max:255",
+ "link" => "required|max:255"
+ ]);
+
+ $externalLink = new ExternalLink($requestBody);
+ $externalLink->save();
+
+ return Response::detect("external-links.store");
}
/**
diff --git a/skolehjem/app/Http/Controllers/RootController.php b/skolehjem/app/Http/Controllers/RootController.php
index 72ae39c..0f3916e 100644
--- a/skolehjem/app/Http/Controllers/RootController.php
+++ b/skolehjem/app/Http/Controllers/RootController.php
@@ -7,6 +7,6 @@ use Illuminate\Http\Request;
class RootController extends Controller
{
public function index() {
- return view("index");
+ return Response::detect("index");
}
}
diff --git a/skolehjem/app/Http/Controllers/UserController.php b/skolehjem/app/Http/Controllers/UserController.php
index d7126a2..c1a2fc1 100644
--- a/skolehjem/app/Http/Controllers/UserController.php
+++ b/skolehjem/app/Http/Controllers/UserController.php
@@ -2,9 +2,12 @@
namespace App\Http\Controllers;
+use App\Helpers\Detector;
use Illuminate\Http\Request;
+use Illuminate\Http\Response;
use App\User;
use Illuminate\Support\Facades\Auth;
+use Illuminate\Support\Facades\Log;
class UserController extends Controller
@@ -28,9 +31,9 @@ class UserController extends Controller
*/
public function index(Request $request)
{
- $users = User::query()->paginate($request->query("page", 1));
+ $users = User::query()->paginate($request->query("page", 20));
- return view("admin.user.index", [ "users" => $users ]);
+ return Response::detect("users.index", [ "users" => $users ]);
}
/**
@@ -40,7 +43,7 @@ class UserController extends Controller
*/
public function create()
{
- return view("admin.user.create");
+ return Response::detect("admin.users.create");
}
/**
@@ -51,6 +54,8 @@ class UserController extends Controller
*/
public function store(Request $request)
{
+ Log::debug("STORE FUNCTION");
+
$data = $request->validate([
"name_first" => "required|max:255",
"name_last" => "required|max:255",
@@ -60,10 +65,17 @@ class UserController extends Controller
]);
+ Log::debug("FINISHED VALIDATION?");
+
$user = new User($data);
+
+ Log::debug("CREATED USER [NOT PERSISTED YET]");
+
$user->save();
- return view("admin.user.store");
+ Log::debug("SAVED USER");
+
+ return view("admin.users.store");
}
/**
@@ -76,7 +88,7 @@ class UserController extends Controller
{
$user = User::find($id);
- return view("admin.user.show", [
+ return Respone::detect("admin.users.show", [
"user" => $user
]);
}
@@ -91,7 +103,7 @@ class UserController extends Controller
{
$user = User::find($id);
- return view("admin.user.edit", [
+ return Response::detect("admin.users.edit", [
"user" => $user
]);
}
@@ -130,7 +142,7 @@ class UserController extends Controller
$user->save();
}
- return view("admin.user.edit", [
+ return Response::detect("admin.users.edit", [
"user" => $user
]);
}
@@ -153,7 +165,7 @@ class UserController extends Controller
$user->delete();
}
- return view("admin.user.delete");
+ return view("admin.users.delete");
}
/*******************************************/
@@ -161,7 +173,7 @@ class UserController extends Controller
/*******************************************/
public function showLogin() {
- return view("admin.user.login");
+ return view("admin.users.login");
}
public function login(Request $request) {
@@ -169,7 +181,7 @@ class UserController extends Controller
if(Auth::attempt($data)) {
//TODO: Implement home?
- return view("admin.user.home", [ "user" => Auth::user() ]);
+ return redirect()->route("users.index");
}
return redirect()->back(303);
diff --git a/skolehjem/app/Http/Controllers/WashingMachineController.php b/skolehjem/app/Http/Controllers/WashingMachineController.php
index f39aca5..b45d23c 100644
--- a/skolehjem/app/Http/Controllers/WashingMachineController.php
+++ b/skolehjem/app/Http/Controllers/WashingMachineController.php
@@ -18,7 +18,7 @@ class WashingMachineController extends Controller
{
$machines = WashingMachine::query()->paginate($request->query("page", 1));
- return view("washing-machine.index", [ "machines" => $machines ]);
+ return Response::detect("admin.washing-machines.index", [ "machines" => $machines ]);
}
/**
@@ -28,7 +28,7 @@ class WashingMachineController extends Controller
*/
public function create()
{
- return view("washing-machine.create");
+ return Response::detect("admin.washing-machines.create");
}
/**
@@ -46,7 +46,7 @@ class WashingMachineController extends Controller
$machine = new WashingMachine($data);
$machine->save();
- return view("washing-machine.store");
+ return Response::detect("admin.washing-machines.store");
}
/**
@@ -59,7 +59,7 @@ class WashingMachineController extends Controller
{
$machine = WashingMachine::find($id);
- return view("washing-machine.show", [
+ return Response::detect("admin.washing-machines.show", [
"machine" => $machine
]);
}
@@ -74,7 +74,7 @@ class WashingMachineController extends Controller
{
$machine = WashingMachine::find($id);
- return view("washing-machine.edit", [
+ return Response::detect("admin.washing-machines.edit", [
"machine" => $machine
]);
}
@@ -98,7 +98,7 @@ class WashingMachineController extends Controller
$machine->save();
- return view("washing-machine.edit", [
+ return Response::detect("admin.washing-machines.edit", [
"machine" => $machine
]);
}
@@ -114,6 +114,6 @@ class WashingMachineController extends Controller
$machine = WashingMachine::find($id);
$machine->delete();
- return view("washing-machine.destroy");
+ return Response::detect("admin.washing-machines.destroy");
}
}
diff --git a/skolehjem/app/Http/Controllers/WashingReservationController.php b/skolehjem/app/Http/Controllers/WashingReservationController.php
index 23ee6ee..6e30fce 100644
--- a/skolehjem/app/Http/Controllers/WashingReservationController.php
+++ b/skolehjem/app/Http/Controllers/WashingReservationController.php
@@ -17,7 +17,7 @@ class WashingReservationController extends Controller
{
$reservations = WashingReservation::query()->paginate($request->query("page", 1));
- return view("washing-reservation.index");
+ return Response::detect("washing-reservation.index");
}
/**
@@ -27,7 +27,7 @@ class WashingReservationController extends Controller
*/
public function create()
{
- return view("washing-reservation.create");
+ return Response::detect("washing-reservation.create");
}
/**
@@ -45,7 +45,7 @@ class WashingReservationController extends Controller
$machineReservation = new WashingReservation($data);
$machineReservation->save();
- return view("washing-reservation.store");
+ return Response::detect("washing-reservation.store");
}
/**
@@ -58,7 +58,7 @@ class WashingReservationController extends Controller
{
$machineReservation = WashingReservation::find($id);
- return view("washing-reservation.show", [
+ return Response::detect("washing-reservation.show", [
"machineReservation" => $machineReservation
]);
}
@@ -71,7 +71,7 @@ class WashingReservationController extends Controller
*/
public function edit($id)
{
- return view("washing-reservation.edit");
+ return Response::detect("washing-reservation.edit");
}
/**
@@ -93,7 +93,7 @@ class WashingReservationController extends Controller
$machineReservation->save();
- return view("washing-reservation.edit", [
+ return Response::detect("washing-reservation.edit", [
"washingReservation" => $machineReservation
]);
}
@@ -109,6 +109,6 @@ class WashingReservationController extends Controller
$machineReservation = WashingReservation::find($id);
$machineReservation->delete();
- return view("washing-reservation.delete");
+ return Response::detect("washing-reservation.delete");
}
}
diff --git a/skolehjem/app/Providers/DetectorServiceProvider.php b/skolehjem/app/Providers/DetectorServiceProvider.php
new file mode 100644
index 0000000..159fad5
--- /dev/null
+++ b/skolehjem/app/Providers/DetectorServiceProvider.php
@@ -0,0 +1,35 @@
+ 'datetime',
];
+
+ public function setPasswordAttribute($password) {
+ $this->attributes["password"] = Hash::make($password);
+ }
}
diff --git a/skolehjem/composer.json b/skolehjem/composer.json
index 3e766ed..c6162f5 100644
--- a/skolehjem/composer.json
+++ b/skolehjem/composer.json
@@ -12,6 +12,7 @@
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^1.0",
"guzzlehttp/guzzle": "^6.3",
+ "jenssegers/agent": "^2.6",
"laravel/framework": "^7.0",
"laravel/tinker": "^2.0",
"laravel/ui": "^2.0",
diff --git a/skolehjem/composer.lock b/skolehjem/composer.lock
index 1674d3c..7eb5d9d 100644
--- a/skolehjem/composer.lock
+++ b/skolehjem/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "b3303d351cc84815ab8de6cb27db9490",
+ "content-hash": "8fa0914e6a247cbd0973c01078549d45",
"packages": [
{
"name": "asm89/stack-cors",
@@ -102,12 +102,6 @@
"brick",
"math"
],
- "funding": [
- {
- "url": "https://tidelift.com/funding/github/packagist/brick/math",
- "type": "tidelift"
- }
- ],
"time": "2020-04-15T15:59:35+00:00"
},
{
@@ -218,20 +212,6 @@
"uppercase",
"words"
],
- "funding": [
- {
- "url": "https://www.doctrine-project.org/sponsorship.html",
- "type": "custom"
- },
- {
- "url": "https://www.patreon.com/phpdoctrine",
- "type": "patreon"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector",
- "type": "tidelift"
- }
- ],
"time": "2020-05-29T15:13:26+00:00"
},
{
@@ -294,20 +274,6 @@
"parser",
"php"
],
- "funding": [
- {
- "url": "https://www.doctrine-project.org/sponsorship.html",
- "type": "custom"
- },
- {
- "url": "https://www.patreon.com/phpdoctrine",
- "type": "patreon"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer",
- "type": "tidelift"
- }
- ],
"time": "2020-05-25T17:44:05+00:00"
},
{
@@ -542,12 +508,6 @@
"crossdomain",
"laravel"
],
- "funding": [
- {
- "url": "https://github.com/barryvdh",
- "type": "github"
- }
- ],
"time": "2020-04-28T08:47:37+00:00"
},
{
@@ -739,6 +699,124 @@
],
"time": "2019-07-01T23:21:34+00:00"
},
+ {
+ "name": "jaybizzle/crawler-detect",
+ "version": "v1.2.96",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/JayBizzle/Crawler-Detect.git",
+ "reference": "5a53c78644c54a628c3f5ead915c35b489c92239"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/5a53c78644c54a628c3f5ead915c35b489c92239",
+ "reference": "5a53c78644c54a628c3f5ead915c35b489c92239",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8|^5.5|^6.5",
+ "satooshi/php-coveralls": "1.*"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Jaybizzle\\CrawlerDetect\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Mark Beech",
+ "email": "m@rkbee.ch",
+ "role": "Developer"
+ }
+ ],
+ "description": "CrawlerDetect is a PHP class for detecting bots/crawlers/spiders via the user agent",
+ "homepage": "https://github.com/JayBizzle/Crawler-Detect/",
+ "keywords": [
+ "crawler",
+ "crawler detect",
+ "crawler detector",
+ "crawlerdetect",
+ "php crawler detect"
+ ],
+ "time": "2020-06-14T20:37:24+00:00"
+ },
+ {
+ "name": "jenssegers/agent",
+ "version": "v2.6.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/jenssegers/agent.git",
+ "reference": "daa11c43729510b3700bc34d414664966b03bffe"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/jenssegers/agent/zipball/daa11c43729510b3700bc34d414664966b03bffe",
+ "reference": "daa11c43729510b3700bc34d414664966b03bffe",
+ "shasum": ""
+ },
+ "require": {
+ "jaybizzle/crawler-detect": "^1.2",
+ "mobiledetect/mobiledetectlib": "^2.7.6",
+ "php": ">=5.6"
+ },
+ "require-dev": {
+ "php-coveralls/php-coveralls": "^2.1",
+ "phpunit/phpunit": "^5.0|^6.0|^7.0"
+ },
+ "suggest": {
+ "illuminate/support": "Required for laravel service providers"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0-dev"
+ },
+ "laravel": {
+ "providers": [
+ "Jenssegers\\Agent\\AgentServiceProvider"
+ ],
+ "aliases": {
+ "Agent": "Jenssegers\\Agent\\Facades\\Agent"
+ }
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Jenssegers\\Agent\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jens Segers",
+ "homepage": "https://jenssegers.com"
+ }
+ ],
+ "description": "Desktop/mobile user agent parser with support for Laravel, based on Mobiledetect",
+ "homepage": "https://github.com/jenssegers/agent",
+ "keywords": [
+ "Agent",
+ "browser",
+ "desktop",
+ "laravel",
+ "mobile",
+ "platform",
+ "user agent",
+ "useragent"
+ ],
+ "time": "2020-06-13T08:05:20+00:00"
+ },
{
"name": "laravel/framework",
"version": "v7.14.1",
@@ -1086,32 +1164,6 @@
"md",
"parser"
],
- "funding": [
- {
- "url": "https://enjoy.gitstore.app/repositories/thephpleague/commonmark",
- "type": "custom"
- },
- {
- "url": "https://www.colinodell.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://www.paypal.me/colinpodell/10.00",
- "type": "custom"
- },
- {
- "url": "https://github.com/colinodell",
- "type": "github"
- },
- {
- "url": "https://www.patreon.com/colinodell",
- "type": "patreon"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/league/commonmark",
- "type": "tidelift"
- }
- ],
"time": "2020-05-04T22:15:21+00:00"
},
{
@@ -1196,13 +1248,59 @@
"sftp",
"storage"
],
- "funding": [
+ "time": "2020-05-18T15:13:39+00:00"
+ },
+ {
+ "name": "mobiledetect/mobiledetectlib",
+ "version": "2.8.34",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/serbanghita/Mobile-Detect.git",
+ "reference": "6f8113f57a508494ca36acbcfa2dc2d923c7ed5b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/6f8113f57a508494ca36acbcfa2dc2d923c7ed5b",
+ "reference": "6f8113f57a508494ca36acbcfa2dc2d923c7ed5b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.0.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.8.35||~5.7"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "Mobile_Detect.php"
+ ],
+ "psr-0": {
+ "Detection": "namespaced/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
{
- "url": "https://offset.earth/frankdejonge",
- "type": "other"
+ "name": "Serban Ghita",
+ "email": "serbanghita@gmail.com",
+ "homepage": "http://mobiledetect.net",
+ "role": "Developer"
}
],
- "time": "2020-05-18T15:13:39+00:00"
+ "description": "Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.",
+ "homepage": "https://github.com/serbanghita/Mobile-Detect",
+ "keywords": [
+ "detect mobile devices",
+ "mobile",
+ "mobile detect",
+ "mobile detector",
+ "php mobile detect"
+ ],
+ "time": "2019-09-18T18:44:20+00:00"
},
{
"name": "monolog/monolog",
@@ -1283,16 +1381,6 @@
"logging",
"psr-3"
],
- "funding": [
- {
- "url": "https://github.com/Seldaek",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
- "type": "tidelift"
- }
- ],
"time": "2020-05-22T08:12:19+00:00"
},
{
@@ -1366,16 +1454,6 @@
"datetime",
"time"
],
- "funding": [
- {
- "url": "https://opencollective.com/Carbon",
- "type": "open_collective"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon",
- "type": "tidelift"
- }
- ],
"time": "2020-05-24T18:27:52+00:00"
},
{
@@ -1544,16 +1622,6 @@
"php",
"type"
],
- "funding": [
- {
- "url": "https://github.com/GrahamCampbell",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption",
- "type": "tidelift"
- }
- ],
"time": "2020-06-07T10:40:07+00:00"
},
{
@@ -2048,12 +2116,6 @@
"identifier",
"uuid"
],
- "funding": [
- {
- "url": "https://github.com/ramsey",
- "type": "github"
- }
- ],
"time": "2020-03-29T20:13:32+00:00"
},
{
@@ -2122,12 +2184,6 @@
"security",
"spatie"
],
- "funding": [
- {
- "url": "https://spatie.be/open-source/support-us",
- "type": "custom"
- }
- ],
"time": "2020-05-20T00:31:29+00:00"
},
{
@@ -2269,20 +2325,6 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-30T20:35:19+00:00"
},
{
@@ -2336,20 +2378,6 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-20T17:43:50+00:00"
},
{
@@ -2396,20 +2424,6 @@
],
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-27T08:34:37+00:00"
},
{
@@ -2467,20 +2481,6 @@
],
"description": "Symfony ErrorHandler Component",
"homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-30T20:35:19+00:00"
},
{
@@ -2553,20 +2553,6 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-20T17:43:50+00:00"
},
{
@@ -2625,20 +2611,6 @@
"interoperability",
"standards"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-20T17:43:50+00:00"
},
{
@@ -2688,20 +2660,6 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-20T17:43:50+00:00"
},
{
@@ -2763,20 +2721,6 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-24T12:18:07+00:00"
},
{
@@ -2876,20 +2820,6 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-31T06:14:18+00:00"
},
{
@@ -2953,20 +2883,6 @@
"mime",
"mime-type"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-25T12:33:44+00:00"
},
{
@@ -3025,20 +2941,6 @@
"polyfill",
"portable"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-12T16:14:59+00:00"
},
{
@@ -3098,20 +3000,6 @@
"portable",
"shim"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-12T16:47:27+00:00"
},
{
@@ -3172,20 +3060,6 @@
"portable",
"shim"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-12T16:47:27+00:00"
},
{
@@ -3248,20 +3122,6 @@
"portable",
"shim"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-12T16:47:27+00:00"
},
{
@@ -3325,20 +3185,6 @@
"portable",
"shim"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-12T16:14:59+00:00"
},
{
@@ -3398,20 +3244,6 @@
"portable",
"shim"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-12T16:47:27+00:00"
},
{
@@ -3467,20 +3299,6 @@
"portable",
"shim"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-12T16:47:27+00:00"
},
{
@@ -3539,20 +3357,6 @@
"portable",
"shim"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-12T16:47:27+00:00"
},
{
@@ -3615,20 +3419,6 @@
"portable",
"shim"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-12T16:47:27+00:00"
},
{
@@ -3679,20 +3469,6 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-30T20:35:19+00:00"
},
{
@@ -3771,20 +3547,6 @@
"uri",
"url"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-30T20:35:19+00:00"
},
{
@@ -3843,20 +3605,6 @@
"interoperability",
"standards"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-20T17:43:50+00:00"
},
{
@@ -3928,20 +3676,6 @@
"utf-8",
"utf8"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-20T17:43:50+00:00"
},
{
@@ -4020,20 +3754,6 @@
],
"description": "Symfony Translation Component",
"homepage": "https://symfony.com",
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-30T20:35:19+00:00"
},
{
@@ -4091,20 +3811,6 @@
"interoperability",
"standards"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-20T17:43:50+00:00"
},
{
@@ -4181,20 +3887,6 @@
"debug",
"dump"
],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
"time": "2020-05-30T20:35:19+00:00"
},
{
@@ -4308,16 +4000,6 @@
"env",
"environment"
],
- "funding": [
- {
- "url": "https://github.com/GrahamCampbell",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv",
- "type": "tidelift"
- }
- ],
"time": "2020-06-07T18:25:35+00:00"
},
{
@@ -4366,24 +4048,6 @@
"clean",
"php"
],
- "funding": [
- {
- "url": "https://www.paypal.me/moelleken",
- "type": "custom"
- },
- {
- "url": "https://github.com/voku",
- "type": "github"
- },
- {
- "url": "https://www.patreon.com/voku",
- "type": "patreon"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii",
- "type": "tidelift"
- }
- ],
"time": "2020-05-26T06:40:44+00:00"
}
],
@@ -4442,20 +4106,6 @@
"constructor",
"instantiate"
],
- "funding": [
- {
- "url": "https://www.doctrine-project.org/sponsorship.html",
- "type": "custom"
- },
- {
- "url": "https://www.patreon.com/phpdoctrine",
- "type": "patreon"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
- "type": "tidelift"
- }
- ],
"time": "2020-05-29T17:27:14+00:00"
},
{
@@ -4510,12 +4160,6 @@
"flare",
"reporting"
],
- "funding": [
- {
- "url": "https://www.patreon.com/spatie",
- "type": "patreon"
- }
- ],
"time": "2020-03-02T15:52:04+00:00"
},
{
@@ -4976,20 +4620,6 @@
"php",
"symfony"
],
- "funding": [
- {
- "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L",
- "type": "custom"
- },
- {
- "url": "https://github.com/nunomaduro",
- "type": "github"
- },
- {
- "url": "https://www.patreon.com/nunomaduro",
- "type": "patreon"
- }
- ],
"time": "2020-04-04T19:56:08+00:00"
},
{
@@ -5638,16 +5268,6 @@
"testing",
"xunit"
],
- "funding": [
- {
- "url": "https://phpunit.de/donate.html",
- "type": "custom"
- },
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
"time": "2020-05-22T13:51:52+00:00"
},
{
@@ -5717,12 +5337,6 @@
"highlight.php",
"syntax"
],
- "funding": [
- {
- "url": "https://github.com/allejo",
- "type": "github"
- }
- ],
"time": "2020-03-02T05:59:21+00:00"
},
{
@@ -6437,6 +6051,5 @@
"platform": {
"php": "^7.2.5"
},
- "platform-dev": [],
- "plugin-api-version": "1.1.0"
+ "platform-dev": []
}
diff --git a/skolehjem/config/app.php b/skolehjem/config/app.php
index 88be4a8..b7644e6 100644
--- a/skolehjem/config/app.php
+++ b/skolehjem/config/app.php
@@ -166,7 +166,7 @@ return [
* Package Service Providers...
*/
Spatie\Permission\PermissionServiceProvider::class,
-
+ Jenssegers\Agent\AgentServiceProvider::class,
/*
* Application Service Providers...
@@ -177,6 +177,10 @@ return [
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
+ /*
+ * Custom Service Prviders
+ */
+ App\Providers\DetectorServiceProvider::class,
],
/*
@@ -229,6 +233,7 @@ return [
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
+ 'Agent' => Jenssegers\Agent\Facades\Agent::class,
],
];
diff --git a/skolehjem/config/detector.php b/skolehjem/config/detector.php
new file mode 100644
index 0000000..e1fb44b
--- /dev/null
+++ b/skolehjem/config/detector.php
@@ -0,0 +1,7 @@
+ "admin",
+
+ "mobilePath" => "app",
+];
diff --git a/skolehjem/public/css/admin.css b/skolehjem/public/css/admin.css
index d623b23..63072d0 100644
--- a/skolehjem/public/css/admin.css
+++ b/skolehjem/public/css/admin.css
@@ -537,7 +537,6 @@ main {
.tbl > tbody > tr > td > a {
width: 100%;
- display: flex;
}
.tbl > tbody > tr > td > a > img {
diff --git a/skolehjem/public/css/webapp.css b/skolehjem/public/css/webapp.css
new file mode 100644
index 0000000..b5a841d
--- /dev/null
+++ b/skolehjem/public/css/webapp.css
@@ -0,0 +1,505 @@
+@font-face {
+ font-family: "Titillium Web";
+ src: url("/fonts/TitilliumWeb-Regular.ttf");
+ font-weight: normal;
+}
+
+@font-face {
+ font-family: "Titillium Web";
+ src: url("/fonts/TitilliumWeb-SemiBold.ttf");
+ font-weight: 600;
+}
+
+@font-face {
+ font-family: "Titillium Web";
+ src: url("/fonts/TitilliumWeb-Bold.ttf");
+ font-weight: 700;
+}
+
+form {
+ max-width: 100%;
+ padding: 0 0.45rem 0 0.45rem;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+}
+
+.btn {
+ border: 0;
+ border-radius: 4px;
+ padding: 0.5rem;
+ cursor: pointer;
+ font-weight: 700;
+ font-size: 1.05rem;
+ background-color: white;
+ color: #333333;
+ margin-bottom: 0.5rem;
+}
+
+.btn-dark {
+ color: white;
+ background-color: #333333;
+}
+
+.btn-sde-blue {
+ color: white;
+ background-color: #00788a;
+}
+
+.btn-disabled {
+ color: white;
+ background-color: #cccccc;
+}
+
+.form-inline {
+ display: inline-flex;
+}
+
+input {
+ border: grey solid 2px;
+ border-radius: 4px;
+ background-color: transparent;
+ font-size: 1rem;
+ line-height: 2rem;
+ margin-bottom: 1rem;
+}
+
+input.appinput {
+ border: none;
+ border-bottom: white solid 2px;
+ background-color: transparent;
+ font-size: 1rem;
+ color: white;
+ line-height: 2rem;
+ margin-bottom: 1rem;
+}
+
+.d-flex {
+ display: flex;
+}
+
+.d-none {
+ display: none !important;
+}
+
+.row {
+ display: flex;
+ flex-direction: row;
+}
+
+.align-items-center {
+ align-items: center;
+}
+
+.col {
+ display: flex;
+ flex-direction: column;
+}
+
+.cursor-normal {
+ cursor: default;
+}
+
+.cursor-pointer {
+ cursor: pointer;
+}
+
+.text-white {
+ color: #ffffff;
+}
+
+.text-center {
+ text-align: center;
+}
+
+.sde-blue {
+ color: #00788a;
+}
+
+.sde-black-80 {
+ color: #333333;
+}
+
+.sde-black-20 {
+ color: #cccccc;
+}
+
+.regular {
+ font-weight: 400;
+}
+
+.semi-bold {
+ font-weight: 600;
+}
+
+.bold {
+ font-weight: 700;
+}
+
+.toggle__label.sde-blue::before {
+ border-color: #00788a;
+}
+
+.sde-blue.toggle__text::before {
+ border-color: #00788a;
+}
+
+span.toggle__text.sde-blue {
+ font-size: 5vw;
+}
+
+.m-auto {
+ margin: auto;
+}
+
+.mr-auto {
+ margin-right: auto;
+}
+
+.ml-auto {
+ margin-left: auto;
+}
+
+.mt-auto {
+ margin-top: auto;
+}
+
+.mb-auto {
+ margin-bottom: auto;
+}
+
+.ml-0 {
+ margin-left: 0;
+}
+
+.mr-0 {
+ margin-right: 0;
+}
+
+.mb-0 {
+ margin-bottom: 0;
+}
+
+.mt-0 {
+ margin-top: 0;
+}
+
+.ml-1 {
+ margin-left: 0.75rem;
+}
+
+.mr-1 {
+ margin-right: 0.75rem;
+}
+
+.mb-1 {
+ margin-bottom: 0.75rem;
+}
+
+.mt-1 {
+ margin-top: 0.75rem;
+}
+
+.ml-2 {
+ margin-left: 3rem;
+}
+
+.mr-2 {
+ margin-right: 3rem;
+}
+
+.mb-2 {
+ margin-bottom: 3rem;
+}
+
+.mt-2 {
+ margin-top: 3rem;
+}
+
+.ml-3 {
+ margin-left: 3rem;
+}
+
+.mr-3 {
+ margin-right: 4.75rem;
+}
+
+.mb-3 {
+ margin-bottom: 4.75rem;
+}
+
+.mt-3 {
+ margin-top: 4.75rem;
+}
+
+* {
+ font-family: "Titillium Web";
+}
+
+html,
+body {
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ height: 100%;
+}
+
+::-moz-placeholder {
+ opacity: 1;
+}
+
+:-ms-input-placeholder {
+ opacity: 1;
+}
+
+::-ms-input-placeholder {
+ opacity: 1;
+}
+
+::placeholder {
+ opacity: 1;
+}
+
+a {
+ color: #000000;
+ text-decoration: none;
+}
+
+.w-100 {
+ width: 100%;
+}
+
+.w-85 {
+ width: 85%;
+}
+
+.w-75 {
+ width: 75%;
+}
+
+.w-50 {
+ width: 50%;
+}
+
+.w-25 {
+ width: 25%;
+}
+
+.w-15 {
+ width: 15%;
+}
+
+.h-100 {
+ height: 100%;
+}
+
+.h-90 {
+ height: 90%;
+}
+
+.h-10 {
+ height: 10%;
+}
+
+.bg-sde-blue {
+ background-color: #00788a;
+}
+
+.toggle {
+ --uiToggleSize: var(--toggleSize, 20px);
+ --uiToggleIndent: var(--toggleIndent, .4em);
+ --uiToggleBorderWidth: var(--toggleBorderWidth, 2px);
+ --uiToggleColor: var(--toggleColor, #000);
+ --uiToggleDisabledColor: var(--toggleDisabledColor, #868e96);
+ --uiToggleBgColor: var(--toggleBgColor, #fff);
+ --uiToggleArrowWidth: var(--toggleArrowWidth, 2px);
+ --uiToggleArrowColor: var(--toggleArrowColor, #fff);
+ margin-bottom: 1.5rem;
+ display: inline-block;
+ position: relative;
+}
+
+.toggle__input {
+ position: absolute;
+ left: -99999px;
+}
+
+.toggle__label {
+ display: inline-flex;
+ min-height: var(--uiToggleSize);
+ padding-left: calc(var(--uiToggleSize) + var(--uiToggleIndent));
+}
+
+.toggle__input:not(:disabled) ~ .toggle__label {
+ cursor: pointer;
+}
+
+.toggle__label::before,
+.toggle__label::after {
+ content: "";
+ box-sizing: border-box;
+ width: 1em;
+ height: 1em;
+ font-size: var(--uiToggleSize);
+ position: absolute;
+ left: 0;
+ top: 0;
+}
+
+.toggle__label:before {
+ border: var(--uiToggleBorderWidth) solid var(--uiToggleColor);
+ z-index: 2;
+}
+
+.toggle__input:disabled ~ .toggle__label::before {
+ border-color: var(--uiToggleDisabledColor);
+}
+
+.toggle__input:focus ~ .toggle__label::before {
+ box-shadow: 0 0 0 2px var(--uiToggleBgColor), 0 0 0 4px var(--uiToggleColor);
+}
+
+.toggle__input:not(:disabled):checked:focus ~ .toggle__label::after {
+ box-shadow: 0 0 0 2px var(--uiToggleBgColor), 0 0 0 4px var(--uiToggleColor);
+}
+
+.toggle__input:not(:disabled) ~ .toggle__label::after {
+ background-color: var(--uiToggleColor);
+ opacity: 0;
+}
+
+.toggle__input:not(:disabled):checked ~ .toggle__label::after {
+ opacity: 1;
+}
+
+.toggle__text {
+ margin-top: auto;
+ margin-bottom: auto;
+}
+
+.toggle__text::before {
+ content: "";
+ box-sizing: border-box;
+ width: 0;
+ height: 0;
+ font-size: var(--uiToggleSize);
+ border-left-width: 0;
+ border-bottom-width: 0;
+ border-left-style: solid;
+ border-bottom-style: solid;
+ border-color: var(--uiToggleArrowColor);
+ position: absolute;
+ top: 0.5428em;
+ left: 0.2em;
+ z-index: 3;
+ transform-origin: left top;
+ transform: rotate(-40deg) skew(10deg);
+}
+
+.toggle__input:not(:disabled):checked ~ .toggle__label .toggle__text::before {
+ width: 0.5em;
+ height: 0.25em;
+ border-left-width: var(--uiToggleArrowWidth);
+ border-bottom-width: var(--uiToggleArrowWidth);
+ will-change: width, height;
+ transition: width 0.1s ease-out 0.2s, height 0.2s ease-out;
+ margin-top: 3px;
+}
+
+.toggle__input:disabled ~ .toggle__label {
+ opacity: 0.24;
+ cursor: not-allowed;
+}
+
+.toggle__label::before,
+.toggle__label::after {
+ border: 2px solid;
+ border-color: white;
+}
+
+.toggle__input:not(:disabled) ~ .toggle__label::before,
+.toggle__input:not(:disabled) ~ .toggle__label::after {
+ opacity: 1;
+ transform-origin: center center;
+ margin-top: 3px;
+}
+
+.toggle__text::before {
+ opacity: 0;
+}
+
+.toggle__input:not(:disabled):checked ~ .toggle__label .toggle__text::before {
+ opacity: 1;
+ transition: opacity 0.1s ease-out 0.3s, width 0.1s ease-out 0.5s, height 0.2s ease-out 0.3s;
+}
+
+.toggle {
+ --toggleColor: transparent;
+ --toggleBgColor: transparent;
+ --toggleSize: 1.25rem;
+}
+
+main {
+ max-width: 900px;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ margin: auto;
+ padding: 0 1.25rem 0 1.25rem;
+}
+
+@media only screen and (max-width: 900px) {
+ main {
+ max-width: 460px;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ margin: auto;
+ padding: 0 1.25rem 0 1.25rem;
+ }
+
+ .brand {
+ padding: 0 1rem 0 1rem;
+ margin: 7rem 0 5rem 0;
+ }
+
+ header,
+ #menu {
+ padding: 1.25rem 1.75rem 0 1.75rem;
+ }
+
+ #menu {
+ padding-top: 4rem;
+ }
+
+ #menu > a {
+ color: white;
+ font-size: 8vw;
+ font-weight: 600;
+ display: flex;
+ align-items: center;
+ margin-bottom: 1.5rem;
+ }
+
+ #menu > a > img {
+ height: 1em;
+ margin-right: 8px;
+ }
+
+ h1 {
+ font-size: 12vw;
+ }
+
+ h3 {
+ font-size: 8vw;
+ }
+
+ span {
+ font-size: 12px;
+ }
+
+ p {
+ font-size: 4vw;
+ }
+}
+
diff --git a/skolehjem/resources/js/navmenu/menu.js b/skolehjem/resources/js/navmenu/menu.js
index 3ab3947..06634aa 100644
--- a/skolehjem/resources/js/navmenu/menu.js
+++ b/skolehjem/resources/js/navmenu/menu.js
@@ -2,7 +2,7 @@ document.addEventListener("DOMContentLoaded", function(){
// Handler when the DOM is fully loaded
var path = window.location.pathname;
- if(path === "/menuplan" || path === "/vagttelefon" || path === "/")
+ if(path === "/menuplans" || path === "/vagttelefon" || path === "/")
{
document.getElementById ('toggle').addEventListener ('click', toggleMenu, false);
}
diff --git a/skolehjem/resources/js/sites/menuplan.js b/skolehjem/resources/js/sites/menuplan.js
index 2f14dea..52b23fb 100644
--- a/skolehjem/resources/js/sites/menuplan.js
+++ b/skolehjem/resources/js/sites/menuplan.js
@@ -2,7 +2,7 @@ document.addEventListener("DOMContentLoaded", function(){
// Handler when the DOM is fully loaded
var path = window.location.pathname;
- if(path === "/menuplan")
+ if(path === "/menuplans")
{
updateWeek();
}
diff --git a/skolehjem/resources/sass/admin/content/table.scss b/skolehjem/resources/sass/admin/content/table.scss
index 54dff6e..552714b 100644
--- a/skolehjem/resources/sass/admin/content/table.scss
+++ b/skolehjem/resources/sass/admin/content/table.scss
@@ -22,7 +22,7 @@
.tbl > tbody > tr > td > a {
width: 100%;
- display: flex;
+ //display: flex;
}
.tbl > tbody > tr > td > a > img {
diff --git a/skolehjem/resources/views/admin/events/create.blade.php b/skolehjem/resources/views/admin/events/create.blade.php
new file mode 100644
index 0000000..e16decc
--- /dev/null
+++ b/skolehjem/resources/views/admin/events/create.blade.php
@@ -0,0 +1,41 @@
+@extends("admin.layout.base")
+@extends("admin.layout.header")
+
+@section("title")
+ Vaskemaskiner - Vis
+@endsection
+
+@section("path")
+ Opret Vaskemaskine /
+@endsection
+
+@section("content")
+
Opret Bruger:
+
+
+{{-- --}}
+{{-- --}}
+{{-- ID | --}}
+{{-- Fornavn | --}}
+{{-- Efternavn | --}}
+{{-- Email | --}}
+{{-- Tlf nr | --}}
+{{--  }}) | --}}
+{{--  }}) | --}}
+{{--
--}}
+{{-- --}}
+{{-- {ID} | --}}
+{{-- {Fornavn} | --}}
+{{-- {Efternavn} | --}}
+{{-- {Email} | --}}
+{{-- {TLF} | --}}
+{{--  }}) | --}}
+{{--  }}) | --}}
+{{--
--}}
+{{--
--}}
+@endsection
diff --git a/skolehjem/resources/views/admin/events/delete.blade.php b/skolehjem/resources/views/admin/events/delete.blade.php
new file mode 100644
index 0000000..e7c4ae2
--- /dev/null
+++ b/skolehjem/resources/views/admin/events/delete.blade.php
@@ -0,0 +1,33 @@
+@extends("admin.layout.base")
+@extends("admin.layout.header")
+
+@section("title")
+ Vaskemaskiner - Vis
+@endsection
+
+@section("path")
+ Vis Vaskemaskiner /
+@endsection
+
+@section("content")
+
+
+ ID |
+ Fornavn |
+ Efternavn |
+ Email |
+ Tlf nr |
+  }}) |
+  }}) |
+
+
+ {ID} |
+ {Fornavn} |
+ {Efternavn} |
+ {Email} |
+ {TLF} |
+  }}) |
+  }}) |
+
+
+@endsection
diff --git a/skolehjem/resources/views/admin/events/edit.blade.php b/skolehjem/resources/views/admin/events/edit.blade.php
new file mode 100644
index 0000000..daf1189
--- /dev/null
+++ b/skolehjem/resources/views/admin/events/edit.blade.php
@@ -0,0 +1,33 @@
+@extends("admin.layout.base")
+@extends("admin.layout.header")
+
+@section("title")
+ Events - Vis
+@endsection
+
+@section("path")
+ Vis Events /
+@endsection
+
+@section("content")
+
+
+ ID |
+ Fornavn |
+ Efternavn |
+ Email |
+ Tlf nr |
+  }}) |
+  }}) |
+
+
+ {ID} |
+ {Fornavn} |
+ {Efternavn} |
+ {Email} |
+ {TLF} |
+  }}) |
+  }}) |
+
+
+@endsection
diff --git a/skolehjem/resources/views/admin/events/index.blade.php b/skolehjem/resources/views/admin/events/index.blade.php
new file mode 100644
index 0000000..e7c4ae2
--- /dev/null
+++ b/skolehjem/resources/views/admin/events/index.blade.php
@@ -0,0 +1,33 @@
+@extends("admin.layout.base")
+@extends("admin.layout.header")
+
+@section("title")
+ Vaskemaskiner - Vis
+@endsection
+
+@section("path")
+ Vis Vaskemaskiner /
+@endsection
+
+@section("content")
+
+
+ ID |
+ Fornavn |
+ Efternavn |
+ Email |
+ Tlf nr |
+  }}) |
+  }}) |
+
+
+ {ID} |
+ {Fornavn} |
+ {Efternavn} |
+ {Email} |
+ {TLF} |
+  }}) |
+  }}) |
+
+
+@endsection
diff --git a/skolehjem/resources/views/admin/events/show.blade.php b/skolehjem/resources/views/admin/events/show.blade.php
new file mode 100644
index 0000000..e7c4ae2
--- /dev/null
+++ b/skolehjem/resources/views/admin/events/show.blade.php
@@ -0,0 +1,33 @@
+@extends("admin.layout.base")
+@extends("admin.layout.header")
+
+@section("title")
+ Vaskemaskiner - Vis
+@endsection
+
+@section("path")
+ Vis Vaskemaskiner /
+@endsection
+
+@section("content")
+
+
+ ID |
+ Fornavn |
+ Efternavn |
+ Email |
+ Tlf nr |
+  }}) |
+  }}) |
+
+
+ {ID} |
+ {Fornavn} |
+ {Efternavn} |
+ {Email} |
+ {TLF} |
+  }}) |
+  }}) |
+
+
+@endsection
diff --git a/skolehjem/resources/views/admin/events/store.blade.php b/skolehjem/resources/views/admin/events/store.blade.php
new file mode 100644
index 0000000..e7c4ae2
--- /dev/null
+++ b/skolehjem/resources/views/admin/events/store.blade.php
@@ -0,0 +1,33 @@
+@extends("admin.layout.base")
+@extends("admin.layout.header")
+
+@section("title")
+ Vaskemaskiner - Vis
+@endsection
+
+@section("path")
+ Vis Vaskemaskiner /
+@endsection
+
+@section("content")
+
+
+ ID |
+ Fornavn |
+ Efternavn |
+ Email |
+ Tlf nr |
+  }}) |
+  }}) |
+
+
+ {ID} |
+ {Fornavn} |
+ {Efternavn} |
+ {Email} |
+ {TLF} |
+  }}) |
+  }}) |
+
+
+@endsection
diff --git a/skolehjem/resources/views/admin/events/update.blade.php b/skolehjem/resources/views/admin/events/update.blade.php
new file mode 100644
index 0000000..e7c4ae2
--- /dev/null
+++ b/skolehjem/resources/views/admin/events/update.blade.php
@@ -0,0 +1,33 @@
+@extends("admin.layout.base")
+@extends("admin.layout.header")
+
+@section("title")
+ Vaskemaskiner - Vis
+@endsection
+
+@section("path")
+ Vis Vaskemaskiner /
+@endsection
+
+@section("content")
+
+
+ ID |
+ Fornavn |
+ Efternavn |
+ Email |
+ Tlf nr |
+  }}) |
+  }}) |
+
+
+ {ID} |
+ {Fornavn} |
+ {Efternavn} |
+ {Email} |
+ {TLF} |
+  }}) |
+  }}) |
+
+
+@endsection
diff --git a/skolehjem/resources/views/admin/layout/base.blade.php b/skolehjem/resources/views/admin/layout/base.blade.php
index 77277fd..8e6374f 100644
--- a/skolehjem/resources/views/admin/layout/base.blade.php
+++ b/skolehjem/resources/views/admin/layout/base.blade.php
@@ -22,10 +22,10 @@
diff --git a/skolehjem/resources/views/admin/layout/header.blade.php b/skolehjem/resources/views/admin/layout/header.blade.php
index d3ab485..a093951 100644
--- a/skolehjem/resources/views/admin/layout/header.blade.php
+++ b/skolehjem/resources/views/admin/layout/header.blade.php
@@ -4,9 +4,9 @@
@auth
User: {{ Auth::user()->name }}
- Log ud
+ Log ud
@else
- Log ind
+ Log ind
@endauth
diff --git a/skolehjem/resources/views/admin/menuplan/create.blade.php b/skolehjem/resources/views/admin/menuplans/create.blade.php
similarity index 100%
rename from skolehjem/resources/views/admin/menuplan/create.blade.php
rename to skolehjem/resources/views/admin/menuplans/create.blade.php
diff --git a/skolehjem/resources/views/admin/menuplan/show.blade.php b/skolehjem/resources/views/admin/menuplans/show.blade.php
similarity index 100%
rename from skolehjem/resources/views/admin/menuplan/show.blade.php
rename to skolehjem/resources/views/admin/menuplans/show.blade.php
diff --git a/skolehjem/resources/views/admin/menuplan/update.blade.php b/skolehjem/resources/views/admin/menuplans/update.blade.php
similarity index 100%
rename from skolehjem/resources/views/admin/menuplan/update.blade.php
rename to skolehjem/resources/views/admin/menuplans/update.blade.php
diff --git a/skolehjem/resources/views/admin/users/create.blade.php b/skolehjem/resources/views/admin/users/create.blade.php
index 7976d5d..d5d02ed 100644
--- a/skolehjem/resources/views/admin/users/create.blade.php
+++ b/skolehjem/resources/views/admin/users/create.blade.php
@@ -11,7 +11,8 @@
@section("content")
Opret Bruger:
-