Agregar archivos de proyecto.
This commit is contained in:
25
MieSystem/Views/Shared/Error.cshtml
Normal file
25
MieSystem/Views/Shared/Error.cshtml
Normal file
@@ -0,0 +1,25 @@
|
||||
@model ErrorViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Error";
|
||||
}
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
|
||||
@if (Model.ShowRequestId)
|
||||
{
|
||||
<p>
|
||||
<strong>Request ID:</strong> <code>@Model.RequestId</code>
|
||||
</p>
|
||||
}
|
||||
|
||||
<h3>Development Mode</h3>
|
||||
<p>
|
||||
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
|
||||
</p>
|
||||
<p>
|
||||
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
|
||||
It can result in displaying sensitive information from exceptions to end users.
|
||||
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
|
||||
and restarting the app.
|
||||
</p>
|
||||
406
MieSystem/Views/Shared/_Layout.cshtml
Normal file
406
MieSystem/Views/Shared/_Layout.cshtml
Normal file
@@ -0,0 +1,406 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@ViewData["Title"] - MieSystem</title>
|
||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
|
||||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/MieSystem.styles.css" asp-append-version="true" />
|
||||
<style>
|
||||
/* Estilos personalizados para el menú lateral */
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.main-wrapper {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 250px;
|
||||
background: linear-gradient(180deg, #2c3e50 0%, #1a2530 100%);
|
||||
color: white;
|
||||
transition: all 0.3s;
|
||||
min-height: calc(100vh - 73px); /* Altura total menos el header */
|
||||
}
|
||||
|
||||
.sidebar.collapsed {
|
||||
margin-left: -250px;
|
||||
}
|
||||
|
||||
.sidebar-header {
|
||||
padding: 20px;
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
text-align: center;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.sidebar-header h3 {
|
||||
font-size: 1.2rem;
|
||||
margin-bottom: 0;
|
||||
color: #ecf0f1;
|
||||
}
|
||||
|
||||
.sidebar-menu {
|
||||
list-style: none;
|
||||
padding: 20px 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.sidebar-menu li {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.sidebar-menu a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 12px 20px;
|
||||
color: #bdc3c7;
|
||||
text-decoration: none;
|
||||
transition: all 0.3s;
|
||||
border-left: 3px solid transparent;
|
||||
}
|
||||
|
||||
.sidebar-menu a:hover {
|
||||
color: white;
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
border-left: 3px solid #3498db;
|
||||
}
|
||||
|
||||
.sidebar-menu a.active {
|
||||
color: white;
|
||||
background-color: rgba(52, 152, 219, 0.2);
|
||||
border-left: 3px solid #3498db;
|
||||
}
|
||||
|
||||
.sidebar-menu i {
|
||||
margin-right: 10px;
|
||||
font-size: 1.2rem;
|
||||
width: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content-wrapper {
|
||||
flex: 1;
|
||||
padding: 20px;
|
||||
background-color: #f8f9fa;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.toggle-sidebar-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #2c3e50;
|
||||
font-size: 1.5rem;
|
||||
cursor: pointer;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #2c3e50;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.user-info i {
|
||||
margin-right: 8px;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
/* Responsive
|
||||
media (max-width: 768px) {
|
||||
.sidebar
|
||||
|
||||
{
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
height: calc(100vh - 73px);
|
||||
}*/
|
||||
|
||||
.sidebar.collapsed {
|
||||
margin-left: -250px;
|
||||
}
|
||||
|
||||
.content-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 73px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.overlay.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Estilos para la página de contenido */
|
||||
.page-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 30px;
|
||||
padding-bottom: 15px;
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 1.8rem;
|
||||
font-weight: 600;
|
||||
color: #2c3e50;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.card {
|
||||
border: none;
|
||||
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
background-color: white;
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
font-weight: 600;
|
||||
color: #2c3e50;
|
||||
padding: 15px 20px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
margin-top: auto;
|
||||
background-color: #2c3e50;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.footer a {
|
||||
color: #bdc3c7;
|
||||
}
|
||||
|
||||
.footer a:hover {
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow">
|
||||
<div class="container-fluid">
|
||||
<button class="toggle-sidebar-btn" id="toggleSidebar">
|
||||
<i class="bi bi-list"></i>
|
||||
</button>
|
||||
|
||||
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">
|
||||
<i class="bi bi-house-heart-fill text-primary me-2"></i>MieSystem
|
||||
</a>
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
|
||||
aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item">
|
||||
<div class="user-info">
|
||||
<i class="bi bi-person-circle"></i>
|
||||
<span id="username-placeholder">Usuario</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<div class="main-wrapper">
|
||||
<!-- Menú lateral -->
|
||||
<div class="sidebar" id="sidebar">
|
||||
<div class="sidebar-header">
|
||||
<h3><i class="bi bi-gear-wide-connected me-2"></i>Panel de Control</h3>
|
||||
</div>
|
||||
<ul class="sidebar-menu">
|
||||
<li>
|
||||
<a asp-area="" asp-controller="Home" asp-action="Index" class="nav-link @(ViewContext.RouteData.Values["Controller"]?.ToString() == "Home" && ViewContext.RouteData.Values["Action"]?.ToString() == "Index" ? "active" : "")">
|
||||
<i class="bi bi-house-door"></i> Inicio
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a asp-area="" asp-controller="Expedientes" asp-action="Index" class="nav-link @(ViewContext.RouteData.Values["Controller"]?.ToString() == "Expedientes" ? "active" : "")">
|
||||
<i class="bi bi-folder"></i> Expedientes
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a asp-area="" asp-controller="Asistencia" asp-action="Index" class="nav-link @(ViewContext.RouteData.Values["Controller"]?.ToString() == "Asistencia" ? "active" : "")">
|
||||
<i class="bi bi-calendar-check"></i> Asistencia
|
||||
</a>
|
||||
</li>
|
||||
<!-- Separador y sección de administración -->
|
||||
<li class="mt-4">
|
||||
<div class="sidebar-header">
|
||||
<h6 class="text-uppercase text-muted small">Administración</h6>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="nav-link">
|
||||
<i class="bi bi-people"></i> Niños
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="nav-link">
|
||||
<i class="bi bi-person-badge"></i> Maestros
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="nav-link">
|
||||
<i class="bi bi-person-workspace"></i> Personal
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="nav-link">
|
||||
<i class="bi bi-bar-chart"></i> Reportes
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a asp-area="" asp-controller="Home" asp-action="Privacy" class="nav-link @(ViewContext.RouteData.Values["Controller"]?.ToString() == "Home" && ViewContext.RouteData.Values["Action"]?.ToString() == "Privacy" ? "active" : "")">
|
||||
<i class="bi bi-shield-check"></i> Privacidad
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Overlay para móviles -->
|
||||
<div class="overlay" id="overlay"></div>
|
||||
|
||||
<!-- Contenido principal -->
|
||||
<div class="content-wrapper" id="contentWrapper">
|
||||
<div class="page-header">
|
||||
<h1 class="page-title">@ViewData["Title"]</h1>
|
||||
@if (ViewData["ActionButtons"] != null)
|
||||
{
|
||||
<div>
|
||||
@Html.Raw(ViewData["ActionButtons"])
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<main role="main">
|
||||
@RenderBody()
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="footer text-muted">
|
||||
<div class="container py-3">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
© 2025 - MieSystem - Sistema de Gestión Educativa
|
||||
</div>
|
||||
<div class="col-md-6 text-md-end">
|
||||
<a asp-area="" asp-controller="Home" asp-action="Privacy" class="text-decoration-none me-3">Privacidad</a>
|
||||
<a href="#" class="text-decoration-none">Ayuda</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||
|
||||
<script>
|
||||
// Control del menú lateral
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const sidebar = document.getElementById('sidebar');
|
||||
const toggleBtn = document.getElementById('toggleSidebar');
|
||||
const overlay = document.getElementById('overlay');
|
||||
const contentWrapper = document.getElementById('contentWrapper');
|
||||
|
||||
// Función para alternar el menú lateral
|
||||
function toggleSidebar() {
|
||||
sidebar.classList.toggle('collapsed');
|
||||
overlay.classList.toggle('active');
|
||||
|
||||
// Guardar estado en localStorage
|
||||
const isCollapsed = sidebar.classList.contains('collapsed');
|
||||
localStorage.setItem('sidebarCollapsed', isCollapsed);
|
||||
}
|
||||
|
||||
// Evento para el botón de alternar
|
||||
toggleBtn.addEventListener('click', toggleSidebar);
|
||||
|
||||
// Evento para el overlay (en móviles)
|
||||
overlay.addEventListener('click', toggleSidebar);
|
||||
|
||||
// Cargar estado guardado
|
||||
const savedState = localStorage.getItem('sidebarCollapsed');
|
||||
if (savedState === 'true') {
|
||||
sidebar.classList.add('collapsed');
|
||||
}
|
||||
|
||||
// Cerrar menú lateral en móviles al hacer clic en un enlace
|
||||
const sidebarLinks = document.querySelectorAll('.sidebar-menu a');
|
||||
sidebarLinks.forEach(link => {
|
||||
link.addEventListener('click', function() {
|
||||
if (window.innerWidth < 768) {
|
||||
toggleSidebar();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Actualizar nombre de usuario (ejemplo)
|
||||
const usernameElement = document.getElementById('username-placeholder');
|
||||
// Aquí puedes obtener el nombre de usuario real desde tu backend
|
||||
// Por ahora, usaremos un nombre de ejemplo
|
||||
const userName = localStorage.getItem('userName') || 'Administrador';
|
||||
usernameElement.textContent = userName;
|
||||
|
||||
// Detectar controlador activo para resaltar menú
|
||||
const currentPath = window.location.pathname;
|
||||
const menuItems = document.querySelectorAll('.sidebar-menu a');
|
||||
|
||||
menuItems.forEach(item => {
|
||||
const href = item.getAttribute('href');
|
||||
if (href && currentPath.includes(href.replace('~', ''))) {
|
||||
item.classList.add('active');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Manejo responsive
|
||||
window.addEventListener('resize', function() {
|
||||
const sidebar = document.getElementById('sidebar');
|
||||
const overlay = document.getElementById('overlay');
|
||||
|
||||
if (window.innerWidth >= 768) {
|
||||
// En pantallas grandes, asegurarse que el menú esté visible
|
||||
sidebar.classList.remove('collapsed');
|
||||
overlay.classList.remove('active');
|
||||
} else {
|
||||
// En pantallas pequeñas, si el menú no está colapsado, mostrar overlay
|
||||
if (!sidebar.classList.contains('collapsed')) {
|
||||
overlay.classList.add('active');
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@await RenderSectionAsync("Scripts", required: false)
|
||||
</body>
|
||||
</html>
|
||||
48
MieSystem/Views/Shared/_Layout.cshtml.css
Normal file
48
MieSystem/Views/Shared/_Layout.cshtml.css
Normal file
@@ -0,0 +1,48 @@
|
||||
/* Please see documentation at https://learn.microsoft.com/aspnet/core/client-side/bundling-and-minification
|
||||
for details on configuring this project to bundle and minify static web assets. */
|
||||
|
||||
a.navbar-brand {
|
||||
white-space: normal;
|
||||
text-align: center;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0077cc;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
color: #fff;
|
||||
background-color: #1b6ec2;
|
||||
border-color: #1861ac;
|
||||
}
|
||||
|
||||
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
|
||||
color: #fff;
|
||||
background-color: #1b6ec2;
|
||||
border-color: #1861ac;
|
||||
}
|
||||
|
||||
.border-top {
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
.border-bottom {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.box-shadow {
|
||||
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
|
||||
}
|
||||
|
||||
button.accept-policy {
|
||||
font-size: 1rem;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
line-height: 60px;
|
||||
}
|
||||
2
MieSystem/Views/Shared/_ValidationScriptsPartial.cshtml
Normal file
2
MieSystem/Views/Shared/_ValidationScriptsPartial.cshtml
Normal file
@@ -0,0 +1,2 @@
|
||||
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive.min.js"></script>
|
||||
Reference in New Issue
Block a user