94 lines
4.5 KiB
Plaintext
94 lines
4.5 KiB
Plaintext
@{
|
|
var isGestionPage = Context.Request.Path.ToString().StartsWith("/Products");
|
|
}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="~/css/site.css" />
|
|
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>@ViewData["Title"] - WebVentaCoche</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" />
|
|
<link href="~/css/site.css" rel="stylesheet" />
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
|
|
</head>
|
|
<body class="@(isGestionPage ? "no-background" : "")">
|
|
<!-- Navbar -->
|
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
|
<div class="container">
|
|
<div class="d-flex justify-content-center col-10">
|
|
<a class="navbar-brand" href="/">WebVentaCoche</a>
|
|
<ul class="navbar-nav text-center">
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/Productos">Productos</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/Contacto">Contacto</a>
|
|
</li>
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle" href="#" id="gestionDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
|
Gestión
|
|
</a>
|
|
<ul class="dropdown-menu" aria-labelledby="gestionDropdown">
|
|
<li><a class="dropdown-item" href="/Products">Productos</a></li>
|
|
<li><a class="dropdown-item" href="/Order">Pedidos</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="collapse navbar-collapse justify-content-center" id="navbarNav">
|
|
<ul class="navbar-nav ms-auto">
|
|
@if (User.Identity.IsAuthenticated)
|
|
{
|
|
<!-- Menú Desplegable con el Icono de Usuario -->
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
|
<i class="fa fa-user" style="font-size: 1.5rem;"></i>
|
|
</a>
|
|
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="userDropdown">
|
|
<li><a class="dropdown-item" href="@Url.Action("Details", "Account")">Detalles Cuenta</a></li>
|
|
<li><a class="dropdown-item" href="@Url.Action("Index", "Order")">Pedidos</a></li>
|
|
<li><hr class="dropdown-divider"></li>
|
|
<li>
|
|
<form method="post" asp-action="Logout" asp-controller="User" class="d-inline">
|
|
<button type="submit" class="dropdown-item text-danger">Cerrar Sesión</button>
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
}
|
|
else
|
|
{
|
|
<!-- Mostrar "Iniciar Sesión" si el usuario no está autenticado -->
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="@Url.Action("Login", "User")">Iniciar Sesión</a>
|
|
</li>
|
|
}
|
|
</ul>
|
|
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- Jumbotron -->
|
|
<div class="jumbotron jumbotron-fluid bg-image" style="background-image: url('/images/captura.jpg'); background-size: cover; background-position: center; height: 300px;">
|
|
<div class="container text-white text-center">
|
|
<h1 class="display-4">Bienvenido a WebVentaCoche</h1>
|
|
<p class="lead">Tu tienda de confianza para productos de coches.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Content -->
|
|
<div class="container">
|
|
@RenderBody()
|
|
</div>
|
|
|
|
<!-- Footer -->
|
|
<footer class="bg-dark text-light text-center py-3 mt-4">
|
|
<p>© 2024 WebVentaCoche. Todos los derechos reservados.</p>
|
|
</footer>
|
|
</body>
|
|
</html>
|