Fixiamo del codice con del codice non testato

This commit is contained in:
2025-10-30 17:00:17 +01:00
parent bd3d23a8f8
commit f4122ca342
3 changed files with 261 additions and 279 deletions

View File

@@ -12,8 +12,15 @@ h1, h2 {
margin: 10px 0 20px 0;
}
h1 { color: #2c3e50; font-size: 1.8em; }
h2 { color: #34495e; font-size: 1.4em; }
h1 {
color: #2c3e50;
font-size: 1.8em;
}
h2 {
color: #34495e;
font-size: 1.4em;
}
/* Grid layout */
.grid {
@@ -70,8 +77,13 @@ a:hover {
font-size: 0.95em;
}
h1 { font-size: 1.5em; }
h2 { font-size: 1.2em; }
h1 {
font-size: 1.5em;
}
h2 {
font-size: 1.2em;
}
.grid {
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
@@ -89,11 +101,16 @@ a:hover {
}
@media screen and (max-width: 480px) {
h1 { font-size: 1.3em; }
h2 { font-size: 1em; }
h1 {
font-size: 1.3em;
}
h2 {
font-size: 1em;
}
.grid {
grid-template-columns: 1fr; /* single column for small screens */
grid-template-columns: 1fr;
gap: 10px;
}

View File

@@ -27,3 +27,37 @@
font-size: 1.3em;
font-weight: bold;
}
/* Responsive navbar */
@media (max-width: 768px) {
.navbar {
flex-direction: column;
gap: 10px;
padding: 15px;
}
.navbar a {
margin-left: 0;
margin: 0 10px;
}
.navbar .logo {
font-size: 1.2em;
margin-bottom: 5px;
}
}
@media (max-width: 480px) {
.navbar {
padding: 12px;
}
.navbar .logo {
font-size: 1.1em;
}
.navbar a {
font-size: 0.9em;
margin: 0 8px;
}
}

View File

@@ -1,3 +1,4 @@
/* Base styles */
body {
font-family: Arial, sans-serif;
padding: 15px;
@@ -60,108 +61,28 @@ td:hover {
color: #666;
}
/*
@media (max-width: 768px) {
table, thead, tbody, th, td, tr {
display: block;
/* Desktop/Mobile layout control */
.desktop-schedule {
display: table;
width: 100%;
border-collapse: collapse;
}
tr {
margin-bottom: 15px;
border-bottom: 2px solid #ddd;
padding-bottom: 10px;
}
th {
.mobile-schedule {
display: none;
}
td {
text-align: left;
padding: 10px 10px 10px 45%;
position: relative;
border: none;
border-bottom: 1px solid #eee;
}
td::before {
position: absolute;
left: 10px;
top: 10px;
width: 40%;
white-space: nowrap;
font-weight: bold;
content: attr(data-label);
}
td:last-child {
border-bottom: 0;
}
}
@media (max-width: 480px) {
body { padding: 10px; }
h1 { font-size: 1.5em; }
td::before { font-size: 0.9em; }
td { padding-left: 50%; }
}
*/
/* --- tuoi stili desktop (questi restano uguali) --- */
table {
border-collapse: collapse;
width: 100%;
max-width: 1000px;
margin: 0 auto;
background: #fff;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
th, td {
border: 1px solid #ccc;
text-align: center;
padding: 10px;
vertical-align: top;
}
th {
background-color: #e0e0e0;
font-weight: bold;
}
td {
transition: background-color 0.2s;
}
td:hover {
background-color: #f7f7f7;
}
.subject {
font-weight: bold;
color: #1f618d;
}
.teacher {
font-size: 0.9em;
color: #2c3e50;
}
.room {
font-size: 0.8em;
color: #666;
}
/* Mostra solo la tabella su desktop */
.desktop-schedule { display: table; width: 100%; border-collapse: collapse; }
.mobile-schedule { display: none; }
/* Mobile: nasconde tabella, mostra card */
/* Mobile styles */
@media (max-width: 768px) {
.desktop-schedule { display: none; }
.mobile-schedule { display: flex; flex-direction: column; gap: 1.5rem; }
.desktop-schedule {
display: none;
}
.mobile-schedule {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.mobile-schedule .day {
background: #f8f8f8;
@@ -172,23 +93,23 @@ td:hover {
.mobile-schedule h2 {
margin-top: 0;
margin-bottom: .8rem;
margin-bottom: 0.8rem;
font-size: 1.2rem;
color: #111;
border-bottom: 1px solid #ddd;
padding-bottom: .3rem;
padding-bottom: 0.3rem;
}
.lesson {
background: #fff;
border: 1px solid #eee;
border-radius: 8px;
padding: .6rem .8rem;
margin-bottom: .6rem;
padding: 0.6rem 0.8rem;
margin-bottom: 0.6rem;
}
.lesson.empty {
opacity: .6;
opacity: 0.6;
}
.hour {
@@ -212,3 +133,13 @@ td:hover {
color: #777;
}
}
@media (max-width: 480px) {
body {
padding: 10px;
}
h1 {
font-size: 1.5em;
}
}