Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

Refactor login.blade.php layout and add registration and OAuth options

Andras Bacsai3c2beded6874
diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php
index 82ea5062b8..f51632379c 100644
--- a/resources/views/auth/login.blade.php
+++ b/resources/views/auth/login.blade.php
@@ -4,8 +4,7 @@
<a class="flex items-center mb-6 text-5xl font-extrabold tracking-tight text-gray-900 dark:text-white">
Coolify
</a>
- <div
- class="w-full bg-white shadow md:mt-0 sm:max-w-md xl:p-0 dark:bg-base ">
+ <div class="w-full bg-white shadow md:mt-0 sm:max-w-md xl:p-0 dark:bg-base ">
<div class="p-6 space-y-4 md:space-y-6 sm:p-8">
<form action="/login" method="POST" class="flex flex-col gap-2">
@csrf
@@ -28,27 +27,7 @@
</a>
@endenv
<x-forms.button class="mt-10" type="submit">{{ __('auth.login') }}</x-forms.button>
- @if ($is_registration_enabled)
- <a href="/register" class="button bg-coollabs-gradient">
- {{ __('auth.register_now') }}
- </a>
- @endif
- @if ($enabled_oauth_providers->isNotEmpty())
- <div class="relative">
- <div class="absolute inset-0 flex items-center" aria-hidden="true">
- <div class="w-full border-t dark:border-coolgray-200"></div>
- </div>
- <div class="relative flex justify-center">
- <span class="px-2 text-sm dark:text-neutral-500 dark:bg-base">or</span>
- </div>
- </div>
- @endif
- @foreach ($enabled_oauth_providers as $provider_setting)
- <x-forms.button type="button"
- onclick="document.location.href='/auth/{{ $provider_setting->provider }}/redirect'">
- {{ __("auth.login.$provider_setting->provider") }}
- </x-forms.button>
- @endforeach
+
@if (!$is_registration_enabled)
<div class="text-center text-neutral-500">{{ __('auth.registration_disabled') }}</div>
@endif
@@ -70,6 +49,27 @@
</div>
@endif
</form>
+ @if ($is_registration_enabled)
+ <a href="/register" class="button bg-coollabs-gradient">
+ {{ __('auth.register_now') }}
+ </a>
+ @endif
+ @if ($enabled_oauth_providers->isNotEmpty())
+ <div class="relative">
+ <div class="absolute inset-0 flex items-center" aria-hidden="true">
+ <div class="w-full border-t dark:border-coolgray-200"></div>
+ </div>
+ <div class="relative flex justify-center">
+ <span class="px-2 text-sm dark:text-neutral-500 dark:bg-base">or</span>
+ </div>
+ </div>
+ @endif
+ @foreach ($enabled_oauth_providers as $provider_setting)
+ <x-forms.button type="button"
+ onclick="document.location.href='/auth/{{ $provider_setting->provider }}/redirect'">
+ {{ __("auth.login.$provider_setting->provider") }}
+ </x-forms.button>
+ @endforeach
</div>
</div>
</div>