diff --git a/.env b/.env index 4e27dfb..497a145 100644 --- a/.env +++ b/.env @@ -22,9 +22,9 @@ LOG_LEVEL=debug DB_CONNECTION=pgsql DB_HOST=127.0.0.1 DB_PORT=5432 -DB_DATABASE=laravel -DB_USERNAME=laravel -DB_PASSWORD=laravel +DB_DATABASE=dym +DB_USERNAME=dym +DB_PASSWORD=+-Vl+'&Qfb[2LxbhpR].S6Fxk(Y+qQfg:Hj SESSION_DRIVER=database SESSION_LIFETIME=120 diff --git a/app/Models/User.php b/app/Models/User.php new file mode 100644 index 0000000..407a732 --- /dev/null +++ b/app/Models/User.php @@ -0,0 +1,46 @@ + + */ + protected $fillable = [ + 'email', + 'password', + ]; + + /** + * The attributes that should be hidden for serialization. + * + * @var array + */ + protected $hidden = [ + 'password', + 'remember_token', + ]; + + /** + * Get the attributes that should be cast. + * + * @return array + */ + protected function casts(): array + { + return [ + 'email_verified_at' => 'datetime', + 'password' => 'hashed', + ]; + } +} diff --git a/app/View/Components/layout-admin.php b/app/View/Components/layout-admin.php new file mode 100644 index 0000000..7f1ca3e --- /dev/null +++ b/app/View/Components/layout-admin.php @@ -0,0 +1,26 @@ +id(); - $table->string('name'); $table->string('email')->unique(); $table->timestamp('email_verified_at')->nullable(); $table->string('password'); diff --git a/public/css/style.css b/public/css/style.css index 45b7858..fbf0f77 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -43,6 +43,10 @@ , span , ul, ol, li , dl, dd, dt +, form +, input +, textarea +, button { all : unset ; margin : 0 ; padding : 0 @@ -366,13 +370,29 @@ figure > figcaption input , button +, textarea +{ padding: 0.25rem 0.5rem +; border-radius: var(--mw) +; background: none +; color: var(--text) +} + +button +{ background: var(--gray) +; color: var(--bg) +} + + input +, button { box-shadow : inset 0 0 0 0.125rem #ddd } input { width : 14rem -; padding : 0 1rem } +.buttons input[type="search"] +{ color : var(--bg) } + input[type="search"] + button { margin-left : -3rem ; display : none @@ -418,7 +438,7 @@ button ; grid-template-columns : 1fr 1fr } -.about +.article { gap : 3rem ; display : grid ; grid-template-columns : 10rem 1fr @@ -426,7 +446,7 @@ button ; align-content: start } -.about a +.article a , summary { border-radius : 0.125rem ; text-decoration : underline @@ -440,9 +460,9 @@ button , summary { color : var(--green) } - .about a:not(.th):active -, .about a:not(.th):focus -, .about a:not(.th):hover + .article a:not(.th):active +, .article a:not(.th):focus +, .article a:not(.th):hover { background : var(--bg) ; box-shadow: 0 0 0 0.125rem var(--bg) @@ -459,7 +479,7 @@ button ; color : var(--honey) ; font-weight : 500 } -.about h3 +.article h3 { text-align : unset ; margin-top: 1rem } @@ -472,8 +492,8 @@ h2 a:any-link , h2 a[href^='/']:any-link { color : var(--honey) } - .about ul -, .about p + .article ul +, .article p { margin : 0 } h1 + ul @@ -481,10 +501,10 @@ h2 a:any-link , h3 + ul { padding-top : 0 } - .about ul + h1 -, .about ul + h2 -, .about ul + h3 -, .about ul > :last-child + .article ul + h1 +, .article ul + h2 +, .article ul + h3 +, .article ul > :last-child { padding-bottom : 0 } ul @@ -547,7 +567,7 @@ ul > li::before @media screen and (max-width : 600px) { - .about + .article { display : flex ; flex-direction : column ; gap : 1rem @@ -558,11 +578,11 @@ ul > li::before } } @media screen and (max-width : 800px) { - .about .col-2 + .article .col-2 { display : flex } } @media screen and (max-width : 1000px) { - .about .col-2.tablet-col-1 + .article .col-2.tablet-col-1 { display : flex } } diff --git a/resources/views/about.blade.php b/resources/views/about.blade.php index 44c7e21..de1b578 100644 --- a/resources/views/about.blade.php +++ b/resources/views/about.blade.php @@ -1,6 +1,6 @@ -
+
photo diff --git a/resources/views/admin.blade.php b/resources/views/admin.blade.php new file mode 100644 index 0000000..9a8eaf4 --- /dev/null +++ b/resources/views/admin.blade.php @@ -0,0 +1,3 @@ + + + diff --git a/resources/views/code.blade.php b/resources/views/code.blade.php index 6e70fbe..aceb7ee 100644 --- a/resources/views/code.blade.php +++ b/resources/views/code.blade.php @@ -41,7 +41,7 @@ -
+

/vis

    diff --git a/resources/views/components/layout-admin.blade.php b/resources/views/components/layout-admin.blade.php new file mode 100644 index 0000000..7617773 --- /dev/null +++ b/resources/views/components/layout-admin.blade.php @@ -0,0 +1,47 @@ + + + + +{{ request()->path() }} + + + + + + + + +{{-- + --}} + +
    + + + +
    + +{{ $slot }} +{{-- --}} + +
    +
    + +
    + + \ No newline at end of file diff --git a/resources/views/components/layout.blade.php b/resources/views/components/layout.blade.php index 4bcd9f8..a40add3 100644 --- a/resources/views/components/layout.blade.php +++ b/resources/views/components/layout.blade.php @@ -70,8 +70,8 @@ diff --git a/resources/views/components/tag.blade.php b/resources/views/components/tag.blade.php new file mode 100644 index 0000000..fafd0b6 --- /dev/null +++ b/resources/views/components/tag.blade.php @@ -0,0 +1,4 @@ +merge(['class' => str_starts_with(request()->path(), 'tags/'.$slot ) ? 'current' : '' ])}} + >{{ $slot }} diff --git a/resources/views/edit.blade.php b/resources/views/edit.blade.php new file mode 100644 index 0000000..d19ac12 --- /dev/null +++ b/resources/views/edit.blade.php @@ -0,0 +1,9 @@ + + +
    + + + +
    + +
    diff --git a/resources/views/notes.blade.php b/resources/views/notes.blade.php index 0b7d184..57f2206 100644 --- a/resources/views/notes.blade.php +++ b/resources/views/notes.blade.php @@ -6,7 +6,7 @@ /articles -
    +

    2024

    a groot start

    diff --git a/resources/views/page.blade.php b/resources/views/page.blade.php new file mode 100644 index 0000000..4057bcc --- /dev/null +++ b/resources/views/page.blade.php @@ -0,0 +1,7 @@ + + +
    + +
    + +
    diff --git a/resources/views/tag.blade.php b/resources/views/tag.blade.php new file mode 100644 index 0000000..4057bcc --- /dev/null +++ b/resources/views/tag.blade.php @@ -0,0 +1,7 @@ + + +
    + +
    + +
    diff --git a/routes/web.php b/routes/web.php index 168726d..0cc63e6 100644 --- a/routes/web.php +++ b/routes/web.php @@ -7,26 +7,41 @@ Route::get('/', function () { }); -Route::get('/about', function () { +Route::name('about.show')->get('/about', function () { return view('about'); }); Route::get('/graphics', function () { return view('graphics'); }); - Route::get('/photos', function () { return view('photos'); }); - Route::get('/comics', function () { return view('comics'); }); - Route::get('/code', function () { return view('code'); }); - Route::get('/notes', function () { - return view('code'); + return view('notes'); }); + + +Route::name('pages.list')->get('/list', function () { + return view('list'); +}); +Route::name('admin.new')->get('/new', function () { + return view('edit'); +}); +Route::name('admin.edit')->get('/edit/{slug}', function ($name) { + return view('edit'); +})->where('slug', '[A-Za-z0-9-]+'); +Route::name('admin.index')->get('/admin', function ($name = null) { + return view('admin'); +}); + + +Route::name('page.show')->get('/{slug}', function () { + return view('page'); +})->where('slug', '[A-Za-z0-9-]+');