Compare commits

...

2 Commits

Author SHA1 Message Date
Manuel Aranda Rosales 9d38db44e0 Merge pull request 'Updated template to new html' (#40) from develop into main
testing/ogcore-api/pipeline/head This commit looks good Details
ogcore-debian-package/pipeline/head This commit looks good Details
Reviewed-on: #40
2025-06-27 12:42:29 +02:00
Manuel Aranda Rosales f59fdd87ec Updated template to new html
testing/ogcore-api/pipeline/pr-main Build queued... Details
testing/ogcore-api/pipeline/head There was a failure building this commit Details
2025-06-27 12:42:06 +02:00
1 changed files with 76 additions and 127 deletions

View File

@ -42,7 +42,7 @@
.navbar {
background: #1e293b;
padding: 2rem 2rem;
padding: 1.5rem 2rem;
position: fixed;
width: 100%;
top: 0;
@ -54,6 +54,59 @@
backdrop-filter: blur(10px);
}
.navbar-brand {
display: flex;
align-items: center;
}
.navbar-brand h1 {
font-size: 1.5rem;
font-weight: 700;
color: white;
margin: 0;
}
.navbar-actions {
display: flex;
gap: 1rem;
align-items: center;
}
.action-btn {
background: rgba(255, 255, 255, 0.1);
color: white;
border: 1px solid rgba(255, 255, 255, 0.2);
padding: 0.75rem 1.25rem;
border-radius: 25px;
text-decoration: none;
font-weight: 500;
font-size: 0.9rem;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
display: flex;
align-items: center;
gap: 0.5rem;
backdrop-filter: blur(10px);
}
.action-btn:hover {
background: rgba(255, 255, 255, 0.2);
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}
.action-btn.danger {
background: rgba(220, 38, 38, 0.2);
border-color: rgba(220, 38, 38, 0.4);
}
.action-btn.danger:hover {
background: rgba(220, 38, 38, 0.3);
}
.action-btn i {
font-size: 0.9rem;
}
.main-container {
margin-top: 7rem;
padding: 2rem;
@ -77,9 +130,12 @@
.menu-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 2rem;
margin-bottom: 2rem;
max-width: 800px;
margin-left: auto;
margin-right: auto;
}
.menu-item {
@ -392,6 +448,19 @@
</head>
<body>
<nav class="navbar" role="navigation" aria-label="Navegación principal">
<div class="navbar-brand">
<h1>OpenGnsys</h1>
</div>
<div class="navbar-actions">
<a href="command:reboot" class="action-btn">
<i class="fas fa-sync"></i>
Reiniciar
</a>
<a href="command:poweroff" class="action-btn danger">
<i class="fas fa-power-off"></i>
Apagar
</a>
</div>
</nav>
<main class="main-container">
@ -400,128 +469,9 @@
<h1>Bienvenido {{ ip }}</h1>
</section>
<section class="menu-grid">
<article class="menu-item windows">
<a href="command+confirm:restoreImage REPO windows 1 1">
<i class="fab fa-windows"></i>
Instalar Windows
</a>
<p>El proceso de instalación tardará unos minutos.</p>
</article>
<article class="menu-item linux">
<a href="command+output+confirm:restoreImage REPO linux 1 2">
<i class="fab fa-linux"></i>
Instalar GNU/Linux
</a>
<p>El proceso de instalación tardará unos minutos.</p>
</article>
<article class="menu-item apagar">
<a href="command:poweroff">
<i class="fas fa-power-off"></i>
Apagar
</a>
<p>Apagar el ordenador.</p>
</article>
<article class="menu-item apagar">
<a href="command:reboot">
<i class="fas fa-sync"></i>
Reiniciar
</a>
<p>Reiniciar el ordenador.</p>
</article>
</section>
<section class="partitions-section">
<h2><i class="fas fa-hdd"></i> Particiones del sistema</h2>
<!-- VERSIÓN CON DATOS SIMULADOS PARA VISUALIZACIÓN -->
<div class="partitions-table">
<table>
<thead>
<tr>
<th>Disco</th>
<th>Partición</th>
<th>Tamaño</th>
<th>Tipo</th>
<th>SO</th>
<th>Acciones</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>sda</strong></td>
<td><span class="partition-type">1</span></td>
<td class="partition-size">512.00 MB</td>
<td><span class="partition-type">ext4</span></td>
<td class="partition-os">Ubuntu 22.04</td>
<td>
<a href="command+output:/opt/opengnsys/scripts/bootOs.py sda 1"
class="partition-boot-btn"
role="button">
<i class="fas fa-play"></i>
Arrancar Ubuntu 22.04
</a>
</td>
</tr>
<tr>
<td><strong>sda</strong></td>
<td><span class="partition-type">2</span></td>
<td class="partition-size">1024.00 MB</td>
<td><span class="partition-type">ntfs</span></td>
<td class="partition-os">Windows 11</td>
<td>
<a href="command+output:/opt/opengnsys/scripts/bootOs.py sda 2"
class="partition-boot-btn"
role="button">
<i class="fas fa-play"></i>
Arrancar Windows 11
</a>
</td>
</tr>
<tr>
<td><strong>sda</strong></td>
<td><span class="partition-type">3</span></td>
<td class="partition-size">256.00 MB</td>
<td><span class="partition-type">swap</span></td>
<td class="partition-no-os">-</td>
<td>
<!-- Sin botón porque no tiene SO -->
</td>
</tr>
<tr>
<td><strong>sdb</strong></td>
<td><span class="partition-type">1</span></td>
<td class="partition-size">2048.00 MB</td>
<td><span class="partition-type">ext4</span></td>
<td class="partition-os">Debian 12</td>
<td>
<a href="command+output:/opt/opengnsys/scripts/bootOs.py sdb 1"
class="partition-boot-btn"
role="button">
<i class="fas fa-play"></i>
Arrancar Debian 12
</a>
</td>
</tr>
<tr>
<td><strong>sdb</strong></td>
<td><span class="partition-type">2</span></td>
<td class="partition-size">512.00 MB</td>
<td><span class="partition-type">fat32</span></td>
<td class="partition-no-os">-</td>
<td>
<!-- Sin botón porque no tiene SO -->
</td>
</tr>
</tbody>
</table>
</div>
<!-- VERSIÓN ORIGINAL (COMENTADA) -->
{#
{% if partitions|length > 0 %}
<div class="partitions-table">
<table>
@ -538,11 +488,11 @@
<tbody>
{% for partition in partitions %}
<tr>
<td>{{ partition.diskNumber }}</td>
<td>{{ partition.partitionNumber }}</td>
<td>{{ (partition.size / 1024)|number_format(2) }} MB</td>
<td>{{ partition.filesystem }}</td>
<td>{{ partition.operativeSystem ? partition.operativeSystem.name : '-' }}</td>
<td><strong>{{ partition.diskNumber }}</strong></td>
<td><span class="partition-type">{{ partition.partitionNumber }}</span></td>
<td class="partition-size">{{ (partition.size / 1024)|number_format(2) }} MB</td>
<td><span class="partition-type">{{ partition.filesystem }}</span></td>
<td class="partition-os">{{ partition.operativeSystem ? partition.operativeSystem.name : '-' }}</td>
<td>
{% if partition.operativeSystem %}
<a href="command+output:/opt/opengnsys/scripts/bootOs.py {{ partition.diskNumber }} {{ partition.partitionNumber }}"
@ -561,7 +511,6 @@
{% else %}
<p class="no-partitions">No hay particiones disponibles.</p>
{% endif %}
#}
</section>
</main>
</body>