Skip to content

Commit 75f48d7

Browse files
authored
Feature/lar 13 modification navigation (#155)
* wip * style: update header and footer navigation * Fix code styling * fix: phpunit.xml conflit * fix: remove Integration Testsuite --------- Co-authored-by: mckenziearts <mckenziearts@users.noreply.github.com>
1 parent 2dba99e commit 75f48d7

33 files changed

+259
-602
lines changed

app/Console/Commands/NotifyPendingArticles.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
namespace App\Console\Commands;
66

77
use App\Models\Article;
8+
use App\Notifications\PendingArticlesNotification;
89
use Illuminate\Console\Command;
910
use Illuminate\Notifications\AnonymousNotifiable;
10-
use App\Notifications\PendingArticlesNotification;
1111

1212
final class NotifyPendingArticles extends Command
1313
{
@@ -23,4 +23,4 @@ public function handle(AnonymousNotifiable $notifiable): void
2323
$notifiable->notify(new PendingArticlesNotification($pendingArticles));
2424
}
2525
}
26-
}
26+
}

app/Console/Kernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ protected function commands(): void
3131
{
3232
$this->load(__DIR__.'/Commands');
3333
}
34-
}
34+
}

app/Notifications/PendingArticlesNotification.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
namespace App\Notifications;
66

77
use Illuminate\Bus\Queueable;
8-
use Illuminate\Notifications\Notification;
9-
use Illuminate\Contracts\Queue\ShouldQueue;
108
use Illuminate\Database\Eloquent\Collection;
11-
use Illuminate\Notifications\Messages\MailMessage;
9+
use Illuminate\Notifications\Notification;
1210
use NotificationChannels\Telegram\TelegramChannel;
1311
use NotificationChannels\Telegram\TelegramMessage;
1412

@@ -42,11 +40,11 @@ private function content(): string
4240
'profile_url' => route('profile', $article->user?->username),
4341
'title' => $article->title,
4442
'url' => route('articles.show', $article->slug),
45-
'date' => $article->submitted_at->translatedFormat('d/m/Y')
43+
'date' => $article->submitted_at->translatedFormat('d/m/Y'),
4644
]
4745
);
4846
}
4947

5048
return $message;
5149
}
52-
}
50+
}

lang/en/global.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
'forum' => 'Forum',
1313
'articles' => 'Posts',
1414
'discussions' => 'Discussions',
15+
'community' => 'Community',
1516
'about' => 'About',
1617
'podcasts' => 'Podcasts',
1718
'jobs' => 'Jobs',
1819
'sponsors' => 'Sponsors',
20+
'snippets' => 'Snippets',
1921
'branding' => 'Branding',
2022
'faq' => 'FAQ',
2123
'rules' => 'Rules',
@@ -45,5 +47,8 @@
4547
'sponsored' => 'Sponsored',
4648
'read_time' => ':time min reading',
4749
'page_views' => ':number views',
50+
'open_navigation' => 'Open main menu',
51+
'close_navigation' => 'Close menu',
52+
'view_notifications' => 'View notifications',
4853

4954
];

lang/fr/global.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
'forum' => 'Forum',
1313
'articles' => 'Articles',
1414
'discussions' => 'Discussions',
15+
'community' => 'Communauté',
1516
'about' => 'A propos',
1617
'podcasts' => 'Podcasts',
1718
'jobs' => 'Offres',
1819
'sponsors' => 'Soutien',
20+
'snippets' => 'Snippets',
1921
'branding' => 'Branding',
2022
'faq' => 'FAQ',
2123
'rules' => 'Code de conduite',
@@ -45,5 +47,8 @@
4547
'sponsored' => 'Sponsorisé',
4648
'read_time' => ':time min de lecture',
4749
'page_views' => ':number vues',
50+
'open_navigation' => 'Ouvrir le menu',
51+
'close_navigation' => 'Fermer le menu',
52+
'view_notifications' => 'Voir les notifications',
4853

4954
];

phpunit.xml

Lines changed: 6 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<<<<<<< HEAD
3-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
5-
bootstrap="vendor/autoload.php"
6-
colors="true"
2+
<phpunit
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd"
5+
bootstrap="vendor/autoload.php"
6+
colors="true"
7+
cacheDirectory=".phpunit.cache"
78
>
8-
<testsuites>
9-
<testsuite name="Unit">
10-
<directory>tests/Unit</directory>
11-
</testsuite>
12-
<testsuite name="Feature">
13-
<directory>tests/Feature</directory>
14-
</testsuite>
15-
</testsuites>
16-
<source>
17-
<include>
18-
<directory>app</directory>
19-
</include>
20-
</source>
21-
<php>
22-
<env name="APP_ENV" value="testing"/>
23-
<env name="APP_KEY" value="base64:NXoQgjw2ZlOxnGbo5ZRhYgTdM6xLYsgYElNAgcTQJkE="/>
24-
<env name="BCRYPT_ROUNDS" value="4"/>
25-
<env name="CACHE_STORE" value="array"/>
26-
<env name="DB_CONNECTION" value="sqlite"/>
27-
<env name="DB_DATABASE" value=":memory:"/>
28-
<env name="MAIL_MAILER" value="array"/>
29-
<env name="PULSE_ENABLED" value="false"/>
30-
<env name="QUEUE_CONNECTION" value="sync"/>
31-
<env name="SESSION_DRIVER" value="array"/>
32-
</php>
33-
||||||| parent of db5bfeb (refactoring: Drop laravel world dependencies and apply refactoring to views and tests)
34-
<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">
359
<testsuites>
36-
<testsuite name="Integration">
37-
<directory suffix="Test.php">./tests/Integration</directory>
38-
</testsuite>
39-
<testsuite name="Feature">
40-
<directory suffix="Test.php">./tests/Feature</directory>
41-
</testsuite>
42-
</testsuites>
43-
<coverage/>
44-
<php>
45-
<server name="APP_ENV" value="testing"/>
46-
<env name="APP_KEY" value="base64:NXoQgjw2ZlOxnGbo5ZRhYgTdM6xLYsgYElNAgcTQJkE="/>
47-
<server name="BCRYPT_ROUNDS" value="4"/>
48-
<server name="CACHE_DRIVER" value="array"/>
49-
<server name="DB_CONNECTION" value="sqlite"/>
50-
<server name="DB_DATABASE" value=":memory:"/>
51-
<server name="MAIL_MAILER" value="array"/>
52-
<server name="QUEUE_CONNECTION" value="sync"/>
53-
<server name="SESSION_DRIVER" value="array"/>
54-
<server name="TELESCOPE_ENABLED" value="false"/>
55-
</php>
56-
<source>
57-
<include>
58-
<directory suffix=".php">./app</directory>
59-
</include>
60-
</source>
61-
=======
62-
<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">
63-
<testsuites>
64-
<testsuite name="Unit">
65-
<directory suffix="Test.php">./tests/Unit</directory>
66-
</testsuite>
6710
<testsuite name="Feature">
6811
<directory suffix="Test.php">./tests/Feature</directory>
6912
</testsuite>
@@ -86,5 +29,4 @@
8629
<directory suffix=".php">./app</directory>
8730
</include>
8831
</source>
89-
>>>>>>> db5bfeb (refactoring: Drop laravel world dependencies and apply refactoring to views and tests)
9032
</phpunit>

resources/css/header.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.header.is-fixed {
2-
@apply fixed inset-x-0 transform bg-white/80 duration-300;
2+
@apply fixed inset-x-0 bg-white/80 transition-all duration-300;
33
}
44

55
.header.is-hidden {

resources/views/articles/show.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ class="inline-flex items-center rounded-md border border-skin-base bg-skin-butto
289289
<div class="relative flex justify-center">
290290
<span class="relative z-0 inline-flex -space-x-px rounded-md shadow-sm">
291291
<x-buttons.default
292-
link="{{ route('articles.edit', $article) }}"
292+
:href="route('articles.edit', $article)"
293293
class="relative inline-flex items-center rounded-none rounded-l-lg border border-gray-300"
294294
>
295295
<span class="sr-only">{{ __('actions.edit') }}</span>

resources/views/auth/login.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<x-app-layout :title="__('pages/auth.login.page_title')">
2-
<div class="flex min-h-full items-center justify-center py-16 sm:py-24">
2+
<x-container class="flex min-h-full items-center justify-center py-16 sm:pt-24">
33
<div class="w-full max-w-md space-y-8">
44
<div>
55
<h2 class="text-center font-heading text-3xl font-extrabold text-gray-900 dark:text-white">
@@ -62,7 +62,7 @@ class="font-medium text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hov
6262

6363
@include('partials._socials-link')
6464
</div>
65-
</div>
65+
</x-container>
6666

6767
<x-join-sponsors :title="__('global.sponsor_thanks')" />
6868
</x-app-layout>
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
@props(['link' => null])
1+
@php
2+
$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';
3+
@endphp
24

3-
@if ($link)
4-
<x-link
5-
href="{{ $link }}"
6-
{{ $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']) }}
7-
>
5+
@if ($attributes->hasAny(['href', ':href']))
6+
<x-link :href="$href" {{ $attributes->twMerge(['class' => $classes]) }}>
87
{{ $slot }}
98
</x-link>
109
@else
11-
<button
12-
{{ $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']) }}
13-
>
10+
<button {{ $attributes->twMerge(['class' => $classes]) }}>
1411
{{ $slot }}
1512
</button>
1613
@endif
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
@props(['link' => null])
1+
@php
2+
$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';
3+
@endphp
24

3-
@if ($link)
4-
<x-link
5-
:href="$link"
6-
{{ $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']) }}
7-
>
5+
@if ($attributes->hasAny(['href', ':href']))
6+
<x-link :href="$href" {{ $attributes->twMerge(['class' => $classes]) }}>
87
{{ $slot }}
98
</x-link>
109
@else
11-
<button
12-
{{ $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']) }}
13-
>
10+
<button {{ $attributes->twMerge(['class' => $classes]) }}>
1411
{{ $slot }}
1512
</button>
1613
@endif

resources/views/components/dropdown-profile.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div @keydown.escape.stop="open = false;" @click.outside="open = false;" class="relative ml-4 shrink-0">
1+
<div @keydown.escape.stop="open = false;" @click.outside="open = false;" class="relative">
22
<div>
33
<button
44
type="button"
@@ -10,7 +10,7 @@ class="flex rounded-full bg-skin-menu text-sm focus:outline-none focus:ring-2 fo
1010
aria-haspopup="true"
1111
x-bind:aria-expanded="open.toString()"
1212
>
13-
<span class="sr-only">Ouverture du menu</span>
13+
<span class="sr-only">{{ __('global.open_navigation') }}</span>
1414
<x-user.avatar :user="Auth::user()" class="size-8" />
1515
</button>
1616
</div>
@@ -24,7 +24,7 @@ class="flex rounded-full bg-skin-menu text-sm focus:outline-none focus:ring-2 fo
2424
x-transition:leave-start="scale-100 transform opacity-100"
2525
x-transition:leave-end="scale-95 transform opacity-0"
2626
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"
27-
x-ref="menu-items"
27+
x-ref="menu"
2828
role="menu"
2929
aria-orientation="vertical"
3030
aria-labelledby="user-menu-button"

resources/views/components/layouts/footer.blade.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="mx-auto max-w-7xl px-4 sm:px-6">
44
<div class="py-12 lg:grid lg:grid-cols-3 lg:gap-8 lg:py-16">
55
<div class="space-y-3">
6-
<x-brand class="h-12 w-auto text-white sm:h-16" />
6+
<x-brand class="h-12 w-auto text-white sm:h-16" aria-hidden="true" />
77
<p class="inline-flex flex-wrap items-center text-gray-400 text-sm">
88
<a href="https://github.com/caneco/laravel-country-logomarks" class="font-medium text-gray-300 underline">
99
Laravel Country Logomarks
@@ -23,9 +23,8 @@ class="ml-2 size-6 rounded-full"
2323
</h3>
2424
<ul class="mt-6 space-y-3">
2525
<x-footer-link :title="__('global.navigation.about')" :url="route('about')" />
26-
<x-footer-link :title="__('global.navigation.podcasts')" url="#" soon />
27-
<x-footer-link :title="__('global.navigation.jobs')" url="#" soon />
2826
<x-footer-link :title="__('global.navigation.sponsors')" :url="route('sponsors')" />
27+
<x-footer-link :title="__('global.navigation.snippets')" url="https://snippets.laravel.cm" />
2928
<x-footer-link
3029
:title="__('global.navigation.branding')"
3130
url="https://github.com/caneco/laravel-country-logomarks/blob/main/src/cm/README.md"

0 commit comments

Comments
 (0)