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

Feature/lar 13 modification navigation #155

Merged
merged 5 commits into from
Oct 14, 2024
Merged
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
4 changes: 2 additions & 2 deletions app/Console/Commands/NotifyPendingArticles.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
namespace App\Console\Commands;

use App\Models\Article;
use App\Notifications\PendingArticlesNotification;
use Illuminate\Console\Command;
use Illuminate\Notifications\AnonymousNotifiable;
use App\Notifications\PendingArticlesNotification;

final class NotifyPendingArticles extends Command
{
Expand All @@ -23,4 +23,4 @@ public function handle(AnonymousNotifiable $notifiable): void
$notifiable->notify(new PendingArticlesNotification($pendingArticles));
}
}
}
}
2 changes: 1 addition & 1 deletion app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ protected function commands(): void
{
$this->load(__DIR__.'/Commands');
}
}
}
8 changes: 3 additions & 5 deletions app/Notifications/PendingArticlesNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
namespace App\Notifications;

use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use NotificationChannels\Telegram\TelegramChannel;
use NotificationChannels\Telegram\TelegramMessage;

Expand Down Expand Up @@ -42,11 +40,11 @@ private function content(): string
'profile_url' => route('profile', $article->user?->username),
'title' => $article->title,
'url' => route('articles.show', $article->slug),
'date' => $article->submitted_at->translatedFormat('d/m/Y')
'date' => $article->submitted_at->translatedFormat('d/m/Y'),
]
);
}

return $message;
}
}
}
5 changes: 5 additions & 0 deletions lang/en/global.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
'forum' => 'Forum',
'articles' => 'Posts',
'discussions' => 'Discussions',
'community' => 'Community',
'about' => 'About',
'podcasts' => 'Podcasts',
'jobs' => 'Jobs',
'sponsors' => 'Sponsors',
'snippets' => 'Snippets',
'branding' => 'Branding',
'faq' => 'FAQ',
'rules' => 'Rules',
Expand Down Expand Up @@ -45,5 +47,8 @@
'sponsored' => 'Sponsored',
'read_time' => ':time min reading',
'page_views' => ':number views',
'open_navigation' => 'Open main menu',
'close_navigation' => 'Close menu',
'view_notifications' => 'View notifications',

];
5 changes: 5 additions & 0 deletions lang/fr/global.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
'forum' => 'Forum',
'articles' => 'Articles',
'discussions' => 'Discussions',
'community' => 'Communauté',
'about' => 'A propos',
'podcasts' => 'Podcasts',
'jobs' => 'Offres',
'sponsors' => 'Soutien',
'snippets' => 'Snippets',
'branding' => 'Branding',
'faq' => 'FAQ',
'rules' => 'Code de conduite',
Expand Down Expand Up @@ -45,5 +47,8 @@
'sponsored' => 'Sponsorisé',
'read_time' => ':time min de lecture',
'page_views' => ':number vues',
'open_navigation' => 'Ouvrir le menu',
'close_navigation' => 'Fermer le menu',
'view_notifications' => 'Voir les notifications',

];
70 changes: 6 additions & 64 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,69 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<<<<<<< HEAD
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
cacheDirectory=".phpunit.cache"
>
<testsuites>
<testsuite name="Unit">
<directory>tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory>tests/Feature</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory>app</directory>
</include>
</source>
<php>
<env name="APP_ENV" value="testing"/>
<env name="APP_KEY" value="base64:NXoQgjw2ZlOxnGbo5ZRhYgTdM6xLYsgYElNAgcTQJkE="/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_STORE" value="array"/>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
<env name="MAIL_MAILER" value="array"/>
<env name="PULSE_ENABLED" value="false"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>
</php>
||||||| parent of db5bfeb (refactoring: Drop laravel world dependencies and apply refactoring to views and tests)
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true" cacheDirectory=".phpunit.cache">
<testsuites>
<testsuite name="Integration">
<directory suffix="Test.php">./tests/Integration</directory>
</testsuite>
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
</testsuites>
<coverage/>
<php>
<server name="APP_ENV" value="testing"/>
<env name="APP_KEY" value="base64:NXoQgjw2ZlOxnGbo5ZRhYgTdM6xLYsgYElNAgcTQJkE="/>
<server name="BCRYPT_ROUNDS" value="4"/>
<server name="CACHE_DRIVER" value="array"/>
<server name="DB_CONNECTION" value="sqlite"/>
<server name="DB_DATABASE" value=":memory:"/>
<server name="MAIL_MAILER" value="array"/>
<server name="QUEUE_CONNECTION" value="sync"/>
<server name="SESSION_DRIVER" value="array"/>
<server name="TELESCOPE_ENABLED" value="false"/>
</php>
<source>
<include>
<directory suffix=".php">./app</directory>
</include>
</source>
=======
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true" cacheDirectory=".phpunit.cache">
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
Expand All @@ -86,5 +29,4 @@
<directory suffix=".php">./app</directory>
</include>
</source>
>>>>>>> db5bfeb (refactoring: Drop laravel world dependencies and apply refactoring to views and tests)
</phpunit>
2 changes: 1 addition & 1 deletion resources/css/header.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.header.is-fixed {
@apply fixed inset-x-0 transform bg-white/80 duration-300;
@apply fixed inset-x-0 bg-white/80 transition-all duration-300;
}

.header.is-hidden {
Expand Down
2 changes: 1 addition & 1 deletion resources/views/articles/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class="inline-flex items-center rounded-md border border-skin-base bg-skin-butto
<div class="relative flex justify-center">
<span class="relative z-0 inline-flex -space-x-px rounded-md shadow-sm">
<x-buttons.default
link="{{ route('articles.edit', $article) }}"
:href="route('articles.edit', $article)"
class="relative inline-flex items-center rounded-none rounded-l-lg border border-gray-300"
>
<span class="sr-only">{{ __('actions.edit') }}</span>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/auth/login.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<x-app-layout :title="__('pages/auth.login.page_title')">
<div class="flex min-h-full items-center justify-center py-16 sm:py-24">
<x-container class="flex min-h-full items-center justify-center py-16 sm:pt-24">
<div class="w-full max-w-md space-y-8">
<div>
<h2 class="text-center font-heading text-3xl font-extrabold text-gray-900 dark:text-white">
Expand Down Expand Up @@ -62,7 +62,7 @@ class="font-medium text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hov

@include('partials._socials-link')
</div>
</div>
</x-container>

<x-join-sponsors :title="__('global.sponsor_thanks')" />
</x-app-layout>
15 changes: 6 additions & 9 deletions resources/views/components/buttons/default.blade.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
@props(['link' => null])
@php
$classes = 'inline-flex justify-center py-2 px-4 bg-white border-0 ring-1 ring-gray-200 rounded-lg shadow-sm text-sm text-gray-700 hover:text-gray-900 dark:text-gray-400 hover:bg-gray-50/50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-green-500 dark:bg-gray-800 dark:focus:ring-offset-gray-900';
@endphp

@if ($link)
<x-link
href="{{ $link }}"
{{ $attributes->twMerge(['class' => 'inline-flex justify-center py-2 px-4 bg-white border border-gray-200 rounded-lg shadow-sm text-sm text-gray-700 hover:text-gray-900 dark:text-gray-400 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-green-500 dark:bg-gray-800 dark:focus:ring-offset-gray-900']) }}
>
@if ($attributes->hasAny(['href', ':href']))
<x-link :href="$href" {{ $attributes->twMerge(['class' => $classes]) }}>
{{ $slot }}
</x-link>
@else
<button
{{ $attributes->twMerge(['class' => 'inline-flex justify-center py-2 px-4 bg-white border border-gray-200 rounded-lg shadow-sm text-sm text-gray-700 hover:text-gray-900 dark:text-gray-400 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-green-500 dark:bg-gray-800 dark:focus:ring-offset-gray-900']) }}
>
<button {{ $attributes->twMerge(['class' => $classes]) }}>
{{ $slot }}
</button>
@endif
15 changes: 6 additions & 9 deletions resources/views/components/buttons/primary.blade.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
@props(['link' => null])
@php
$classes = 'inline-flex items-center justify-center py-2 px-4 border-0 text-sm font-medium rounded-lg text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-green-500 dark:ring-offset-gray-900';
@endphp

@if ($link)
<x-link
:href="$link"
{{ $attributes->twMerge(['class' => 'inline-flex items-center justify-center py-2 px-4 border-0 text-sm font-medium rounded-lg text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-green-500 dark:ring-offset-gray-900']) }}
>
@if ($attributes->hasAny(['href', ':href']))
<x-link :href="$href" {{ $attributes->twMerge(['class' => $classes]) }}>
{{ $slot }}
</x-link>
@else
<button
{{ $attributes->twMerge(['class' => 'inline-flex items-center justify-center py-2 px-4 border-0 text-sm font-medium rounded-lg text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-green-500 dark:ring-offset-gray-900']) }}
>
<button {{ $attributes->twMerge(['class' => $classes]) }}>
{{ $slot }}
</button>
@endif
6 changes: 3 additions & 3 deletions resources/views/components/dropdown-profile.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div @keydown.escape.stop="open = false;" @click.outside="open = false;" class="relative ml-4 shrink-0">
<div @keydown.escape.stop="open = false;" @click.outside="open = false;" class="relative">
<div>
<button
type="button"
Expand All @@ -10,7 +10,7 @@ class="flex rounded-full bg-skin-menu text-sm focus:outline-none focus:ring-2 fo
aria-haspopup="true"
x-bind:aria-expanded="open.toString()"
>
<span class="sr-only">Ouverture du menu</span>
<span class="sr-only">{{ __('global.open_navigation') }}</span>
<x-user.avatar :user="Auth::user()" class="size-8" />
</button>
</div>
Expand All @@ -24,7 +24,7 @@ class="flex rounded-full bg-skin-menu text-sm focus:outline-none focus:ring-2 fo
x-transition:leave-start="scale-100 transform opacity-100"
x-transition:leave-end="scale-95 transform opacity-0"
class="absolute right-0 mt-2 w-60 origin-top-right divide-y divide-skin-light rounded-md bg-skin-menu py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none"
x-ref="menu-items"
x-ref="menu"
role="menu"
aria-orientation="vertical"
aria-labelledby="user-menu-button"
Expand Down
5 changes: 2 additions & 3 deletions resources/views/components/layouts/footer.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="mx-auto max-w-7xl px-4 sm:px-6">
<div class="py-12 lg:grid lg:grid-cols-3 lg:gap-8 lg:py-16">
<div class="space-y-3">
<x-brand class="h-12 w-auto text-white sm:h-16" />
<x-brand class="h-12 w-auto text-white sm:h-16" aria-hidden="true" />
<p class="inline-flex flex-wrap items-center text-gray-400 text-sm">
<a href="https://github.com/caneco/laravel-country-logomarks" class="font-medium text-gray-300 underline">
Laravel Country Logomarks
Expand All @@ -23,9 +23,8 @@ class="ml-2 size-6 rounded-full"
</h3>
<ul class="mt-6 space-y-3">
<x-footer-link :title="__('global.navigation.about')" :url="route('about')" />
<x-footer-link :title="__('global.navigation.podcasts')" url="#" soon />
<x-footer-link :title="__('global.navigation.jobs')" url="#" soon />
<x-footer-link :title="__('global.navigation.sponsors')" :url="route('sponsors')" />
<x-footer-link :title="__('global.navigation.snippets')" url="https://snippets.laravel.cm" />
<x-footer-link
:title="__('global.navigation.branding')"
url="https://github.com/caneco/laravel-country-logomarks/blob/main/src/cm/README.md"
Expand Down
Loading
Loading