Cosas del login, ademas de crear admin panel
This commit is contained in:
61
resources/sass/admin.scss
vendored
Normal file
61
resources/sass/admin.scss
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
$colorfg: #212121;
|
||||
$colorborder: #f2f2f2;
|
||||
$color01: #0fa0ce;
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
color: $colorfg;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
position:fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
width: 20ch;
|
||||
border-right: 1px solid $colorborder;
|
||||
|
||||
.items {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.item {
|
||||
line-height: 2em;
|
||||
}
|
||||
|
||||
.end {
|
||||
margin-top: auto;
|
||||
|
||||
a {
|
||||
padding: 2em 0;
|
||||
}
|
||||
}
|
||||
|
||||
a, span {
|
||||
display:block;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
letter-spacing: .2rem;
|
||||
text-decoration: none;
|
||||
color: $colorfg;
|
||||
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: $color01;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 1.2rem;
|
||||
margin: 2em 0;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
margin-left: 20ch;
|
||||
height:100vh;
|
||||
}
|
||||
34
resources/sass/app.scss
vendored
34
resources/sass/app.scss
vendored
@@ -23,6 +23,39 @@ a {
|
||||
color: $colorfg;
|
||||
}
|
||||
|
||||
form label {
|
||||
display: block;
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
form input {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 2em;
|
||||
border: 1px solid $colorfg;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 1em;
|
||||
padding: .4em;
|
||||
}
|
||||
|
||||
button {
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
color: $colorfg;
|
||||
border: 1px solid $colorfg;
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
|
||||
font-weight: bold;
|
||||
height: 3em;
|
||||
padding: 0 3em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
display: flex;
|
||||
border-bottom: 1px solid $colorborder;
|
||||
@@ -31,6 +64,7 @@ a {
|
||||
.navbar-items {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.navbar-item a {
|
||||
|
||||
28
resources/views/admin/index.blade.php
Normal file
28
resources/views/admin/index.blade.php
Normal 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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
@extends('base')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<h1>HOLA</h1>
|
||||
</div>
|
||||
<h1>Home</h1>
|
||||
@endsection
|
||||
|
||||
18
resources/views/login.blade.php
Normal file
18
resources/views/login.blade.php
Normal 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
|
||||
@@ -1,7 +1,5 @@
|
||||
@extends('base')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<h1>HOLA</h1>
|
||||
</div>
|
||||
<h1>Now</h1>
|
||||
@endsection
|
||||
|
||||
12
resources/views/now/index.blade.php
Normal file
12
resources/views/now/index.blade.php
Normal file
@@ -0,0 +1,12 @@
|
||||
@extends('base')
|
||||
|
||||
@php
|
||||
$parse = new Parsedown();
|
||||
@endphp
|
||||
|
||||
@section('content')
|
||||
<section>
|
||||
{!! $parse->text($now->md) !!}
|
||||
</section>
|
||||
<hr/>
|
||||
@endsection
|
||||
@@ -1,7 +1,5 @@
|
||||
@extends('base')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<h1>HOLA</h1>
|
||||
</div>
|
||||
<h1>Projects</h1>
|
||||
@endsection
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
@extends('base')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<h1>HOLA</h1>
|
||||
</div>
|
||||
<h1>Setup</h1>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user