From 641a59ba29ef4f5d1451dfb61edd930db430387b Mon Sep 17 00:00:00 2001 From: Arthur Monney Date: Mon, 3 Jan 2022 11:52:44 +0100 Subject: [PATCH 1/7] :wrench: ajout des routes du cpanel --- app/Http/Kernel.php | 1 + app/Providers/RouteServiceProvider.php | 6 ++++++ routes/cpanel.php | 7 +++++++ 3 files changed, 14 insertions(+) create mode 100644 routes/cpanel.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 93bf04c3..aaca3676 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -63,5 +63,6 @@ class Kernel extends HttpKernel 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, + 'role' => \Spatie\Permission\Middlewares\RoleMiddleware::class, ]; } diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 834a0fd4..ce7d911e 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -48,6 +48,12 @@ public function boot() Route::middleware('web') ->namespace($this->namespace) ->group(base_path('routes/web.php')); + + Route::middleware(['web', 'auth', 'role:moderator|admin']) + ->namespace($this->namespace) + ->prefix('cpanel') + ->as('cpanel.') + ->group(base_path('routes/cpanel.php')); }); Route::macro('redirectMap', function ($map, $status = 302) { diff --git a/routes/cpanel.php b/routes/cpanel.php new file mode 100644 index 00000000..24725516 --- /dev/null +++ b/routes/cpanel.php @@ -0,0 +1,7 @@ +name('home'); From 31f5042b3d71c1dafcb580bc54998a0b3416e2a8 Mon Sep 17 00:00:00 2001 From: Arthur Monney Date: Mon, 3 Jan 2022 11:53:38 +0100 Subject: [PATCH 2/7] :lipstick: ajout du lien vers le cpanel --- resources/views/layouts/_nav.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/layouts/_nav.blade.php b/resources/views/layouts/_nav.blade.php index 815bf296..aeca4150 100644 --- a/resources/views/layouts/_nav.blade.php +++ b/resources/views/layouts/_nav.blade.php @@ -237,9 +237,9 @@ class="origin-top-right absolute right-0 mt-2 w-60 rounded-md shadow-lg py-1 bg-
@if(Auth::user()->hasRole(['admin', 'moderator'])) - + - {{ __('CPanel') }} + {{ __('Cpanel') }} @endif From a1563880aa86281fcdefd1350c09e657258f524d Mon Sep 17 00:00:00 2001 From: Arthur Monney Date: Mon, 3 Jan 2022 12:02:20 +0100 Subject: [PATCH 3/7] :construction: wip --- .../Cpanel/DashboardController.php | 14 +++++ public/css/app.css | 40 ++++++++------ resources/views/cpanel/dashboard.blade.php | 9 ++++ resources/views/layouts/cp.blade.php | 53 +++++++++++++++++++ tailwind.config.js | 1 + 5 files changed, 101 insertions(+), 16 deletions(-) create mode 100644 app/Http/Controllers/Cpanel/DashboardController.php create mode 100644 resources/views/cpanel/dashboard.blade.php create mode 100644 resources/views/layouts/cp.blade.php diff --git a/app/Http/Controllers/Cpanel/DashboardController.php b/app/Http/Controllers/Cpanel/DashboardController.php new file mode 100644 index 00000000..20b4596f --- /dev/null +++ b/app/Http/Controllers/Cpanel/DashboardController.php @@ -0,0 +1,14 @@ +Tableau de bord + +@stop diff --git a/resources/views/layouts/cp.blade.php b/resources/views/layouts/cp.blade.php new file mode 100644 index 00000000..a8d7b27b --- /dev/null +++ b/resources/views/layouts/cp.blade.php @@ -0,0 +1,53 @@ + + + + + + + + + + + {{ isset($title) ? $title . ' | ' : '' }} + {{ config('app.name') }} + + + + @include('layouts._og') + + + + + + + @livewireStyles + + + + + + @livewireScripts + + + @include('layouts._favicons') + + + +
+ @yield('content') +
+ + + + @livewire('livewire-ui-modal') + @stack('scripts') + + diff --git a/tailwind.config.js b/tailwind.config.js index da9d6a37..4063714b 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -11,6 +11,7 @@ function withOpacity(variableName) { } module.exports = { + darkMode: 'class', presets: [ require('./vendor/wireui/wireui/tailwind.config.js') ], From 88c97f92bb7e4ce8288cecd2f8dd39d717dc98fe Mon Sep 17 00:00:00 2001 From: Arthur Monney Date: Mon, 3 Jan 2022 12:39:11 +0100 Subject: [PATCH 4/7] :lipstick: mis a jour des fonts --- public/css/app.css | 63 ++++++++++++------- resources/css/torchlight.css | 4 +- .../components/forum/thread-author.blade.php | 12 ++-- .../forum/thread-overview.blade.php | 10 +-- .../views/components/forum/thread.blade.php | 2 +- .../views/components/section-header.blade.php | 4 +- resources/views/components/tag.blade.php | 2 +- resources/views/forum/_channels.blade.php | 4 +- resources/views/forum/_moderators.blade.php | 4 +- resources/views/forum/index.blade.php | 2 +- resources/views/forum/thread.blade.php | 6 +- resources/views/home.blade.php | 28 ++++----- resources/views/layouts/footer.blade.php | 38 +++++------ .../views/livewire/forum/subscribe.blade.php | 4 +- tailwind.config.js | 5 +- 15 files changed, 103 insertions(+), 85 deletions(-) diff --git a/public/css/app.css b/public/css/app.css index 3771702a..548bef50 100755 --- a/public/css/app.css +++ b/public/css/app.css @@ -1600,18 +1600,18 @@ input { .standard .choices__item.choices__item--selectable { --tw-border-opacity: 1 !important; - border-color: rgb(34 197 94 / var(--tw-border-opacity)) !important; + border-color: rgb(16 185 129 / var(--tw-border-opacity)) !important; --tw-bg-opacity: 1 !important; - background-color: rgb(34 197 94 / var(--tw-bg-opacity)) !important; + background-color: rgb(16 185 129 / var(--tw-bg-opacity)) !important; --tw-text-opacity: 1 !important; color: rgb(255 255 255 / var(--tw-text-opacity)) !important; } .standard .choices__item.is-highlighted { --tw-border-opacity: 1 !important; - border-color: rgb(22 163 74 / var(--tw-border-opacity)) !important; + border-color: rgb(5 150 105 / var(--tw-border-opacity)) !important; --tw-bg-opacity: 1 !important; - background-color: rgb(22 163 74 / var(--tw-bg-opacity)) !important; + background-color: rgb(5 150 105 / var(--tw-bg-opacity)) !important; --tw-text-opacity: 1 !important; color: rgb(255 255 255 / var(--tw-text-opacity)) !important; } @@ -1629,9 +1629,9 @@ input { .standard .choices__item.choices__item--choice.choices__item--selectable.is-highlighted, .standard .choices__item.choices__item--choice.is-selected.choices__item--selectable { --tw-border-opacity: 1 !important; - border-color: rgb(34 197 94 / var(--tw-border-opacity)) !important; + border-color: rgb(16 185 129 / var(--tw-border-opacity)) !important; --tw-bg-opacity: 1 !important; - background-color: rgb(34 197 94 / var(--tw-bg-opacity)) !important; + background-color: rgb(16 185 129 / var(--tw-bg-opacity)) !important; --tw-text-opacity: 1 !important; color: rgb(255 255 255 / var(--tw-text-opacity)) !important; } @@ -1645,6 +1645,9 @@ pre { margin-bottom: 1rem; overflow-x: auto; border-radius: 0.25rem; + font-family: Operator Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + font-size: 1.125rem; + line-height: 1.75rem; padding: 0 !important; } @@ -1660,6 +1663,7 @@ pre code.torchlight { min-width: -moz-max-content; min-width: max-content; padding: 1rem; + font-family: Operator Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; padding-top: 1rem !important; padding-bottom: 1rem !important; } @@ -1924,7 +1928,7 @@ pre code.torchlight .line-number, pre code.torchlight .summary-caret { .media-library-row-drag:hover { --tw-text-opacity: 1; - color: rgb(34 197 94 / var(--tw-text-opacity)); + color: rgb(16 185 129 / var(--tw-text-opacity)); } .media-library-row-remove { @@ -2192,18 +2196,18 @@ pre code.torchlight .line-number, pre code.torchlight .summary-caret { } .media-library-dropzone:not(.disabled):hover, .media-library-dropzone-drag { - background-color: rgb(134 239 172 / var(--tw-bg-opacity)); + background-color: rgb(110 231 183 / var(--tw-bg-opacity)); --tw-bg-opacity: 0.25; - border-color: rgb(22 163 74 / var(--tw-border-opacity)); + border-color: rgb(5 150 105 / var(--tw-border-opacity)); --tw-border-opacity: 0.25; } .media-library-dropzone:not(.disabled):active, .media-library-dropzone:not(.disabled):focus, .media-library-dropzone-drop { outline: 2px solid transparent; outline-offset: 2px; - background-color: rgb(134 239 172 / var(--tw-bg-opacity)); + background-color: rgb(110 231 183 / var(--tw-bg-opacity)); --tw-bg-opacity: 0.5; - border-color: rgb(22 163 74 / var(--tw-border-opacity)); + border-color: rgb(5 150 105 / var(--tw-border-opacity)); --tw-border-opacity: 0.25; } @@ -2296,7 +2300,7 @@ pre code.torchlight .line-number, pre code.torchlight .summary-caret { outline: 2px solid transparent; outline-offset: 2px; --tw-bg-opacity: 1; - background-color: rgb(220 252 231 / var(--tw-bg-opacity)); + background-color: rgb(209 250 229 / var(--tw-bg-opacity)); } /* Rounded buttons */ @@ -2331,7 +2335,7 @@ pre code.torchlight .line-number, pre code.torchlight .summary-caret { --tw-bg-opacity: 1; background-color: rgba(var(--color-card-fill), var(--tw-bg-opacity)); --tw-text-opacity: 1; - color: rgb(34 197 94 / var(--tw-text-opacity)); + color: rgb(16 185 129 / var(--tw-text-opacity)); } .media-library-button-warning { @@ -2352,7 +2356,7 @@ pre code.torchlight .line-number, pre code.torchlight .summary-caret { .media-library-button-success { --tw-bg-opacity: 1; - background-color: rgb(34 197 94 / var(--tw-bg-opacity)); + background-color: rgb(16 185 129 / var(--tw-bg-opacity)); --tw-text-opacity: 1; color: rgba(var(--color-text-inverted), var(--tw-text-opacity)); } @@ -2445,13 +2449,13 @@ pre code.torchlight .line-number, pre code.torchlight .summary-caret { .media-library progress::-moz-progress-bar { height: 100%; --tw-bg-opacity: 1; - background-color: rgb(34 197 94 / var(--tw-bg-opacity)); + background-color: rgb(16 185 129 / var(--tw-bg-opacity)); } .media-library progress::-webkit-progress-value { height: 100%; --tw-bg-opacity: 1; - background-color: rgb(34 197 94 / var(--tw-bg-opacity)); + background-color: rgb(16 185 129 / var(--tw-bg-opacity)); } /* Text styles */ @@ -2463,7 +2467,7 @@ pre code.torchlight .line-number, pre code.torchlight .summary-caret { .media-library-text-success { --tw-text-opacity: 1; - color: rgb(22 163 74 / var(--tw-text-opacity)); + color: rgb(5 150 105 / var(--tw-text-opacity)); } .media-library-text-error { @@ -3555,9 +3559,22 @@ select { display: inline-flex; align-items: center; border-radius: .375rem; - font-size: .875rem; + font-size: 1rem; line-height: 1.25rem; - font-weight: 500; + font-weight: 400; + padding: .125rem .625rem; + color: #065f46; + background-color: #d1fae5; + font-family: 'Operator Mono', monospace; +} +.prose :where(p > code, code, pre):not(:where([class~="not-prose"] *)) { + display: inline-flex; + font-family: 'Operator Mono', monospace; + align-items: center; + border-radius: .375rem; + font-size: 1rem; + line-height: 1.25rem; + font-weight: 400; padding: .125rem .625rem; color: #065f46; background-color: #d1fae5; @@ -5840,10 +5857,6 @@ select { --tw-text-opacity: 1; color: rgb(110 231 183 / var(--tw-text-opacity)); } -.text-gray-300 { - --tw-text-opacity: 1; - color: rgb(209 213 219 / var(--tw-text-opacity)); -} .text-gray-400 { --tw-text-opacity: 1; color: rgb(156 163 175 / var(--tw-text-opacity)); @@ -5932,6 +5945,10 @@ select { --tw-text-opacity: 1; color: rgb(220 38 38 / var(--tw-text-opacity)); } +.text-gray-300 { + --tw-text-opacity: 1; + color: rgb(209 213 219 / var(--tw-text-opacity)); +} .text-yellow-400 { --tw-text-opacity: 1; color: rgb(250 204 21 / var(--tw-text-opacity)); diff --git a/resources/css/torchlight.css b/resources/css/torchlight.css index 4a84dde2..43e7c3e2 100644 --- a/resources/css/torchlight.css +++ b/resources/css/torchlight.css @@ -3,7 +3,7 @@ overflow-x-auto is recommended. */ pre { - @apply my-4 rounded overflow-x-auto; + @apply my-4 rounded overflow-x-auto font-mono text-lg; padding: 0 !important; } @@ -14,7 +14,7 @@ pre { colors extend edge to edge. */ pre code.torchlight { - @apply block p-4 min-w-max; + @apply block p-4 min-w-max font-mono; padding-top: 1rem !important; padding-bottom: 1rem !important; } diff --git a/resources/views/components/forum/thread-author.blade.php b/resources/views/components/forum/thread-author.blade.php index f6e44b4f..81e3a892 100644 --- a/resources/views/components/forum/thread-author.blade.php +++ b/resources/views/components/forum/thread-author.blade.php @@ -7,28 +7,28 @@
-

{{ '@'. $author->username }}

+

{{ '@'. $author->username }}

@if($author->bio) -

{{ $author->bio }}

+

{{ $author->bio }}

@endif @if($author->location)
-
+
Localisation
-
+
{{ $author->location }}
@endif
-
+
Inscrit Depuis
-
+
{{ $author->created_at->toFormattedDateString() }}
diff --git a/resources/views/components/forum/thread-overview.blade.php b/resources/views/components/forum/thread-overview.blade.php index 416ae425..afc7e131 100644 --- a/resources/views/components/forum/thread-overview.blade.php +++ b/resources/views/components/forum/thread-overview.blade.php @@ -15,7 +15,7 @@ {{ '@'. $thread->author->username }}

-

+

@@ -32,11 +32,11 @@ @endif -

+

{{ $thread->subject() }}

-
+
@@ -44,12 +44,12 @@

- {{ count($thread->replies) }} + {{ count($thread->replies) }} réponses

- {{ $thread->views_count }} + {{ $thread->views_count }} vues

diff --git a/resources/views/components/forum/thread.blade.php b/resources/views/components/forum/thread.blade.php index dc39b2d1..bf3c3884 100644 --- a/resources/views/components/forum/thread.blade.php +++ b/resources/views/components/forum/thread.blade.php @@ -4,7 +4,7 @@ @canany([App\Policies\ThreadPolicy::UPDATE, App\Policies\ThreadPolicy::DELETE], $thread)
-
+
diff --git a/resources/views/components/tag.blade.php b/resources/views/components/tag.blade.php index d3946dd3..ed42b53e 100644 --- a/resources/views/components/tag.blade.php +++ b/resources/views/components/tag.blade.php @@ -1,6 +1,6 @@ @props(['tag']) - + diff --git a/resources/views/forum/_channels.blade.php b/resources/views/forum/_channels.blade.php index 0653e5c9..462abe87 100644 --- a/resources/views/forum/_channels.blade.php +++ b/resources/views/forum/_channels.blade.php @@ -27,7 +27,7 @@ @@ -36,7 +36,7 @@
    @foreach($channel->items as $item)
  • - + {{ $item->name }}
  • diff --git a/resources/views/forum/_moderators.blade.php b/resources/views/forum/_moderators.blade.php index b78a45f7..89cec514 100644 --- a/resources/views/forum/_moderators.blade.php +++ b/resources/views/forum/_moderators.blade.php @@ -11,10 +11,10 @@
-

+

{{ $moderator->name }}

-

+

{{ '@' . $moderator->username }}

diff --git a/resources/views/forum/index.blade.php b/resources/views/forum/index.blade.php index 7e340f93..7c1dd267 100644 --- a/resources/views/forum/index.blade.php +++ b/resources/views/forum/index.blade.php @@ -15,7 +15,7 @@
diff --git a/resources/views/forum/thread.blade.php b/resources/views/forum/thread.blade.php index cbf0a703..e5a70875 100644 --- a/resources/views/forum/thread.blade.php +++ b/resources/views/forum/thread.blade.php @@ -27,10 +27,10 @@
-

{{ $thread->subject() }}

+

{{ $thread->subject() }}

-
+
Avatar de {{ $thread->author->username }} @@ -105,7 +105,7 @@ Veuillez vous connecter ou créer un compte pour participer à cette conversation.

@else -
+

Vous devrez vérifier votre compte avant de participer à cette conversation.

diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php index fcb41264..244438a7 100644 --- a/resources/views/home.blade.php +++ b/resources/views/home.blade.php @@ -10,10 +10,10 @@ Nouvelle section disponible sur le site -

+

Laravel Cameroun

-

+

Bienvenue sur le site de la communauté des développeurs PHP et Laravel du Cameroun, le plus gros rassemblement de développeurs au Cameroun.

@@ -137,37 +137,37 @@
-

A propos

-

Nous construisons une communauté Open Source d'apprenants et d'enseignants

-

- "Tout le monde enseigne, tout le monde apprend". +

A propos

+

Nous construisons une communauté Open Source d'apprenants et d'enseignants

+

+ "Tout le monde enseigne, tout le monde apprend". Tel est l'esprit qui est derrière la communauté. Une communauté qui se veut grandissante et qui donne la possibilité à tout le monde de partager ses connaissances et d'apprendre.

- 600+ - + 600+ + Membres qui ont rejoins les différents groupes de la communauté

- 50K+ - + 50K+ + Développeurs PHP & Laravel dans l’ensemble du territoire national.

- 9% - + 9% + Taux de participation aux événements car la communauté est encore très jeune.

- 10K+ - + 10K+ + stars sur les projets réalisés par les développeurs Camerounais sur Github.

diff --git a/resources/views/layouts/footer.blade.php b/resources/views/layouts/footer.blade.php index 583a239f..d4617adb 100644 --- a/resources/views/layouts/footer.blade.php +++ b/resources/views/layouts/footer.blade.php @@ -5,7 +5,7 @@
Laravel.cm Laravel.cm -

+

Laravel Country Logomarks {{ __('par') }} Caneco Caneco profile @@ -14,43 +14,43 @@

-

+

{{ __('Rejoignez nous') }}

-

+

{{ __('Rejoignez notre newsletter recevez des tutoriels, articles et podcasts sur le design et la programmation web.') }}

@@ -108,11 +108,11 @@
-

+

{{ __('Ou intégrez nos différentes plateformes de communication') }}

-

+

© 2018 - {{ date('Y') }} Laravel Cameroun. Tous droits réservés.

diff --git a/resources/views/livewire/forum/subscribe.blade.php b/resources/views/livewire/forum/subscribe.blade.php index 6bac68ee..513ddb11 100644 --- a/resources/views/livewire/forum/subscribe.blade.php +++ b/resources/views/livewire/forum/subscribe.blade.php @@ -1,9 +1,9 @@
-

+

Notifications

-
+
@can(App\Policies\ThreadPolicy::UNSUBSCRIBE, $thread)

Vous recevez actuellement des notifications de mises à jour de ce sujet. diff --git a/tailwind.config.js b/tailwind.config.js index 4063714b..59f3b6cc 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -127,11 +127,12 @@ module.exports = { }, 'p > code, code': { display: 'inline-flex', + fontFamily: "'Operator Mono', monospace", alignItems: 'center', borderRadius: '.375rem', - fontSize: '.875rem', + fontSize: '1rem', lineHeight: '1.25rem', - fontWeight: 500, + fontWeight: 400, padding: '.125rem .625rem', color: theme('colors.green.800'), backgroundColor: theme('colors.green.100'), From cf605edcf3fe8d7a89f2a5b1ccc26e386194f89a Mon Sep 17 00:00:00 2001 From: Arthur Monney Date: Fri, 7 Jan 2022 00:27:12 +0100 Subject: [PATCH 5/7] :children_crossing: modification des polices de caracteres --- public/css/app.css | 12 --- resources/views/articles/show.blade.php | 22 ++--- .../views/auth/forgot-password.blade.php | 2 +- resources/views/auth/login.blade.php | 2 +- resources/views/auth/register.blade.php | 18 ++-- resources/views/auth/reset-password.blade.php | 2 +- resources/views/auth/verify-email.blade.php | 2 +- .../views/components/user/stats.blade.php | 16 ++-- resources/views/forum/_moderators.blade.php | 2 +- .../views/livewire/articles/browse.blade.php | 86 +++++++++---------- resources/views/user/dashboard.blade.php | 2 +- 11 files changed, 76 insertions(+), 90 deletions(-) diff --git a/public/css/app.css b/public/css/app.css index 548bef50..1c2a4306 100755 --- a/public/css/app.css +++ b/public/css/app.css @@ -3556,18 +3556,6 @@ select { font-weight: 400; } .prose :where(p > code, code):not(:where([class~="not-prose"] *)) { - display: inline-flex; - align-items: center; - border-radius: .375rem; - font-size: 1rem; - line-height: 1.25rem; - font-weight: 400; - padding: .125rem .625rem; - color: #065f46; - background-color: #d1fae5; - font-family: 'Operator Mono', monospace; -} -.prose :where(p > code, code, pre):not(:where([class~="not-prose"] *)) { display: inline-flex; font-family: 'Operator Mono', monospace; align-items: center; diff --git a/resources/views/articles/show.blade.php b/resources/views/articles/show.blade.php index 51176807..ca429bfb 100644 --- a/resources/views/articles/show.blade.php +++ b/resources/views/articles/show.blade.php @@ -14,7 +14,7 @@