Merge branch 'bryam' of https://github.com/BryamE/ProyectoLauck into giane
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\Product;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class CatalogoController extends Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
public function catalogo()
|
||||||
|
{
|
||||||
|
$productos = Product::all();
|
||||||
|
return view('catalogo', compact('productos'));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -62,4 +62,9 @@ class ProductosController extends Controller
|
|||||||
$producto->delete();
|
$producto->delete();
|
||||||
return redirect(route('productos.index'));
|
return redirect(route('productos.index'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function vistaUsuario($id){
|
||||||
|
$producto = Product::find($id);
|
||||||
|
return view('productos.vistaUsuario', compact('producto'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class RegisterController extends Controller
|
|||||||
{
|
{
|
||||||
$userData = $request->validate([
|
$userData = $request->validate([
|
||||||
'name' => ['required', 'string'],
|
'name' => ['required', 'string'],
|
||||||
'email' => ['required', 'email'],
|
'email' => ['required', 'email', 'unique:users,email'],
|
||||||
'password' => ['required', 'confirmed']
|
'password' => ['required', 'confirmed']
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 97 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
@@ -0,0 +1,45 @@
|
|||||||
|
<x-appc>
|
||||||
|
<div class="max-w-6xl mx-auto px-4 py-8">
|
||||||
|
<h1 class="text-center text-2xl font-bold mb-8">CATÁLOGO</h1>
|
||||||
|
|
||||||
|
@if ($productos->count() > 0)
|
||||||
|
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-6">
|
||||||
|
@foreach ($productos as $prod)
|
||||||
|
<div class="p-4 border rounded-lg shadow-md bg-white hover:shadow-lg transition">
|
||||||
|
{{-- Imagen si existe --}}
|
||||||
|
@if (!empty($prod->imagen))
|
||||||
|
<img src="{{ asset('storage/' . $prod->imagen) }}" alt="{{ $prod->name }}"
|
||||||
|
class="w-full h-40 object-cover rounded mb-4">
|
||||||
|
@else
|
||||||
|
<div class="w-full h-40 bg-gray-200 flex items-center justify-center rounded mb-4">
|
||||||
|
<span class="text-gray-500 text-sm">Sin imagen</span>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Nombre --}}
|
||||||
|
<h2 class="text-lg font-semibold text-gray-800">{{ $prod->nombre }}</h2>
|
||||||
|
|
||||||
|
{{-- Descripción corta --}}
|
||||||
|
@if (!empty($prod->descripcion))
|
||||||
|
<p class="text-sm text-gray-600 mt-2">{{ $prod->descripcion }}</p>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Precio --}}
|
||||||
|
@if (!empty($prod->precio))
|
||||||
|
<p class="text-blue-600 font-bold mt-3">${{ number_format($prod->precio, 2, ',', '.') }}</p>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Botón --}}
|
||||||
|
<a href="{{ route('productos.vistaUsuario', $prod) }}"
|
||||||
|
class="mt-4 block w-full bg-blue-500 text-white py-2 rounded-lg text-center hover:bg-blue-600">
|
||||||
|
Ver producto
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
<p class="text-center text-gray-600 mt-10">No hay productos disponibles.</p>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</x-appc>
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
<div {{$attributes->merge(['class'=>'p-4 mb-4 text-sm rounded-lg dark:bg-gray-800 '.$class])}} role="alert">
|
|
||||||
<span class="font-medium">{{$title}}</span> {{$slot}}
|
|
||||||
</div>
|
|
||||||
@@ -1,77 +1,123 @@
|
|||||||
{{-- @vite('resources/css/app.css') --}}
|
@props(['auth' => false])
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="es">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
|
|
||||||
<title>{{ $title ?? 'Lauck - Home' }}</title>
|
<title>{{ $title ?? 'Lauck - Home' }}</title>
|
||||||
|
<!-- Importamos la fuente Montserrat para el estilo deportivo -->
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;800&display=swap" rel="stylesheet">
|
||||||
|
<!-- Script de Tailwind para que funcione en este archivo sin compilar -->
|
||||||
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
<script>
|
||||||
|
tailwind.config = {
|
||||||
|
theme: {
|
||||||
|
extend: {
|
||||||
|
fontFamily: {
|
||||||
|
sans: ['Montserrat', 'sans-serif'],
|
||||||
|
},
|
||||||
|
colors: {
|
||||||
|
// Definimos los colores personalizados de la marca
|
||||||
|
'neon-lime': '#ccff00',
|
||||||
|
'dark-bg': '#1a1a1a',
|
||||||
|
'panel-bg': '#242424',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
/* Efecto sutil de grilla de fondo para estilo técnico */
|
||||||
|
.bg-grid-pattern {
|
||||||
|
background-image: linear-gradient(to right, #333 1px, transparent 1px),
|
||||||
|
linear-gradient(to bottom, #333 1px, transparent 1px);
|
||||||
|
background-size: 40px 40px;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="bg-neutral-900 relative pb-50 min-h-screen">
|
<body class="bg-dark-bg text-gray-300 font-sans antialiased min-h-screen flex flex-col relative overflow-x-hidden">
|
||||||
<nav class="bg-white border-gray-200 dark:bg-gray-900">
|
|
||||||
<div class="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4">
|
<!-- Fondo decorativo técnico -->
|
||||||
<a href="https://flowbite.com/" class="flex items-center space-x-3 rtl:space-x-reverse">
|
<div class="absolute inset-0 bg-grid-pattern opacity-[0.07] z-0 pointer-events-none"></div>
|
||||||
<img src="https://flowbite.com/docs/images/logo.svg" class="h-8" alt="Flowbite Logo" />
|
|
||||||
<span class="self-center text-2xl font-semibold whitespace-nowrap dark:text-white">{{ $navTitle ?? 'Lauck Home' }}</span>
|
<!-- NAVBAR -->
|
||||||
|
<nav class="bg-neutral-900/90 backdrop-blur-md border-b border-white/10 fixed w-full z-50 sticky top-0">
|
||||||
|
<div class="max-w-7xl flex flex-wrap items-center justify-between mx-auto p-4">
|
||||||
|
|
||||||
|
<!-- Logo -->
|
||||||
|
<a href="/" class="flex items-center space-x-3 rtl:space-x-reverse group">
|
||||||
|
<!-- Placeholder de logo con efecto hover -->
|
||||||
|
<div class="h-10 w-10 bg-neutral-800 rounded-full flex items-center justify-center border-2 border-transparent group-hover:border-neon-lime transition-all duration-300">
|
||||||
|
<svg class="w-6 h-6 text-white group-hover:text-neon-lime transition-colors" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg>
|
||||||
|
</div>
|
||||||
|
<span class="self-center text-2xl font-black whitespace-nowrap text-white italic tracking-wide group-hover:text-neon-lime transition-colors duration-300">
|
||||||
|
LAUCK<span class="text-neon-lime font-light not-italic">SYS</span>
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<button data-collapse-toggle="navbar-default" type="button" class="inline-flex items-center p-2 w-10 h-10 justify-center text-sm text-gray-500 rounded-lg md:hidden hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600" aria-controls="navbar-default" aria-expanded="false">
|
|
||||||
<span class="sr-only">Open main menu</span>
|
<!-- Mobile Menu Button -->
|
||||||
|
<button data-collapse-toggle="navbar-default" type="button" class="inline-flex items-center p-2 w-10 h-10 justify-center text-gray-400 rounded-lg md:hidden hover:bg-neutral-800 focus:outline-none focus:ring-2 focus:ring-neon-lime" aria-controls="navbar-default" aria-expanded="false">
|
||||||
|
<span class="sr-only">Abrir menú</span>
|
||||||
<svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 17 14">
|
<svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 17 14">
|
||||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 1h15M1 7h15M1 13h15" />
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 1h15M1 7h15M1 13h15"/>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<!-- Links -->
|
||||||
<div class="hidden w-full md:block md:w-auto" id="navbar-default">
|
<div class="hidden w-full md:block md:w-auto" id="navbar-default">
|
||||||
<ul class="font-medium flex flex-col p-4 md:p-0 mt-4 border border-gray-100 rounded-lg bg-gray-50 md:flex-row md:space-x-8 rtl:space-x-reverse md:mt-0 md:border-0 md:bg-white dark:bg-gray-800 md:dark:bg-gray-900 dark:border-gray-700">
|
<ul class="font-bold flex flex-col p-4 md:p-0 mt-4 border border-neutral-700 rounded-lg bg-neutral-800 md:flex-row md:space-x-8 rtl:space-x-reverse md:mt-0 md:border-0 md:bg-transparent">
|
||||||
<li>
|
<li>
|
||||||
<a href="{{route('dashboard')}}" class="block py-2 px-3 text-white bg-blue-700 rounded-sm md:bg-transparent md:text-blue-700 md:p-0 dark:text-white md:dark:text-blue-500" aria-current="page">Home</a>
|
<a href="http://127.0.0.1:8000/dashboard" class="block py-2 px-3 text-neon-lime border-b-2 border-neon-lime md:p-0" aria-current="page">Dashboard</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="{{route('productos.index')}}" class="block py-2 px-3 text-gray-900 rounded-sm hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-white md:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent">Productos</a>
|
<a href="http://127.0.0.1:8000/productos" class="block py-2 px-3 text-white hover:text-neon-lime md:hover:bg-transparent md:border-0 md:p-0 transition-colors">Stock</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#" class="block py-2 px-3 text-gray-900 rounded-sm hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-white md:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent">Services</a>
|
<a href="#" class="block py-2 px-3 text-white hover:text-neon-lime md:hover:bg-transparent md:border-0 md:p-0 transition-colors">Taller</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#" class="block py-2 px-3 text-gray-900 rounded-sm hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-white md:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent">Pricing</a>
|
<a href="#" class="block py-2 px-3 text-white hover:text-neon-lime md:hover:bg-transparent md:border-0 md:p-0 transition-colors">Ventas</a>
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" class="block py-2 px-3 text-gray-900 rounded-sm hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-white md:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent">Contact</a>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
<!-- MAIN CONTENT -->
|
||||||
{{ $slot }}
|
{{ $slot }}
|
||||||
<footer class="bg-white rounded-lg shadow-sm dark:bg-gray-900 absolute bottom-0 start-0 end-0">
|
|
||||||
<div class="w-full max-w-screen-xl mx-auto p-4 md:py-8">
|
<!-- FOOTER -->
|
||||||
|
<footer class="bg-neutral-900 border-t border-white/5 mt-auto z-10">
|
||||||
|
<div class="w-full max-w-7xl mx-auto p-8">
|
||||||
<div class="sm:flex sm:items-center sm:justify-between">
|
<div class="sm:flex sm:items-center sm:justify-between">
|
||||||
<a href="https://flowbite.com/" class="flex items-center mb-4 sm:mb-0 space-x-3 rtl:space-x-reverse">
|
|
||||||
<img src="https://flowbite.com/docs/images/logo.svg" class="h-8" alt="Flowbite Logo" />
|
<a href="../" class="flex items-center mb-4 sm:mb-0 space-x-3 rtl:space-x-reverse grayscale opacity-70 hover:grayscale-0 hover:opacity-100 transition-all">
|
||||||
<span class="self-center text-2xl font-semibold whitespace-nowrap dark:text-white">Flowbite</span>
|
<!-- Icono simple footer -->
|
||||||
|
<svg class="h-8 text-neon-lime" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2L2 7l10 5 10-5-10-5zm0 9l2.5-1.25L12 8.5l-2.5 1.25L12 11zm0 2.5l-5-2.5-5 2.5L12 22l10-8.5-5-2.5-5 2.5z"/></svg>
|
||||||
|
<span class="self-center text-xl font-bold whitespace-nowrap text-white">Cicles Lauck</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="flex flex-wrap items-center mb-6 text-sm font-medium text-gray-500 sm:mb-0 dark:text-gray-400">
|
|
||||||
<li>
|
<ul class="flex flex-wrap items-center mb-6 text-sm font-medium text-gray-500 sm:mb-0">
|
||||||
<a href="#" class="hover:underline me-4 md:me-6">About</a>
|
<li><a href="#" class="hover:text-neon-lime hover:underline me-4 md:me-6 transition-colors">Soporte</a></li>
|
||||||
</li>
|
<li><a href="#" class="hover:text-neon-lime hover:underline me-4 md:me-6 transition-colors">Privacidad</a></li>
|
||||||
<li>
|
<li><a href="#" class="hover:text-neon-lime hover:underline transition-colors">Contacto</a></li>
|
||||||
<a href="#" class="hover:underline me-4 md:me-6">Privacy Policy</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" class="hover:underline me-4 md:me-6">Licensing</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" class="hover:underline">Contact</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<hr class="my-6 border-gray-200 sm:mx-auto dark:border-gray-700 lg:my-8" />
|
<hr class="my-6 border-neutral-800 sm:mx-auto lg:my-8">
|
||||||
<span class="block text-sm text-gray-500 sm:text-center dark:text-gray-400">© 2023 <a
|
<span class="block text-sm text-gray-600 sm:text-center">© 2024 <a href="../" class="hover:text-neon-lime transition-colors">Lauck Systems™</a>. All Rights Reserved.</span>
|
||||||
href="https://flowbite.com/" class="hover:underline">Flowbite™</a>. All Rights Reserved.</span>
|
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
|
||||||
|
|
||||||
|
<!-- Script para funcionalidad del navbar móvil (reemplazo simple de Flowbite) -->
|
||||||
|
<script>
|
||||||
|
const btn = document.querySelector('[data-collapse-toggle="navbar-default"]');
|
||||||
|
const menu = document.getElementById('navbar-default');
|
||||||
|
|
||||||
|
btn.addEventListener('click', () => {
|
||||||
|
menu.classList.toggle('hidden');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<footer class="bg-neutral-900 border-t border-white/5 mt-auto z-10 w-full">
|
||||||
|
<div class="w-full max-w-7xl mx-auto p-8">
|
||||||
|
<div class="sm:flex sm:items-center sm:justify-between">
|
||||||
|
<a href="{{ url('/') }}" class="flex items-center mb-4 sm:mb-0 space-x-3 rtl:space-x-reverse grayscale opacity-70 hover:grayscale-0 hover:opacity-100 transition-all">
|
||||||
|
<svg class="h-8 text-neon-lime" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2L2 7l10 5 10-5-10-5zm0 9l2.5-1.25L12 8.5l-2.5 1.25L12 11zm0 2.5l-5-2.5-5 2.5L12 22l10-8.5-5-2.5-5 2.5z"/></svg>
|
||||||
|
<span class="self-center text-xl font-bold whitespace-nowrap text-white">Cicles Lauck</span>
|
||||||
|
</a>
|
||||||
|
<ul class="flex flex-wrap items-center mb-6 text-sm font-medium text-gray-500 sm:mb-0">
|
||||||
|
<li><a href="#" class="hover:text-neon-lime hover:underline me-4 md:me-6 transition-colors">Soporte</a></li>
|
||||||
|
<li><a href="#" class="hover:text-neon-lime hover:underline transition-colors">Contacto</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<hr class="my-6 border-neutral-800 sm:mx-auto lg:my-8">
|
||||||
|
<span class="block text-sm text-gray-600 sm:text-center">© {{ date('Y') }} <a href="#" class="hover:text-neon-lime transition-colors">Lauck Systems™</a>.</span>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="es">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
|
<title>{{ $title ?? 'Lauck Dashboard' }}</title>
|
||||||
|
|
||||||
|
<!-- Fuentes -->
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;800&display=swap" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- Tailwind y Config -->
|
||||||
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
<script>
|
||||||
|
tailwind.config = {
|
||||||
|
theme: {
|
||||||
|
extend: {
|
||||||
|
fontFamily: {
|
||||||
|
sans: ['Montserrat', 'sans-serif'],
|
||||||
|
},
|
||||||
|
colors: {
|
||||||
|
'neon-lime': '#ccff00',
|
||||||
|
'dark-bg': '#1a1a1a',
|
||||||
|
'panel-bg': '#242424',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.bg-grid-pattern {
|
||||||
|
background-image: linear-gradient(to right, #333 1px, transparent 1px),
|
||||||
|
linear-gradient(to bottom, #333 1px, transparent 1px);
|
||||||
|
background-size: 40px 40px;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="bg-dark-bg text-gray-300 font-sans antialiased min-h-screen flex flex-col relative overflow-x-hidden">
|
||||||
|
|
||||||
|
<!-- Fondo grilla global -->
|
||||||
|
<div class="absolute inset-0 bg-grid-pattern opacity-[0.07] z-0 pointer-events-none fixed"></div>
|
||||||
|
|
||||||
|
<!-- Navbar Component -->
|
||||||
|
<x-navbar />
|
||||||
|
|
||||||
|
<!-- Contenido Principal -->
|
||||||
|
<main class="flex-grow flex flex-col items-center justify-start pt-10 pb-20 px-4 w-full max-w-7xl mx-auto z-10">
|
||||||
|
{{ $slot }}
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- Footer Component -->
|
||||||
|
<x-footer />
|
||||||
|
|
||||||
|
<!-- Scripts globales -->
|
||||||
|
<script>
|
||||||
|
// Lógica del menú móvil
|
||||||
|
const btn = document.querySelector('[data-collapse-toggle="navbar-default"]');
|
||||||
|
const menu = document.getElementById('navbar-default');
|
||||||
|
if(btn && menu) {
|
||||||
|
btn.addEventListener('click', () => menu.classList.toggle('hidden'));
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
<nav class="bg-neutral-900/90 backdrop-blur-md border-b border-white/10 w-full z-50 sticky top-0">
|
||||||
|
<div class="max-w-7xl flex flex-wrap items-center justify-between mx-auto p-4">
|
||||||
|
|
||||||
|
<!-- Logo -->
|
||||||
|
<a href="{{ url('/') }}" class="flex items-center space-x-3 rtl:space-x-reverse group">
|
||||||
|
<div class="h-10 w-10 bg-neutral-800 rounded-full flex items-center justify-center border-2 border-transparent group-hover:border-neon-lime transition-all duration-300">
|
||||||
|
<svg class="w-6 h-6 text-white group-hover:text-neon-lime transition-colors" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg>
|
||||||
|
</div>
|
||||||
|
<span class="self-center text-2xl font-black whitespace-nowrap text-white italic tracking-wide group-hover:text-neon-lime transition-colors duration-300">
|
||||||
|
LAUCK<span class="text-neon-lime font-light not-italic">SYS</span>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- Mobile Menu Button -->
|
||||||
|
<button data-collapse-toggle="navbar-default" type="button" class="inline-flex items-center p-2 w-10 h-10 justify-center text-gray-400 rounded-lg md:hidden hover:bg-neutral-800 focus:outline-none focus:ring-2 focus:ring-neon-lime" aria-controls="navbar-default" aria-expanded="false">
|
||||||
|
<span class="sr-only">Abrir menú</span>
|
||||||
|
<svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 17 14">
|
||||||
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 1h15M1 7h15M1 13h15"/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<!-- Links -->
|
||||||
|
<div class="hidden w-full md:block md:w-auto" id="navbar-default">
|
||||||
|
<ul class="font-bold flex flex-col p-4 md:p-0 mt-4 border border-neutral-700 rounded-lg bg-neutral-800 md:flex-row md:space-x-8 rtl:space-x-reverse md:mt-0 md:border-0 md:bg-transparent">
|
||||||
|
<!-- Link activo dinámico -->
|
||||||
|
<li>
|
||||||
|
<a href="{{ url('/dashboard') }}"
|
||||||
|
class="block py-2 px-3 md:p-0 transition-colors {{ request()->is('dashboard') ? 'text-neon-lime border-b-2 border-neon-lime' : 'text-white hover:text-neon-lime' }}">
|
||||||
|
Dashboard
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{{ url('/productos') }}"
|
||||||
|
class="block py-2 px-3 md:p-0 transition-colors {{ request()->is('productos*') ? 'text-neon-lime border-b-2 border-neon-lime' : 'text-white hover:text-neon-lime' }}">
|
||||||
|
Stock
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#" class="block py-2 px-3 text-white hover:text-neon-lime md:hover:bg-transparent md:border-0 md:p-0 transition-colors">Taller</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#" class="block py-2 px-3 text-white hover:text-neon-lime md:hover:bg-transparent md:border-0 md:p-0 transition-colors">Ventas</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
@props(['subtitle', 'title', 'highlight' => null])
|
||||||
|
|
||||||
|
<div class="w-full text-left mb-10 border-l-4 border-neon-lime pl-6 py-2">
|
||||||
|
<h2 class="text-neutral-400 text-sm font-bold uppercase tracking-widest mb-1">{{ $subtitle }}</h2>
|
||||||
|
<h1 class="font-black text-4xl md:text-5xl text-white uppercase italic">
|
||||||
|
{{ $title }}
|
||||||
|
@if($highlight)
|
||||||
|
<span class="text-transparent bg-clip-text bg-gradient-to-r from-white to-gray-500">{{ $highlight }}</span>
|
||||||
|
@endif
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
@props(['href' => '#', 'title', 'description', 'linkText' => 'Ver detalles'])
|
||||||
|
|
||||||
|
<a href="{{ $href }}" class="group relative block p-6 bg-panel-bg border border-neutral-800 rounded-xl hover:border-neon-lime hover:-translate-y-1 transition-all duration-300 shadow-lg hover:shadow-neon-lime/20 h-full">
|
||||||
|
<!-- slot para SVG -->
|
||||||
|
<div class="absolute top-0 right-0 p-4 opacity-10 group-hover:opacity-100 transition-opacity">
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3 class="mt-4 text-xl font-bold text-white group-hover:text-neon-lime transition-colors">{{ $title }}</h3>
|
||||||
|
<p class="mt-2 text-sm text-gray-500">{{ $description }}</p>
|
||||||
|
|
||||||
|
<div class="mt-6 inline-flex items-center text-xs font-bold text-neon-lime uppercase tracking-wider">
|
||||||
|
{{ $linkText }} <span class="ml-2 group-hover:translate-x-1 transition-transform">→</span>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
@@ -1,6 +1,49 @@
|
|||||||
|
<x-layout title="Dashboard - Lauck">
|
||||||
|
|
||||||
<H1>BIENVENIDO {{Auth::user()->name}} </H1>
|
<!-- Header -->
|
||||||
<form action="{{route('logout')}}" method="post">
|
<x-section-header
|
||||||
@csrf
|
subtitle="Panel de Control"
|
||||||
<button type="submit">Logout</button>
|
title="¡Bienvenido, "
|
||||||
</form>
|
highlight="Jose!"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- Grid de Tarjetas -->
|
||||||
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 w-full mb-12">
|
||||||
|
|
||||||
|
<!-- Tarjeta Catálogo -->
|
||||||
|
<x-ui.card href="{{ url('/catalogo') }}" title="Catálogo" description="Administrar bicicletas y repuestos." linkText="Ir al stock">
|
||||||
|
<svg class="w-12 h-12 text-neon-lime" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z" /></svg>
|
||||||
|
</x-ui.card>
|
||||||
|
|
||||||
|
<!-- Tarjeta Taller -->
|
||||||
|
<x-ui.card href="#" title="Taller" description="Gestión de services y reparaciones." linkText="Ver agenda">
|
||||||
|
<svg class="w-12 h-12 text-neon-lime" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /></svg>
|
||||||
|
</x-ui.card>
|
||||||
|
|
||||||
|
<!-- Tarjeta Clientes -->
|
||||||
|
<x-ui.card href="#" title="Clientes" description="Base de datos de ciclistas." linkText="Buscar usuario">
|
||||||
|
<svg class="w-12 h-12 text-neon-lime" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" /></svg>
|
||||||
|
</x-ui.card>
|
||||||
|
|
||||||
|
<!-- Estadísticas (Sin template) -->
|
||||||
|
<div class="p-6 bg-gradient-to-br from-neutral-800 to-neutral-900 border border-neutral-700 rounded-xl flex flex-col justify-center items-center text-center">
|
||||||
|
<span class="text-4xl font-black text-white">85%</span>
|
||||||
|
<span class="text-xs uppercase tracking-widest text-gray-500 mt-1">Eficiencia Taller</span>
|
||||||
|
<div class="w-full bg-gray-700 rounded-full h-1.5 mt-4">
|
||||||
|
<div class="bg-neon-lime h-1.5 rounded-full" style="width: 85%"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Botón de Logout -->
|
||||||
|
<div class="w-full border-t border-neutral-800 pt-8 flex justify-end">
|
||||||
|
<form action="{{ route('logout') }}" method="post" class="flex items-center gap-4">
|
||||||
|
@csrf
|
||||||
|
<span class="text-sm text-gray-500">¿Sesión finalizada?</span>
|
||||||
|
<button class="font-bold text-sm text-red-500 border border-red-900/50 bg-red-900/10 py-2 px-6 rounded-md hover:bg-red-600 hover:text-white hover:border-red-600 transition-all duration-300 uppercase tracking-wide" type="submit">
|
||||||
|
Cerrar Sesión
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</x-layout>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<div class="bg-white p-8 rounded-xl shadow-lg w-full max-w-md">
|
<div class="bg-white p-8 rounded-xl shadow-lg w-full max-w-md">
|
||||||
<form action="{{ route('login.attempt') }}" method="POST" class="space-y-5">
|
<form action="{{ route('login.attempt') }}" method="POST" class="space-y-5">
|
||||||
@csrf
|
@csrf
|
||||||
|
{{-- No muestra los errores, ver --}}
|
||||||
@if ($errors->any())
|
@if ($errors->any())
|
||||||
<div>
|
<div>
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<x-appc>
|
||||||
|
<div class="max-w-6xl mx-auto px-4 py-8 text-white">
|
||||||
|
<a href="{{ route('catalogo') }}">Volver a catalogo</a>
|
||||||
|
<h1>Titulo: {{ $producto->nombre }}</h1>
|
||||||
|
<p>
|
||||||
|
<b>Categoria:</b> {{ $producto->Categoria }}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
{{ $producto->content }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</x-appc>
|
||||||
@@ -1,56 +1,73 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Bicicletería Lauck - Registro</title>
|
<title>Bicicletería Lauck - Registro</title>
|
||||||
<script src="https://cdn.tailwindcss.com"></script>
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="bg-gradient-to-br from-blue-500 to-blue-700 flex items-center justify-center min-h-screen px-4">
|
<body class="bg-gradient-to-br from-blue-500 to-blue-700 flex items-center justify-center min-h-screen px-4">
|
||||||
|
|
||||||
<div class="flex flex-col items-center space-y-6 w-full max-w-lg">
|
<div class="flex flex-col items-center space-y-6 w-full max-w-lg">
|
||||||
<!-- Título -->
|
<!-- Título -->
|
||||||
<h1 class="text-4xl font-bold text-white text-center drop-shadow-lg">
|
<h1 class="text-4xl font-bold text-white text-center drop-shadow-lg">
|
||||||
Bicicletería Lauck
|
Bicicletería Lauck
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<!-- Formulario -->
|
<!-- Formulario -->
|
||||||
<div class="bg-white p-8 rounded-xl shadow-lg w-full max-w-md">
|
<div class="bg-white p-8 rounded-xl shadow-lg w-full max-w-md">
|
||||||
<h2 class="text-2xl font-bold mb-2 text-center">Registrarse</h2>
|
<h2 class="text-2xl font-bold mb-2 text-center">Registrarse</h2>
|
||||||
<p class="mb-6 text-center text-gray-600">Por favor completá el formulario para crear una cuenta.</p>
|
<p class="mb-6 text-center text-gray-600">Por favor completá el formulario para crear una cuenta.</p>
|
||||||
|
|
||||||
<form action="{{route('register.store')}}" method="post" class="space-y-5">
|
<form action="{{ route('register.store') }}" method="post" class="space-y-5">
|
||||||
@csrf
|
@csrf
|
||||||
<div>
|
@if ($errors->any())
|
||||||
<label class="block text-sm font-medium text-gray-700 mb-1">Nombre completo</label>
|
<div>
|
||||||
<input type="text" name="name" required class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-400">
|
<ul>
|
||||||
|
@foreach ($errors->all() as $error)
|
||||||
|
<li>{{ $error }}</li>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<div>
|
||||||
|
<label class="block text-sm font-medium text-gray-700 mb-1">Nombre completo</label>
|
||||||
|
<input type="text" name="name" required
|
||||||
|
class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-400">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="block text-sm font-medium text-gray-700 mb-1">Correo electrónico</label>
|
||||||
|
<input type="email" name="email" required
|
||||||
|
class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-400">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="block text-sm font-medium text-gray-700 mb-1">Contraseña</label>
|
||||||
|
<input type="password" name="password" required
|
||||||
|
class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-400">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="block text-sm font-medium text-gray-700 mb-1">Confirmar contraseña</label>
|
||||||
|
<input type="password" name="password_confirmation" required
|
||||||
|
class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-400">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="submit" name="submit" value="Registrarse"
|
||||||
|
class="w-full bg-blue-600 text-white py-2 rounded-md hover:bg-blue-700 transition-colors">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="text-center text-sm text-gray-600">
|
||||||
|
¿Ya tenés una cuenta? <a href="login" class="text-blue-600 hover:underline">Iniciá sesión acá</a>.
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
|
||||||
<label class="block text-sm font-medium text-gray-700 mb-1">Correo electrónico</label>
|
|
||||||
<input type="email" name="email" required class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-400">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<label class="block text-sm font-medium text-gray-700 mb-1">Contraseña</label>
|
|
||||||
<input type="password" name="password" required class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-400">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<label class="block text-sm font-medium text-gray-700 mb-1">Confirmar contraseña</label>
|
|
||||||
<input type="password" name="password_confirmation" required class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-400">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<input type="submit" name="submit" value="Registrarse" class="w-full bg-blue-600 text-white py-2 rounded-md hover:bg-blue-700 transition-colors">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="text-center text-sm text-gray-600">
|
|
||||||
¿Ya tenés una cuenta? <a href="login" class="text-blue-600 hover:underline">Iniciá sesión acá</a>.
|
|
||||||
</p>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,20 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<x-appc>
|
||||||
<html lang="en">
|
<x-slot name="title">Lauck - Inicio</x-slot>
|
||||||
<head>
|
<x-slot name="navTitle">Bienvenido</x-slot>
|
||||||
<meta charset="UTF-8">
|
</x-appc>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
|
|
||||||
<title>Laravel 12</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="h-screen w-screen bg-amber-200">
|
|
||||||
<div class="w-full h-15 bg-red-800/40 flex items-center px-4">
|
|
||||||
<h1 class="font-bold text-3xl">Homepage</h1>
|
|
||||||
<div class="ml-auto flex gap-4">
|
|
||||||
<a href="login" class="hover:underline">Iniciar sesión</a>
|
|
||||||
<a href="register" class="hover:underline">Registrarse</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|||||||
+19
-9
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Http\Controllers\AuthController;
|
use App\Http\Controllers\AuthController;
|
||||||
|
use App\Http\Controllers\CatalogoController;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use App\Http\Controllers\HomeController;
|
use App\Http\Controllers\HomeController;
|
||||||
use App\Http\Controllers\LoginController;
|
use App\Http\Controllers\LoginController;
|
||||||
@@ -16,9 +17,13 @@ Route::get('login', function(){
|
|||||||
return view('login');
|
return view('login');
|
||||||
})->name('login');
|
})->name('login');
|
||||||
|
|
||||||
Route::post('login', LoginController::class)->name('login.attempt');
|
Route::post('login', LoginController::class)
|
||||||
|
->middleware('throttle:5,1')
|
||||||
|
->name('login.attempt');
|
||||||
|
|
||||||
Route::view('dashboard', 'dashboard')->name('dashboard');
|
Route::view('dashboard', 'dashboard')
|
||||||
|
->middleware('auth')
|
||||||
|
->name('dashboard');
|
||||||
|
|
||||||
Route::post('logout', function(){
|
Route::post('logout', function(){
|
||||||
Auth::guard('web')->logout();
|
Auth::guard('web')->logout();
|
||||||
@@ -32,10 +37,15 @@ Route::post('logout', function(){
|
|||||||
Route::view('register', 'register')->name('register');
|
Route::view('register', 'register')->name('register');
|
||||||
Route::post('register', RegisterController::class)->name('register.store');
|
Route::post('register', RegisterController::class)->name('register.store');
|
||||||
|
|
||||||
Route::get('/productos',[ProductosController::class,'index'])->name('productos.index');
|
Route::middleware(['auth'])->group(function () {
|
||||||
Route::get('/productos/create',[ProductosController::class,'create'])->name('productos.create');
|
Route::get('/productos',[ProductosController::class,'index'])->name('productos.index');
|
||||||
Route::get('/productos/{id}', [ProductosController::class,'show'])->name('productos.show');
|
Route::get('/productos/create',[ProductosController::class,'create'])->name('productos.create');
|
||||||
Route::get('/productos/{id}/edit', [ProductosController::class,'edit'])->name('productos.edit');
|
Route::get('/productos/{id}', [ProductosController::class,'show'])->name('productos.show');
|
||||||
Route::post('/productos',[ProductosController::class,'store'])->name('productos.store');
|
Route::get('/productos/{id}/edit', [ProductosController::class,'edit'])->name('productos.edit');
|
||||||
Route::put('/productos/{id}',[ProductosController::class,'update'])->name('productos.update');
|
Route::post('/productos',[ProductosController::class,'store'])->name('productos.store');
|
||||||
Route::delete('/productos/{id}', [ProductosController::class,'destroy'])->name('productos.destroy');
|
Route::put('/productos/{id}',[ProductosController::class,'update'])->name('productos.update');
|
||||||
|
Route::delete('/productos/{id}', [ProductosController::class,'destroy'])->name('productos.destroy');
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::get('/catalogo', [CatalogoController::class,'catalogo'])->name('catalogo');
|
||||||
|
Route::get('/productos/{id}/vistaUsuario', [ProductosController::class,'vistaUsuario'])->name('productos.vistaUsuario');
|
||||||
|
|||||||
Reference in New Issue
Block a user