From 21ec76f4111395f9171285d49879aa9fa3c5e157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20Ioni=C8=9B=C4=83?= Date: Wed, 13 Dec 2023 16:08:08 +0000 Subject: [PATCH] feat: prelaunch page (#305) * feat: prelaunch page * feat: configurable prelaunch secret --- .dockerignore | 2 + config/blade-icons.php | 185 ++++++++++++++++++++++++++++ docker/s6-rc.d/laravel/init.sh | 11 +- resources/views/prelaunch.blade.php | 49 ++++++++ 4 files changed, 246 insertions(+), 1 deletion(-) create mode 100644 config/blade-icons.php create mode 100644 resources/views/prelaunch.blade.php diff --git a/.dockerignore b/.dockerignore index 50ac6cf8..c103e3e4 100644 --- a/.dockerignore +++ b/.dockerignore @@ -20,6 +20,8 @@ /storage/framework/sessions/* /storage/framework/testing/* /storage/framework/views/* +/storage/framework/down +/storage/framework/maintenance.php /storage/logs/* /terraform /.scannerwork diff --git a/config/blade-icons.php b/config/blade-icons.php new file mode 100644 index 00000000..24c85fe3 --- /dev/null +++ b/config/blade-icons.php @@ -0,0 +1,185 @@ + [ + + 'default' => [ + + /* + |----------------------------------------------------------------- + | Icons Path + |----------------------------------------------------------------- + | + | Provide the relative path from your app root to your SVG icons + | directory. Icons are loaded recursively so there's no need to + | list every sub-directory. + | + | Relative to the disk root when the disk option is set. + | + */ + + 'path' => 'resources/svg', + + /* + |----------------------------------------------------------------- + | Filesystem Disk + |----------------------------------------------------------------- + | + | Optionally, provide a specific filesystem disk to read + | icons from. When defining a disk, the "path" option + | starts relatively from the disk root. + | + */ + + 'disk' => '', + + /* + |----------------------------------------------------------------- + | Default Prefix + |----------------------------------------------------------------- + | + | This config option allows you to define a default prefix for + | your icons. The dash separator will be applied automatically + | to every icon name. It's required and needs to be unique. + | + */ + + 'prefix' => 'icon', + + /* + |----------------------------------------------------------------- + | Fallback Icon + |----------------------------------------------------------------- + | + | This config option allows you to define a fallback + | icon when an icon in this set cannot be found. + | + */ + + 'fallback' => '', + + /* + |----------------------------------------------------------------- + | Default Set Classes + |----------------------------------------------------------------- + | + | This config option allows you to define some classes which + | will be applied by default to all icons within this set. + | + */ + + 'class' => '', + + /* + |----------------------------------------------------------------- + | Default Set Attributes + |----------------------------------------------------------------- + | + | This config option allows you to define some attributes which + | will be applied by default to all icons within this set. + | + */ + + 'attributes' => [ + // 'width' => 50, + // 'height' => 50, + ], + + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Global Default Classes + |-------------------------------------------------------------------------- + | + | This config option allows you to define some classes which + | will be applied by default to all icons. + | + */ + + 'class' => '', + + /* + |-------------------------------------------------------------------------- + | Global Default Attributes + |-------------------------------------------------------------------------- + | + | This config option allows you to define some attributes which + | will be applied by default to all icons. + | + */ + + 'attributes' => [ + // 'width' => 50, + // 'height' => 50, + ], + + /* + |-------------------------------------------------------------------------- + | Global Fallback Icon + |-------------------------------------------------------------------------- + | + | This config option allows you to define a global fallback + | icon when an icon in any set cannot be found. It can + | reference any icon from any configured set. + | + */ + + 'fallback' => '', + + /* + |-------------------------------------------------------------------------- + | Components + |-------------------------------------------------------------------------- + | + | These config options allow you to define some + | settings related to Blade Components. + | + */ + + 'components' => [ + + /* + |---------------------------------------------------------------------- + | Disable Components + |---------------------------------------------------------------------- + | + | This config option allows you to disable Blade components + | completely. It's useful to avoid performance problems + | when working with large icon libraries. + | + */ + + 'disabled' => false, + + /* + |---------------------------------------------------------------------- + | Default Icon Component Name + |---------------------------------------------------------------------- + | + | This config option allows you to define the name + | for the default Icon class component. + | + */ + + 'default' => 'icon', + + ], + +]; diff --git a/docker/s6-rc.d/laravel/init.sh b/docker/s6-rc.d/laravel/init.sh index a0afddce..5186138e 100755 --- a/docker/s6-rc.d/laravel/init.sh +++ b/docker/s6-rc.d/laravel/init.sh @@ -3,10 +3,19 @@ cd /var/www php artisan migrate --force +php artisan storage:link + php artisan config:cache php artisan event:cache php artisan route:cache php artisan view:cache -php artisan storage:link +php artisan icons:cache + +if [ -n "${PRELAUNCH_SECRET}" ]; then + php artisan down \ + --secret="$PRELAUNCH_SECRET" \ + --render="prelaunch" \ + --status="200" +fi php artisan about diff --git a/resources/views/prelaunch.blade.php b/resources/views/prelaunch.blade.php new file mode 100644 index 00000000..62bb8179 --- /dev/null +++ b/resources/views/prelaunch.blade.php @@ -0,0 +1,49 @@ + + + + + + + + {{ config('app.name') }} + + + @vite(['resources/css/app.css']) + + + +
+
+ Logo Bursa Binelui + +

+ Coming + soon +

+ +
+
+

+ Ea occaecat aliquip id qui esse fugiat mollit consequat nostrud velit pariatur. Ipsum labore + excepteur + sit sit ex proident. Eiusmod cillum fugiat incididunt occaecat aliqua ex fugiat minim nostrud + nulla sunt + Lorem dolor ad consequat. Quis dolore ad cillum occaecat. +

+
+ + +
+
+ + + +
+ + + +