Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RTL support #66

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion resources/views/components/app-logo.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="flex aspect-square size-8 items-center justify-center rounded-md bg-accent-content text-accent-foreground">
<x-app-logo-icon class="size-5 fill-current text-white dark:text-black" />
</div>
<div class="ml-1 grid flex-1 text-left text-sm">
<div class="ms-1 grid flex-1 text-start text-sm">
<span class="mb-0.5 truncate leading-none font-semibold">Laravel Starter Kit</span>
</div>
10 changes: 5 additions & 5 deletions resources/views/components/layouts/app/header.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<flux:header container class="border-b border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900">
<flux:sidebar.toggle class="lg:hidden" icon="bars-2" inset="left" />

<a href="{{ route('dashboard') }}" class="ml-2 mr-5 flex items-center space-x-2 lg:ml-0" wire:navigate>
<a href="{{ route('dashboard') }}" class="ms-2 me-5 flex items-center space-x-2 rtl:space-x-reverse lg:ms-0" wire:navigate>
<x-app-logo />
</a>

Expand All @@ -19,7 +19,7 @@

<flux:spacer />

<flux:navbar class="mr-1.5 space-x-0.5 py-0!">
<flux:navbar class="me-1.5 space-x-0.5 rtl:space-x-reverse py-0!">
<flux:tooltip :content="__('Search')" position="bottom">
<flux:navbar.item class="!h-10 [&>div>svg]:size-5" icon="magnifying-glass" href="#" :label="__('Search')" />
</flux:tooltip>
Expand Down Expand Up @@ -53,7 +53,7 @@ class="cursor-pointer"
<flux:menu>
<flux:menu.radio.group>
<div class="p-0 text-sm font-normal">
<div class="flex items-center gap-2 px-1 py-1.5 text-left text-sm">
<div class="flex items-center gap-2 px-1 py-1.5 text-start text-sm">
<span class="relative flex h-8 w-8 shrink-0 overflow-hidden rounded-lg">
<span
class="flex h-full w-full items-center justify-center rounded-lg bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white"
Expand All @@ -62,7 +62,7 @@ class="flex h-full w-full items-center justify-center rounded-lg bg-neutral-200
</span>
</span>

<div class="grid flex-1 text-left text-sm leading-tight">
<div class="grid flex-1 text-start text-sm leading-tight">
<span class="truncate font-semibold">{{ auth()->user()->name }}</span>
<span class="truncate text-xs">{{ auth()->user()->email }}</span>
</div>
Expand Down Expand Up @@ -92,7 +92,7 @@ class="flex h-full w-full items-center justify-center rounded-lg bg-neutral-200
<flux:sidebar stashable sticky class="lg:hidden border-r border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900">
<flux:sidebar.toggle class="lg:hidden" icon="x-mark" />

<a href="{{ route('dashboard') }}" class="ml-1 flex items-center space-x-2" wire:navigate>
<a href="{{ route('dashboard') }}" class="ms-1 flex items-center space-x-2 rtl:space-x-reverse" wire:navigate>
<x-app-logo />
</a>

Expand Down
10 changes: 5 additions & 5 deletions resources/views/components/layouts/app/sidebar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<flux:sidebar sticky stashable class="border-r border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900">
<flux:sidebar.toggle class="lg:hidden" icon="x-mark" />

<a href="{{ route('dashboard') }}" class="mr-5 flex items-center space-x-2" wire:navigate>
<a href="{{ route('dashboard') }}" class="me-5 flex items-center space-x-2 rtl:space-x-reverse" wire:navigate>
<x-app-logo />
</a>

Expand Down Expand Up @@ -40,7 +40,7 @@
<flux:menu class="w-[220px]">
<flux:menu.radio.group>
<div class="p-0 text-sm font-normal">
<div class="flex items-center gap-2 px-1 py-1.5 text-left text-sm">
<div class="flex items-center gap-2 px-1 py-1.5 text-start text-sm">
<span class="relative flex h-8 w-8 shrink-0 overflow-hidden rounded-lg">
<span
class="flex h-full w-full items-center justify-center rounded-lg bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white"
Expand All @@ -49,7 +49,7 @@ class="flex h-full w-full items-center justify-center rounded-lg bg-neutral-200
</span>
</span>

<div class="grid flex-1 text-left text-sm leading-tight">
<div class="grid flex-1 text-start text-sm leading-tight">
<span class="truncate font-semibold">{{ auth()->user()->name }}</span>
<span class="truncate text-xs">{{ auth()->user()->email }}</span>
</div>
Expand Down Expand Up @@ -90,7 +90,7 @@ class="flex h-full w-full items-center justify-center rounded-lg bg-neutral-200
<flux:menu>
<flux:menu.radio.group>
<div class="p-0 text-sm font-normal">
<div class="flex items-center gap-2 px-1 py-1.5 text-left text-sm">
<div class="flex items-center gap-2 px-1 py-1.5 text-start text-sm">
<span class="relative flex h-8 w-8 shrink-0 overflow-hidden rounded-lg">
<span
class="flex h-full w-full items-center justify-center rounded-lg bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white"
Expand All @@ -99,7 +99,7 @@ class="flex h-full w-full items-center justify-center rounded-lg bg-neutral-200
</span>
</span>

<div class="grid flex-1 text-left text-sm leading-tight">
<div class="grid flex-1 text-start text-sm leading-tight">
<span class="truncate font-semibold">{{ auth()->user()->name }}</span>
<span class="truncate text-xs">{{ auth()->user()->email }}</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/layouts/auth/split.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="absolute inset-0 bg-neutral-900"></div>
<a href="{{ route('home') }}" class="relative z-20 flex items-center text-lg font-medium" wire:navigate>
<span class="flex h-10 w-10 items-center justify-center rounded-md">
<x-app-logo-icon class="mr-2 h-7 fill-current text-white" />
<x-app-logo-icon class="me-2 h-7 fill-current text-white" />
</span>
{{ config('app.name', 'Laravel') }}
</a>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/settings/layout.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="flex items-start max-md:flex-col">
<div class="mr-10 w-full pb-4 md:w-[220px]">
<div class="me-10 w-full pb-4 md:w-[220px]">
<flux:navlist>
<flux:navlist.item :href="route('settings.profile')" wire:navigate>{{ __('Profile') }}</flux:navlist.item>
<flux:navlist.item :href="route('settings.password')" wire:navigate>{{ __('Password') }}</flux:navlist.item>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/flux/navlist/group.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
type="button"
class="group/disclosure-button mb-[2px] flex h-10 w-full items-center rounded-lg text-zinc-500 hover:bg-zinc-800/5 hover:text-zinc-800 lg:h-8 dark:text-white/80 dark:hover:bg-white/[7%] dark:hover:text-white"
>
<div class="pl-3 pr-4">
<div class="ps-3 pe-4">
<flux:icon.chevron-down class="hidden size-3! group-data-open/disclosure-button:block" />
<flux:icon.chevron-right class="block size-3! group-data-open/disclosure-button:hidden" />
</div>

<span class="text-sm font-medium leading-none">{{ $heading }}</span>
</button>

<div class="relative hidden space-y-[2px] pl-7 data-open:block" @if ($expanded === true) data-open @endif>
<div class="absolute inset-y-[3px] left-0 ml-4 w-px bg-zinc-200 dark:bg-white/30"></div>
<div class="relative hidden space-y-[2px] ps-7 data-open:block" @if ($expanded === true) data-open @endif>
<div class="absolute inset-y-[3px] start-0 ms-4 w-px bg-zinc-200 dark:bg-white/30"></div>

{{ $slot }}
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/livewire/auth/forgot-password.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function sendPasswordResetLink(): void
<flux:button variant="primary" type="submit" class="w-full">{{ __('Email password reset link') }}</flux:button>
</form>

<div class="space-x-1 text-center text-sm text-zinc-400">
<div class="space-x-1 rtl:space-x-reverse text-center text-sm text-zinc-400">
{{ __('Or, return to') }}
<flux:link :href="route('login')" wire:navigate>{{ __('log in') }}</flux:link>
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/livewire/auth/login.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected function throttleKey(): string
/>

@if (Route::has('password.request'))
<flux:link class="absolute right-0 top-0 text-sm" :href="route('password.request')" wire:navigate>
<flux:link class="absolute end-0 top-0 text-sm" :href="route('password.request')" wire:navigate>
{{ __('Forgot your password?') }}
</flux:link>
@endif
Expand All @@ -118,7 +118,7 @@ protected function throttleKey(): string
</form>

@if (Route::has('register'))
<div class="space-x-1 text-center text-sm text-zinc-600 dark:text-zinc-400">
<div class="space-x-1 rtl:space-x-reverse text-center text-sm text-zinc-600 dark:text-zinc-400">
{{ __('Don\'t have an account?') }}
<flux:link :href="route('register')" wire:navigate>{{ __('Sign up') }}</flux:link>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/livewire/auth/register.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function register(): void
</div>
</form>

<div class="space-x-1 text-center text-sm text-zinc-600 dark:text-zinc-400">
<div class="space-x-1 rtl:space-x-reverse text-center text-sm text-zinc-600 dark:text-zinc-400">
{{ __('Already have an account?') }}
<flux:link :href="route('login')" wire:navigate>{{ __('Log in') }}</flux:link>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function deleteUser(Logout $logout): void

<flux:input wire:model="password" :label="__('Password')" type="password" />

<div class="flex justify-end space-x-2">
<div class="flex justify-end space-x-2 rtl:space-x-reverse">
<flux:modal.close>
<flux:button variant="filled">{{ __('Cancel') }}</flux:button>
</flux:modal.close>
Expand Down
21 changes: 11 additions & 10 deletions resources/views/welcome.blade.php

Large diffs are not rendered by default.