From: Vincent Vanwaelscappel Date: Tue, 19 Sep 2023 09:36:38 +0000 (+0200) Subject: wip #6260 @2.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=5038236af8da60c99db2f86bf58445a86f711fc1;p=fluidbook-toolbox.git wip #6260 @2.5 --- diff --git a/.docker/docker-compose.yml b/.docker/docker-compose.yml index 7b376532e..1e5ac4dd1 100644 --- a/.docker/docker-compose.yml +++ b/.docker/docker-compose.yml @@ -96,8 +96,8 @@ services: ports: - '37126:80' environment: - VIRTUAL_HOST: toolbox.fluidbook.com - LETSENCRYPT_HOST: toolbox.fluidbook.com + VIRTUAL_HOST: toolbox.fluidbook.com, ysl.toolbox.fluidbook.com + LETSENCRYPT_HOST: toolbox.fluidbook.com, ysl.toolbox.fluidbook.com networks: - fluidbook-toolbox restart: unless-stopped diff --git a/.env.prod b/.env.prod index e97c1037d..035cd1d3a 100644 --- a/.env.prod +++ b/.env.prod @@ -8,6 +8,9 @@ DEBUGBAR_OPEN_STORAGE=true APP_URL=https://toolbox.fluidbook.com HEADER_COLOR="#263340" +THEME=toolbox +POWERED_BY_LINK=https://www.fluidbook.com/ + LOG_CHANNEL=stack APP_LOG=daily @@ -46,6 +49,7 @@ MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS=toolbox@fluidbook.com MAIL_FROM_NAME="Fluidbook Toolbox" MAIL_BCC_ALL=test+toolbox@cubedesigners.com +MAIL_TEAM_NAME=Fluidbook MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" diff --git a/.env.ysl b/.env.ysl new file mode 100644 index 000000000..14941a4c2 --- /dev/null +++ b/.env.ysl @@ -0,0 +1,19 @@ +APP_NAME="[MAP|EMULSION] ✕ SAINT LAURENT - Statistics" + +APP_URL=https://ysl.toolbox.fluidbook.com +HEADER_COLOR="#000000" +THEME=ysl +APP_ENV=ysl + +SESSION_DOMAIN=ysl.toolbox.fluidbook.com + +POWERED_BY_LINK= + +MAIL_HOST=in.mailjet.com +MAIL_PORT=587 +MAIL_USERNAME=ca110b35f8735c223d69c9987c2ac47d +MAIL_PASSWORD=b289d0acb08e0fe56ce98ccf0dd1ed8b +MAIL_ENCRYPTION=tls +MAIL_TEAM_NAME=[MAP|EMULSION] +MAIL_FROM_ADDRESS=ysl@map-emulsion.com +MAIL_FROM_NAME="[MAP|EMULSION]" diff --git a/app/Notifications/ToolboxNotification.php b/app/Notifications/ToolboxNotification.php index ec04fccee..ac9f520fe 100644 --- a/app/Notifications/ToolboxNotification.php +++ b/app/Notifications/ToolboxNotification.php @@ -65,7 +65,7 @@ class ToolboxNotification extends Notification foreach ($this->actions as $label => $url) { $m->line(new HtmlString($label . __(': ') . ' ' . $url . '')); } - $m->salutation(new HtmlString(__('Cordialement,') . "
" . __('L\'équipe Fluidbook'))); + $m->salutation(new HtmlString(__('Cordialement,') . "
" . __('L\'équipe :teamname',['team_name'=>env('MAIL_TEAM_NAME')]))); return $m; } diff --git a/bootstrap/app.php b/bootstrap/app.php index 8d4e15eee..3f556bf9e 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -15,6 +15,11 @@ $app = new Cubist\Backpack\Application( $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__) ); +if (isset($_SERVER['HTTP_HOST']) && stristr($_SERVER['HTTP_HOST'], 'ysl')) { + $merged = \Cubist\Util\Env::mergeEnvFiles('/application/.env.prod', '/application/.env.ysl'); + $app->loadEnvironmentFrom('../../../' . $merged); +} + /* |-------------------------------------------------------------------------- | Bind Important Interfaces diff --git a/config/auth.php b/config/auth.php index f6c662bf1..c189260a6 100644 --- a/config/auth.php +++ b/config/auth.php @@ -97,7 +97,7 @@ return [ 'provider' => 'users', 'table' => 'password_resets', 'expire' => 60, - 'throttle' => 60, + 'throttle' => 5, ], ], diff --git a/config/backpack/base.php b/config/backpack/base.php index 8deea023c..2f7e3b1a0 100644 --- a/config/backpack/base.php +++ b/config/backpack/base.php @@ -95,7 +95,7 @@ return [ // ------ // Menu logo. You can replace this with an tag if you have a logo. - 'project_logo' => 'Fluidbook Toolbox', + 'project_logo' => ''.env('APP_NAME').'', // Show / hide breadcrumbs on admin panel pages. 'breadcrumbs' => true, @@ -132,7 +132,7 @@ return [ 'developer_name' => 'Fluidbook', // Developer website. Link in footer. Type false if you want to hide it. - 'developer_link' => 'https://www.fluidbook.com', + 'developer_link' => env('POWERED_BY_LINK','https://www.fluidbook.com'), // Show powered by Laravel Backpack in the footer? true/false 'show_powered_by' => false, diff --git a/config/theme.php b/config/theme.php new file mode 100644 index 000000000..23071308e --- /dev/null +++ b/config/theme.php @@ -0,0 +1,6 @@ + env('THEME'), + 'header_color' => env('HEADER_COLOR'), +]; diff --git a/public/themes/toolbox/logo-email.png b/public/themes/toolbox/logo-email.png new file mode 100644 index 000000000..07e289990 Binary files /dev/null and b/public/themes/toolbox/logo-email.png differ diff --git a/public/themes/toolbox/logo-light.svg b/public/themes/toolbox/logo-light.svg new file mode 100644 index 000000000..4df1d8600 --- /dev/null +++ b/public/themes/toolbox/logo-light.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/themes/toolbox/logo.svg b/public/themes/toolbox/logo.svg new file mode 100644 index 000000000..26863ff23 --- /dev/null +++ b/public/themes/toolbox/logo.svg @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/themes/toolbox/style.css b/public/themes/toolbox/style.css new file mode 100644 index 000000000..e69de29bb diff --git a/public/themes/ysl/logo-email.png b/public/themes/ysl/logo-email.png new file mode 100644 index 000000000..d4acb5d92 Binary files /dev/null and b/public/themes/ysl/logo-email.png differ diff --git a/public/themes/ysl/logo-light.svg b/public/themes/ysl/logo-light.svg new file mode 100644 index 000000000..cda21a7ae --- /dev/null +++ b/public/themes/ysl/logo-light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/themes/ysl/logo.svg b/public/themes/ysl/logo.svg new file mode 100644 index 000000000..fa80c977c --- /dev/null +++ b/public/themes/ysl/logo.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + diff --git a/public/themes/ysl/style.css b/public/themes/ysl/style.css new file mode 100644 index 000000000..8c1471d8d --- /dev/null +++ b/public/themes/ysl/style.css @@ -0,0 +1,3 @@ +body { + filter: grayscale(1); +} diff --git a/resources/views/vendor/backpack/base/auth/login.blade.php b/resources/views/vendor/backpack/base/auth/login.blade.php index 4128ce265..df5880d83 100644 --- a/resources/views/vendor/backpack/base/auth/login.blade.php +++ b/resources/views/vendor/backpack/base/auth/login.blade.php @@ -3,17 +3,21 @@ @section('content')
-

Logo Fluidbook Toolbox

+

{{env('APP_NAME')}}

-
+ {!! csrf_field() !!}
- +
- + @if ($errors->has($username)) @@ -27,7 +31,9 @@
- + @if ($errors->has('password')) @@ -41,7 +47,8 @@
@@ -58,10 +65,13 @@
@if (backpack_users_have_email()) - + @endif @if (config('backpack.base.registration_open')) - + @endif
diff --git a/resources/views/vendor/backpack/base/inc/head.blade.php b/resources/views/vendor/backpack/base/inc/head.blade.php index b9e975c5e..8c0422c35 100644 --- a/resources/views/vendor/backpack/base/inc/head.blade.php +++ b/resources/views/vendor/backpack/base/inc/head.blade.php @@ -1,33 +1,41 @@ - - - - @if (config('backpack.base.meta_robots_content')) @endif + + + +@if (config('backpack.base.meta_robots_content')) + +@endif - {{-- Encrypted CSRF token for Laravel, in order for Ajax requests to work --}} - {{ isset($title) ? $title.' :: '.config('backpack.base.project_name') : config('backpack.base.project_name') }} - + {{-- Encrypted CSRF token for Laravel, in order for Ajax requests to work --}} +{{ isset($title) ? $title.' :: '.config('backpack.base.project_name') : config('backpack.base.project_name') }} + - @yield('before_styles') - @stack('before_styles') +@yield('before_styles') +@stack('before_styles') - @foreach(config('backpack.base.styles', []) as $path) - - @endforeach +@foreach(config('backpack.base.styles', []) as $path) + +@endforeach - @foreach(config('backpack.base.mix_styles', []) as $path => $manifest) - - @endforeach +@foreach(config('backpack.base.mix_styles', []) as $path => $manifest) + +@endforeach - @if(!empty(config('backpack.base.vite_styles', []))) - @vite(config('backpack.base.vite_styles', [])) - @endif +@if(!empty(config('backpack.base.vite_styles', []))) + @vite(config('backpack.base.vite_styles', [])) +@endif - @yield('after_styles') - @stack('after_styles') +@yield('after_styles') +@stack('after_styles') - {{-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --}} + + +{{-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --}} {{-- WARNING: Respond.js doesn't work if you view the page via file:// --}} + + + diff --git a/resources/views/vendor/mail/html/message.blade.php b/resources/views/vendor/mail/html/message.blade.php index b5adaa77e..e5122faf0 100644 --- a/resources/views/vendor/mail/html/message.blade.php +++ b/resources/views/vendor/mail/html/message.blade.php @@ -2,7 +2,7 @@ {{-- Header --}} @slot('header') @component('mail::header', ['url' => config('app.url')]) - {{ config('app.name') }} + {{ config('app.name') }} @endcomponent @endslot