diff --git a/app/Http/Controllers/DashboardAdminRandomGeneratorController.php b/app/Http/Controllers/DashboardAdminRandomGeneratorController.php index 39e7e8a1..618541a7 100644 --- a/app/Http/Controllers/DashboardAdminRandomGeneratorController.php +++ b/app/Http/Controllers/DashboardAdminRandomGeneratorController.php @@ -82,4 +82,24 @@ public function indexExecuteSubmit(): JsonResponse 'success' => true, ]); } + + /* + * Display the dashboard admin random generator display page + */ + public function display(): Response + { + // get all users except tutors and admins + $users = User::doesntHave('roles')->with('course')->get()->map(function ($user) { + $user->avatarUrl = $user->avatarUrl(); + + return $user; + }); + + // shuffle the users + $users = $users->shuffle(); + + return Inertia::render('Dashboard/Admin/RandomGenerator/Display', [ + 'users' => $users, + ]); + } } diff --git a/public/images/random-generator/background/comic-blue.jpg b/public/images/random-generator/background/comic-blue.jpg new file mode 100644 index 00000000..0e18c142 Binary files /dev/null and b/public/images/random-generator/background/comic-blue.jpg differ diff --git a/public/images/random-generator/background/comic-yellow.jpg b/public/images/random-generator/background/comic-yellow.jpg new file mode 100644 index 00000000..d62e5844 Binary files /dev/null and b/public/images/random-generator/background/comic-yellow.jpg differ diff --git a/public/images/random-generator/gifs/cat.gif b/public/images/random-generator/gifs/cat.gif new file mode 100644 index 00000000..16423b83 Binary files /dev/null and b/public/images/random-generator/gifs/cat.gif differ diff --git a/public/images/random-generator/gifs/trumpet.gif b/public/images/random-generator/gifs/trumpet.gif new file mode 100644 index 00000000..b344ec73 Binary files /dev/null and b/public/images/random-generator/gifs/trumpet.gif differ diff --git a/public/sounds/random-generator/airhorn.mp3 b/public/sounds/random-generator/airhorn.mp3 new file mode 100644 index 00000000..94bd241a Binary files /dev/null and b/public/sounds/random-generator/airhorn.mp3 differ diff --git a/public/sounds/random-generator/rise.mp3 b/public/sounds/random-generator/rise.mp3 new file mode 100644 index 00000000..5b0d340e Binary files /dev/null and b/public/sounds/random-generator/rise.mp3 differ diff --git a/public/sounds/random-generator/running.mp3 b/public/sounds/random-generator/running.mp3 new file mode 100644 index 00000000..1f384770 Binary files /dev/null and b/public/sounds/random-generator/running.mp3 differ diff --git a/resources/js/components/random/generator/user/AvatarCard.vue b/resources/js/components/random/generator/user/AvatarCard.vue new file mode 100644 index 00000000..e409a291 --- /dev/null +++ b/resources/js/components/random/generator/user/AvatarCard.vue @@ -0,0 +1,30 @@ + + + diff --git a/resources/js/layouts/RandomGeneratorLayout.vue b/resources/js/layouts/RandomGeneratorLayout.vue new file mode 100644 index 00000000..dc1ddb9a --- /dev/null +++ b/resources/js/layouts/RandomGeneratorLayout.vue @@ -0,0 +1,7 @@ + diff --git a/resources/js/pages/Dashboard/Admin/RandomGenerator/Display.vue b/resources/js/pages/Dashboard/Admin/RandomGenerator/Display.vue new file mode 100644 index 00000000..9edb2850 --- /dev/null +++ b/resources/js/pages/Dashboard/Admin/RandomGenerator/Display.vue @@ -0,0 +1,174 @@ + + + + + + + diff --git a/resources/js/types/components.d.ts b/resources/js/types/components.d.ts index 2cbebf33..352edd45 100644 --- a/resources/js/types/components.d.ts +++ b/resources/js/types/components.d.ts @@ -12,6 +12,7 @@ declare module "vue" { AppMessage: typeof import("./../components/app/Message.vue")["default"]; AppNavbar: typeof import("./../components/app/Navbar.vue")["default"]; BoxContainer: typeof import("./../components/box/Container.vue")["default"]; + CardAvatarCard: typeof import("./../components/card/AvatarCard.vue")["default"]; CardBase: typeof import("./../components/card/Base.vue")["default"]; CardContainer: typeof import("./../components/card/Container.vue")["default"]; CardLayout: typeof import("./../layouts/CardLayout.vue")["default"]; @@ -29,6 +30,8 @@ declare module "vue" { GridContainer: typeof import("./../components/grid/Container.vue")["default"]; GroupTable: typeof import("./../components/group/Table.vue")["default"]; LayoutDashboardContent: typeof import("./../components/layout/DashboardContent.vue")["default"]; + RandomGeneratorLayout: typeof import("./../layouts/RandomGeneratorLayout.vue")["default"]; + RandomGeneratorUserAvatarCard: typeof import("./../components/random/generator/user/AvatarCard.vue")["default"]; RegistrationTable: typeof import("./../components/registration/Table.vue")["default"]; SlotTable: typeof import("./../components/slot/Table.vue")["default"]; UiDateString: typeof import("./../components/ui/DateString.vue")["default"]; diff --git a/resources/views/app.blade.php b/resources/views/app.blade.php index b62447d2..0d8b3dea 100644 --- a/resources/views/app.blade.php +++ b/resources/views/app.blade.php @@ -7,6 +7,7 @@ + {{ config('app.name') }} diff --git a/routes/web.php b/routes/web.php index 6c4912bb..ef7fd998 100644 --- a/routes/web.php +++ b/routes/web.php @@ -84,6 +84,7 @@ ], function () { Route::get('/random-generator', [DashboardAdminRandomGeneratorController::class, 'index'])->name('dashboard.admin.randomGenerator.index'); Route::post('/random-generator', [DashboardAdminRandomGeneratorController::class, 'indexExecuteSubmit'])->name('dashboard.admin.randomGenerator.indexExecuteSubmit'); + Route::get('/random-generator/display', [DashboardAdminRandomGeneratorController::class, 'display'])->name('dashboard.admin.randomGenerator.display'); }); }); diff --git a/tailwind.config.js b/tailwind.config.js index 95f4328c..3825113b 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,4 +1,5 @@ /** @type {import('tailwindcss').Config} */ + const defaultTheme = require("tailwindcss/defaultTheme"); module.exports = { @@ -12,6 +13,28 @@ module.exports = { darkMode: "class", theme: { extend: { + keyframes: { + wiggle: { + "0%, 100%": { + transform: "rotate(-15deg)", + }, + "50%": { + transform: "rotate(15deg)", + }, + }, + fly: { + from: { + transform: "translateY(100vh)", + }, + to: { + transform: "translateY(-100%)", + }, + }, + }, + animation: { + wiggle: "wiggle 2s ease-in-out infinite", + fly: "fly 75s infinite linear alternate", + }, colors: { fhac: { mint: "#00b5ad", @@ -20,6 +43,7 @@ module.exports = { }, fontFamily: { sans: ["Inter var", ...defaultTheme.fontFamily.sans], + "eighty-miles": ['"EIGHTY MILES"'], }, }, },