Skip to content

Commit

Permalink
feat: prelaunch page (#305)
Browse files Browse the repository at this point in the history
* feat: prelaunch page

* feat: configurable prelaunch secret
  • Loading branch information
andreiio committed Dec 13, 2023
1 parent 46b78ff commit 21ec76f
Show file tree
Hide file tree
Showing 4 changed files with 246 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
/storage/framework/sessions/*
/storage/framework/testing/*
/storage/framework/views/*
/storage/framework/down
/storage/framework/maintenance.php
/storage/logs/*
/terraform
/.scannerwork
Expand Down
185 changes: 185 additions & 0 deletions config/blade-icons.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
<?php

declare(strict_types=1);

return [

/*
|--------------------------------------------------------------------------
| Icons Sets
|--------------------------------------------------------------------------
|
| With this config option you can define a couple of
| default icon sets. Provide a key name for your icon
| set and a combination from the options below.
|
*/

'sets' => [

'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',

],

];
11 changes: 10 additions & 1 deletion docker/s6-rc.d/laravel/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
49 changes: 49 additions & 0 deletions resources/views/prelaunch.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>{{ config('app.name') }}</title>

<!-- Scripts -->
@vite(['resources/css/app.css'])
</head>

<body class="font-sans antialiased">
<main class="container relative grid items-center min-h-screen lg:gap-10 xl:gap-20 lg:grid-cols-2">
<div class="py-12">
<img class="mb-8" src="/images/bursa_binelui_logo.png" alt="Logo Bursa Binelui" />

<h1 class="text-4xl font-extrabold tracking-tight text-gray-900 md:text-5xl lg:text-6xl">
<span class="inline-block">Coming</span>
<span class="inline-block text-primary-500">soon</span>
</h1>

<div class="relative flex flex-wrap items-center gap-6 pb-10 my-10">
<div class="prose">
<p>
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.
</p>
</div>

<x-icon-patterns.square-small @class([
'absolute top-full -left-16 -z-10',
'hidden shrink-0 md:block',
'fill-primary-300 w-32 h-32',
]) />
</div>
</div>

<x-icon-patterns.hero class="hero lg:block" />

</main>

</body>

</html>

0 comments on commit 21ec76f

Please sign in to comment.