diff --git a/app/Http/Controllers/SessionController.php b/app/Http/Controllers/SessionController.php
index 899c8e4..7c10c4c 100644
--- a/app/Http/Controllers/SessionController.php
+++ b/app/Http/Controllers/SessionController.php
@@ -2,6 +2,8 @@
namespace App\Http\Controllers;
+use Illuminate\Support\Facades\Auth;
+use Illuminate\Validation\ValidationException;
use Illuminate\Http\Request;
class SessionController extends Controller
@@ -20,7 +22,7 @@ class SessionController extends Controller
if( !Auth::attempt($validatedAttributes) )
{
- throw ValidationException::withMessages(['email' => 'wrong password']);
+ throw ValidationException::withMessages(['email' => 'credentials do not match']);
}
request()->session()->regenerate();
diff --git a/app/Models/Article.php b/app/Models/Article.php
new file mode 100644
index 0000000..2f01c5d
--- /dev/null
+++ b/app/Models/Article.php
@@ -0,0 +1,47 @@
+ 1,
+ 'title' => 'First One',
+ 'slug' => '1st',
+ 'body' => 'First!!1
+ lol',
+ ],
+ [ 'id' => 2,
+ 'title' => 'Second One',
+ 'slug' => '2nd',
+ 'body' => 'Second i do concour
+ lmfao',
+ ],
+ [ 'id' => 3,
+ 'title' => 'Third One',
+ 'slug' => '3rd',
+ 'body' => 'Third indeed
+ xD',
+ ],
+ ];
+ }
+
+ public static function find(string $slug): array
+ {
+ $article = Arr::first(Article::all(), fn($article) => $article['slug'] === $slug);
+
+ if(! $article ) {
+ abort(404);
+ }
+
+ return $article;
+ }
+
+}
diff --git a/public/css/style.css b/public/css/style.css
index d4dfc52..13095b0 100644
--- a/public/css/style.css
+++ b/public/css/style.css
@@ -719,4 +719,40 @@ dfn[title]
; align-self : flex-start
}
.x-input .error
-{ grid-area : error }
\ No newline at end of file
+{ grid-area : error }
+
+ol
+{ gap: 0.5rem
+; flex-direction: column
+}
+ol
+ { counter-reset : ol_lvl_1 }
+ol ol
+ { counter-reset : ol_lvl_2 }
+ol ol ol
+ { counter-reset : ol_lvl_3 }
+
+ol > li::before
+ { content : counter( ol_lvl_1 ) '.'
+ ; counter-increment : ol_lvl_1
+ }
+
+ol > li:has(ol:first-child)::before
+ { display : none }
+ol > li > ol:first-child > li::before
+ { background : var( --bg ) }
+
+ol ol > li::before
+ { content : counter( ol_lvl_1 ) '.' counter( ol_lvl_2 ) '.'
+ ; counter-increment : ol_lvl_2
+ }
+
+ol ol > li:has(ol:first-child)::before
+ { display : none }
+ol ol > li > ol:first-child > li::before
+ { background : var( --bg ) }
+
+ol ol ol > li::before
+ { content : counter( ol_lvl_1 ) '.' counter( ol_lvl_2 ) '.' counter( ol_lvl_3 ) '.'
+ ; counter-increment : ol_lvl_3
+ }
diff --git a/resources/views/article.blade.php b/resources/views/article.blade.php
new file mode 100644
index 0000000..bdf28bd
--- /dev/null
+++ b/resources/views/article.blade.php
@@ -0,0 +1,21 @@
+
+
+
+
+{{ $title ?? $slug }}
+
+
+
+
+
+@auth
+
+@endauth
+
+
diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php
index a49c033..76e9edf 100644
--- a/resources/views/auth/register.blade.php
+++ b/resources/views/auth/register.blade.php
@@ -1,6 +1,6 @@
-