add recruitment page
This commit is contained in:
parent
63aba8035a
commit
9b1757f0bf
16 changed files with 112 additions and 63 deletions
|
|
@ -11,6 +11,7 @@ enum StaticPageType: int
|
|||
case contact = 1;
|
||||
case legals = 2;
|
||||
case confidentiality = 3;
|
||||
case recruitment = 4;
|
||||
|
||||
/**
|
||||
* Optionnal labels definition.
|
||||
|
|
@ -21,5 +22,6 @@ enum StaticPageType: int
|
|||
self::contact->name => 'Contact',
|
||||
self::legals->name => 'Mentions légales',
|
||||
self::confidentiality->name => 'Confidentialité',
|
||||
self::recruitment->name => 'Recrutement',
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,38 +9,50 @@ use App\Models\StaticPage;
|
|||
class StaticPageController extends Controller
|
||||
{
|
||||
/**
|
||||
* Contact show
|
||||
* Contact page.
|
||||
*
|
||||
* @param \App\Models\StaticPage $contactPage
|
||||
* @param \App\Models\StaticPage $staticPageModel
|
||||
* @return \Illuminate\Contracts\View\View
|
||||
*/
|
||||
public function contact(StaticPage $contactPage)
|
||||
public function contact(StaticPage $staticPageModel)
|
||||
{
|
||||
$contactPage = StaticPage::query()->where('type', StaticPageType::contact)->first();
|
||||
return view('fo.pages.legals', ['staticPageModel' => $contactPage]);
|
||||
$staticPageModel = StaticPage::query()->where('type', StaticPageType::contact)->first();
|
||||
return view('fo.pages.legals', ['staticPageModel' => $staticPageModel]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Legal show
|
||||
* Legals page.
|
||||
*
|
||||
* @param \App\Models\StaticPage $legalPage
|
||||
* @param \App\Models\StaticPage $staticPageModel
|
||||
* @return \Illuminate\Contracts\View\View
|
||||
*/
|
||||
public function legals(StaticPage $legalPage)
|
||||
public function legals(StaticPage $staticPageModel)
|
||||
{
|
||||
$legalPage = StaticPage::query()->where('type', StaticPageType::legals)->first();
|
||||
return view('fo.pages.legals', ['staticPageModel' => $legalPage]);
|
||||
$staticPageModel = StaticPage::query()->where('type', StaticPageType::legals)->first();
|
||||
return view('fo.pages.legals', ['staticPageModel' => $staticPageModel]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Policies show
|
||||
* Confidentiality page.
|
||||
*
|
||||
* @param \App\Models\StaticPage $policiesPage
|
||||
* @param \App\Models\StaticPage $staticPageModel
|
||||
* @return \Illuminate\Contracts\View\View
|
||||
*/
|
||||
public function policies(StaticPage $policiesPage)
|
||||
public function policies(StaticPage $staticPageModel)
|
||||
{
|
||||
$policiesPage = StaticPage::query()->where('type', StaticPageType::confidentiality)->first();
|
||||
return view('fo.pages.legals', ['staticPageModel' => $policiesPage]);
|
||||
$staticPageModel = StaticPage::query()->where('type', StaticPageType::confidentiality)->first();
|
||||
return view('fo.pages.legals', ['staticPageModel' => $staticPageModel]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Recruitment page.
|
||||
*
|
||||
* @param \App\Models\StaticPage $staticPageModel
|
||||
* @return \Illuminate\Contracts\View\View
|
||||
*/
|
||||
public function recruitment(StaticPage $staticPageModel)
|
||||
{
|
||||
$staticPageModel = StaticPage::query()->where('type', StaticPageType::recruitment)->first();
|
||||
return view('fo.pages.recruitment', ['staticPageModel' => $staticPageModel]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class RedirectIfAuthenticated
|
|||
if (auth($guard)->check()) {
|
||||
switch ($guard) {
|
||||
case 'frontend':
|
||||
return \redirect()->route('fo.homepage');
|
||||
return \redirect()->route('fo.home.show');
|
||||
case 'backend':
|
||||
if (!$request->routeIs('bo.*')) {
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -16,39 +16,43 @@ class StaticPageSeeder extends Seeder
|
|||
public function run()
|
||||
{
|
||||
StaticPage::query()->updateOrCreate(
|
||||
['type' => StaticPageType::contact],
|
||||
[
|
||||
'type' => StaticPageType::contact,
|
||||
],
|
||||
[
|
||||
'seo_title' => 'Seo title pour la page contact',
|
||||
'seo_description' => 'Seo description pour la page contact',
|
||||
'title' => 'Contact',
|
||||
'seo_title' => sprintf('Seo title pour la page %s', StaticPageType::contact->label()),
|
||||
'seo_description' => sprintf('Seo description pour la page %s', StaticPageType::contact->label()),
|
||||
'title' => StaticPageType::contact->label(),
|
||||
'type' => StaticPageType::contact,
|
||||
'content' => \clean(\fake()->randomHtml(6, 7)),
|
||||
'content' => \clean(\fake()->randomHtml()),
|
||||
]
|
||||
);
|
||||
StaticPage::query()->updateOrCreate(
|
||||
['type' => StaticPageType::legals],
|
||||
[
|
||||
'type' => StaticPageType::legals,
|
||||
],
|
||||
[
|
||||
'seo_title' => 'Seo title pour la page mentions légales',
|
||||
'seo_description' => 'Seo description pour la page mentions légales',
|
||||
'title' => 'Mentions légales',
|
||||
'seo_title' => sprintf('Seo title pour la page %s', StaticPageType::legals->label()),
|
||||
'seo_description' => sprintf('Seo description pour la page %s', StaticPageType::legals->label()),
|
||||
'title' => StaticPageType::legals->label(),
|
||||
'type' => StaticPageType::legals,
|
||||
'content' => \clean(\fake()->randomHtml(6, 7)),
|
||||
'content' => \clean(\fake()->randomHtml()),
|
||||
]
|
||||
);
|
||||
StaticPage::query()->updateOrCreate(
|
||||
['type' => StaticPageType::confidentiality],
|
||||
[
|
||||
'type' => StaticPageType::confidentiality,
|
||||
],
|
||||
[
|
||||
'seo_title' => 'Seo title pour la page charte de confidentialitée',
|
||||
'seo_description' => 'Seo description pour la page charte de confidentialitée',
|
||||
'title' => 'Charte de confidentialitée',
|
||||
'seo_title' => sprintf('Seo title pour la page %s', StaticPageType::confidentiality->label()),
|
||||
'seo_description' => sprintf('Seo description pour la page %s', StaticPageType::confidentiality->label()),
|
||||
'title' => StaticPageType::confidentiality->label(),
|
||||
'type' => StaticPageType::confidentiality,
|
||||
'content' => \clean(\fake()->randomHtml(6, 7)),
|
||||
'content' => \clean(\fake()->randomHtml()),
|
||||
]
|
||||
);
|
||||
StaticPage::query()->updateOrCreate(
|
||||
['type' => StaticPageType::recruitment],
|
||||
[
|
||||
'seo_title' => sprintf('Seo title pour la page %s', StaticPageType::recruitment->label()),
|
||||
'seo_description' => sprintf('Seo description pour la page %s', StaticPageType::recruitment->label()),
|
||||
'title' => StaticPageType::recruitment->label(),
|
||||
'type' => StaticPageType::recruitment,
|
||||
'content' => \clean(\fake()->randomHtml()),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,11 +15,13 @@ body {
|
|||
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
z-index: 2;
|
||||
top: $bo-header-height;
|
||||
left: 0;
|
||||
overflow-y: auto;
|
||||
|
||||
@include media-breakpoint-up(md) {
|
||||
z-index: 1;
|
||||
height: calc(100vh - #{$bo-header-height});
|
||||
}
|
||||
|
||||
|
|
@ -94,3 +96,8 @@ body {
|
|||
border-radius: 0 0 0.375rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
.image-preview {
|
||||
max-width: 6rem;
|
||||
max-height: 6rem;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<div
|
||||
ref="imageInput"
|
||||
class="container image-input-vue p-0"
|
||||
class="image-input-vue"
|
||||
>
|
||||
<div class="row">
|
||||
<div :class="`col-12 ${intPreview ? 'col-md-6' : ''} form-group`">
|
||||
<div :class="`col-12 ${intPreview ? 'col-md-6' : ''} form-group z-1`">
|
||||
<label
|
||||
v-if="intPreview && showLabels"
|
||||
:for="intId"
|
||||
|
|
@ -115,7 +115,7 @@
|
|||
</p>
|
||||
<img
|
||||
v-if="intValue"
|
||||
class="img-fluid"
|
||||
class="img-fluid w-fit"
|
||||
:src="intValue"
|
||||
:alt="__('Image placeholder')"
|
||||
:aria-describedby="`PreviewHelp${intId}`"
|
||||
|
|
@ -125,8 +125,8 @@
|
|||
class="form-text text-body-secondary"
|
||||
>
|
||||
{{ humanFileSize(intOriginalFile.size) }}
|
||||
{{ `hauteur ${intOriginalFileDimensions.height}px` }}
|
||||
{{ `largeur ${intOriginalFileDimensions.width}px` }}
|
||||
{{ `hauteur ${intOriginalFileDimensions.height}px` }}
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ export default {
|
|||
allErrors: Record<string, Array<string>> = {}
|
||||
): string | null {
|
||||
let errorList = [] as Array<string>;
|
||||
Object.keys(allErrors).filter((value, index) => {
|
||||
Object.keys(allErrors).filter((value) => {
|
||||
if (value == inputName) {
|
||||
errorList = allErrors[index];
|
||||
errorList = allErrors[inputName];
|
||||
}
|
||||
});
|
||||
return errorList.length
|
||||
|
|
|
|||
10
resources/ts/utilities/sass-safelist.ts
Normal file
10
resources/ts/utilities/sass-safelist.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import type { UserDefinedSafelist } from "purgecss";
|
||||
|
||||
const sassSafelist: UserDefinedSafelist = [
|
||||
// Bootstrap
|
||||
/^cropper-/, /^offcanvas-/, /^tooltip/, /^bs-tooltip/, /^data-popper/, /.*\[data-popper-placement].*/,
|
||||
/^bs-popover/, /^popover/, /^modal-/,
|
||||
// Vue
|
||||
/-(leave|enter|appear)(|-(to|from|active))$/, /^(?!(|.*?:)cursor-move).+-move$/, /^router-link(|-exact)-active$/, /data-v-.*/
|
||||
];
|
||||
export { sassSafelist };
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
id="main-container">
|
||||
<div class="row justify-content-center @guest w-100 mx-auto @endguest">
|
||||
@include('bo.layouts.sidemenu')
|
||||
<div class="@auth('backend') col-md-8 col-lg-9 col-xxl-10 ms-sm-auto p-3 py-2 py-md-3 z-1 @else col px-md-4 pb-5 @endauth">
|
||||
<div class="@auth('backend') col-md-8 col-lg-9 col-xxl-10 ms-sm-auto p-3 py-2 py-md-3 @else col px-md-4 pb-5 @endauth">
|
||||
@auth('backend')
|
||||
@include('modules.flash-messages')
|
||||
@endauth
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
</button>
|
||||
@endauth
|
||||
<a class="navbar-brand fs-4 fw-bold @canAny(['isConceptor', 'viewAny'], \App\Models\User::class) border-md-end @endcan me-md-2 pe-md-3 m-0 p-0"
|
||||
data-bs-toggle="tooltip" data-bs-placement="bottom" href="{{ route('fo.homepage') }}"
|
||||
data-bs-toggle="tooltip" data-bs-placement="bottom" href="{{ route('fo.home.show') }}"
|
||||
title="{{ __('Accéder au front du projet') }}" target="_blank">
|
||||
{{ config('app.name', 'Laravel') }}
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
@auth('backend')
|
||||
<nav class="col-md-4 col-lg-3 col-xxl-2 d-md-block bg-body-tertiary sidebar z-2 collapse" id="menuNavigation">
|
||||
<nav class="col-md-4 col-lg-3 col-xxl-2 d-md-block bg-body-tertiary sidebar collapse" id="menuNavigation">
|
||||
<div class="sidemenu py-2">
|
||||
{{-- HOME --}}
|
||||
<a class="btn btn-primary w-100 @if (request()->routeIs('bo.dashboard')) fw-bold active @endif" data-bs-toggle="tooltip"
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
@section('title', __($staticPageModel->seo_title))
|
||||
@section('description', __($staticPageModel->seo_description))
|
||||
@section('breadcrumb',
|
||||
request()->route()->getName())
|
||||
@section('breadcrumb', request()->route()->getName())
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
|
|
|
|||
22
resources/views/fo/pages/recruitment.blade.php
Normal file
22
resources/views/fo/pages/recruitment.blade.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
@extends('fo.layout')
|
||||
|
||||
@section('title', __($staticPageModel->seo_title))
|
||||
@section('description', __($staticPageModel->seo_description))
|
||||
@section('breadcrumb', request()->route()->getName())
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h1 class="f-intro-head-h-base text-center">{{ __($staticPageModel->title) }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row mb-5">
|
||||
<div class="col ck-content">
|
||||
{!! clean($staticPageModel->content) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
@hasSection('button')
|
||||
<a class="btn btn-primary fw-bold text-uppercase px-5 py-3 tracking-wider"
|
||||
href="{{ app('router')->has('home') ? route('fo.homepage') : url('/') }}" role="button">
|
||||
href="{{ app('router')->has('home') ? route('fo.home.show') : url('/') }}" role="button">
|
||||
{{ __('Revenir à l\'accueil') }}
|
||||
</a>
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ Route::middleware(['throttle:credentials'])
|
|||
Route::view('/partials-demo', 'fo.pages.partials-demo')->name('partials-demo');
|
||||
}
|
||||
|
||||
Route::get('/', [HomeController::class, 'index'])->name('homepage');
|
||||
Route::get('/contact', [StaticPageController::class, 'contact'])->name('contact.show');
|
||||
|
||||
// * LEGALS
|
||||
// * STATIC PAGES
|
||||
Route::get('/', [HomeController::class, 'index'])->name('home.show');
|
||||
Route::get('/recrutement', [StaticPageController::class, 'recruitment'])->name('recruitment.show');
|
||||
Route::get('/mentions-legales', [StaticPageController::class, 'legals'])->name('legals.show');
|
||||
Route::get('/charte-de-confidentialite', [StaticPageController::class, 'policies'])->name('policies.show');
|
||||
Route::get('/contact', [StaticPageController::class, 'contact'])->name('contact.show');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -11,21 +11,14 @@ import babel from "vite-plugin-babel";
|
|||
import checker from "vite-plugin-checker";
|
||||
import eslint from "vite-plugin-eslint";
|
||||
import stylelint from "vite-plugin-stylelint";
|
||||
import { sassSafelist } from "./resources/ts/utilities/sass-safelist";
|
||||
|
||||
const env = loadEnv("r", process.cwd(), "");
|
||||
|
||||
const purgePlugin = purge({
|
||||
templates: ["blade"],
|
||||
paths: [
|
||||
"resources/{js,ts,views}/**/*.{ts,js,vue}"
|
||||
],
|
||||
safelist: [
|
||||
// Bootstrap
|
||||
/^cropper-/, /^offcanvas-/, /^tooltip/, /^bs-tooltip/, /^data-popper/, /.*\[data-popper-placement].*/,
|
||||
/^bs-popover/, /^popover/,
|
||||
// Vue
|
||||
/-(leave|enter|appear)(|-(to|from|active))$/, /^(?!(|.*?:)cursor-move).+-move$/, /^router-link(|-exact)-active$/, /data-v-.*/
|
||||
],
|
||||
paths: ["resources/{js,ts,views}/**/*.{ts,js,vue}"],
|
||||
safelist: sassSafelist,
|
||||
});
|
||||
|
||||
purgePlugin.apply = (config: UserConfig, env: ConfigEnv) => env.mode === "production";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue