Cosas del login, ademas de crear admin panel

This commit is contained in:
Daniel Cortés
2019-06-23 13:38:24 -04:00
parent 61cd63b265
commit be42d6f599
29 changed files with 365 additions and 274 deletions

View File

@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
@section('title')
<title>Daniel Cortés</title>
@show
<link href="{{ asset('css/admin.css') }}" rel="stylesheet">
</head>
<body>
<div class="sidebar">
<div class="items">
<div class="head"><span>ADMIN</span></div>
<div class="item"><a href="#">Posts</a></div>
<div class="item"><a href="#">Now</a></div>
<div class="item"><a href="#">Setup</a></div>
<div class="item"><a href="#">Projects</a></div>
<div class="end"><a href="{{ route('index') }}">Volver</a></div>
</div>
</div>
<div class="container">
</div>
<script src="js/app.js"></script>
</body>
</html>

View File

@@ -18,21 +18,24 @@
<a href="{{route('blog.index')}}">Blog</a>
</li>
<li class="navbar-item">
<a href="{{route('now')}}">Now</a>
<a href="{{route('now.index')}}">Now</a>
</li>
<li class="navbar-item">
<a href="{{route('projects')}}">Projects</a>
<a href="{{route('projects')}}">Proyectos</a>
</li>
<li class="navbar-item">
<a href="{{route('setup')}}">Setup</a>
</li>
<li class="navbar-item">
<a href="#">ADMIN</a>
</li>
@auth
<li class="navbar-item">
<a href="{{route('admin')}}">ADMIN</a>
</li>
@endauth
</ul>
</nav>
@yield('content')
@yield('content')
<script src="js/app.js"></script>
</body>

View File

@@ -1,14 +1,13 @@
@extends('base')
@section('content')
<div class="container">
<h1>Archive</h1>
<ul>
<h1>Archivo</h1>
<ul>
@foreach($posts as $post)
<li>
<a href="{{ route('blog.show', $post->id) }}">{{$post->title}}</a> <span>({{$post->created_at->format('Y-m-d')}})</span>
</li>
@endforeach
</ul>
</div>
</ul>
@endsection

View File

@@ -5,14 +5,12 @@
@endphp
@section('content')
<div class="container">
@foreach($posts as $post)
<section class="post">
<h1 class="post-title">{{$post->title}}</h1>
{!! $parse->text($post->md) !!}
</section>
<hr/>
@endforeach
<span>Mas posts en el <a href="{{ route('blog.archive') }}">archivo</a></span>
</div>
@foreach($posts as $post)
<section>
<h1>{{$post->title}}</h1>
{!! $parse->text($post->md) !!}
</section>
<hr/>
@endforeach
<span>Mas posts en el <a href="{{ route('blog.archive') }}">archivo</a></span>
@endsection

View File

@@ -5,11 +5,10 @@
@endphp
@section('content')
<div class="container">
<section class="post">
<h1 class="post-title">{{$post->title}}</h1>
<section>
<h1>{{$post->title}}</h1>
{!! $parse->text($post->md) !!}
</section>
<hr/>
<span>Para posts antiguos, ve al <a href="{{ route('blog.archive') }}">archivo</a></span>
</div>
@endsection

View File

@@ -1,7 +1,5 @@
@extends('base')
@section('content')
<div class="container">
<h1>HOLA</h1>
</div>
<h1>Home</h1>
@endsection

View File

@@ -0,0 +1,18 @@
@extends('base')
@section('content')
<form method="POST" action="{{ route('login') }}">
@csrf
<div>
<label for="email" >e-mail</label>
<input id="email" type="email" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus>
</div>
<div>
<label for="password" >pass</label>
<input id="password" type="password" name="password" required autocomplete="current-password">
</div>
<button type="submit">login</button>
</form>
@endsection

View File

@@ -1,7 +1,5 @@
@extends('base')
@section('content')
<div class="container">
<h1>HOLA</h1>
</div>
<h1>Now</h1>
@endsection

View File

@@ -0,0 +1,12 @@
@extends('base')
@php
$parse = new Parsedown();
@endphp
@section('content')
<section>
{!! $parse->text($now->md) !!}
</section>
<hr/>
@endsection

View File

@@ -1,7 +1,5 @@
@extends('base')
@section('content')
<div class="container">
<h1>HOLA</h1>
</div>
<h1>Projects</h1>
@endsection

View File

@@ -1,7 +1,5 @@
@extends('base')
@section('content')
<div class="container">
<h1>HOLA</h1>
</div>
<h1>Setup</h1>
@endsection