Skip to content

Commit

Permalink
adding updates to center text in container
Browse files Browse the repository at this point in the history
Tony Lea authored and Tony Lea committed Dec 4, 2024
1 parent 9f3ed99 commit 15fcfd0
Showing 5 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions config/devdojo/auth/descriptions.php
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@
'enable_email_registration' => 'Enable the ability for users to register via email',
'login_show_social_providers' => 'Show the social providers login buttons on the login form',
'center_align_social_provider_button_content' => 'Center align the content in the social provider button?',
'center_align_container_text' => 'Center align the text in the container?',
'social_providers_location' => 'The location of the social provider buttons (top or bottom)',
'check_account_exists_before_login' => 'Determines if the system checks for account existence before login',
],
1 change: 1 addition & 0 deletions config/devdojo/auth/settings.php
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@
'enable_email_registration' => true,
'login_show_social_providers' => true,
'center_align_social_provider_button_content' => false,
'center_align_container_text' => false,
'social_providers_location' => 'bottom',
'check_account_exists_before_login' => false,
];
2 changes: 1 addition & 1 deletion resources/views/components/elements/container.blade.php
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
@endphp

<div id="auth-container-parent" class="relative w-full sm:max-w-md {{ $containerParentClasses }}">
<div id="auth-container" class="flex relative top-0 z-20 flex-col justify-center items-stretch px-10 py-8 w-full h-screen bg-white border-gray-200 sm:top-auto sm:h-full {{ $containerClasses }}">
<div id="auth-container" class="flex relative top-0 z-20 flex-col justify-center @if(config('devdojo.auth.settings.center_align_container_text'){{ 'items-center' }}@else{{ 'items-stretch' }}@endif px-10 py-8 w-full h-screen bg-white border-gray-200 sm:top-auto sm:h-full {{ $containerClasses }}">
{{ $slot }}
</div>
</div>
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
@if($separator && config('devdojo.auth.settings.social_providers_location') != 'top')
<x-auth::elements.separator class="my-6">{{ $separator_text }}</x-auth::elements.separator>
@endif
<div class="relative space-y-2 w-full">
<div class="relative space-y-2 w-full @if(config('devdojo.auth.settings.social_providers_location') != 'top' && !$separator){{ 'mt-3' }}@endif">
@foreach($socialProviders as $slug => $provider)
<x-auth::elements.social-button :$slug :$provider />
@endforeach
2 changes: 1 addition & 1 deletion resources/views/pages/auth/register.blade.php
Original file line number Diff line number Diff line change
@@ -184,7 +184,7 @@ public function register()
</form>
@endif

<div class="mt-3 space-x-0.5 text-sm leading-5 text-left" style="color:{{ config('devdojo.auth.appearance.color.text') }}">
<div class="@if(config('devdojo.auth.settings.social_providers_location') != 'top' && $showEmailRegistration){{ 'mt-3' }}@endif space-x-0.5 text-sm leading-5 text-left" style="color:{{ config('devdojo.auth.appearance.color.text') }}">
<span class="opacity-[47%]">{{config('devdojo.auth.language.register.already_have_an_account')}}</span>
<x-auth::elements.text-link data-auth="login-link" href="{{ route('auth.login') }}">{{config('devdojo.auth.language.register.sign_in')}}</x-auth::elements.text-link>
</div>

0 comments on commit 15fcfd0

Please sign in to comment.