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; margin: 10px 0 20px 0;
} }
h1 { color: #2c3e50; font-size: 1.8em; } h1 {
h2 { color: #34495e; font-size: 1.4em; } color: #2c3e50;
font-size: 1.8em;
}
h2 {
color: #34495e;
font-size: 1.4em;
}
/* Grid layout */ /* Grid layout */
.grid { .grid {
@@ -30,13 +37,13 @@ ul {
padding: 15px; padding: 15px;
background: #fff; background: #fff;
border-radius: 10px; border-radius: 10px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
transition: transform 0.2s, box-shadow 0.2s; transition: transform 0.2s, box-shadow 0.2s;
} }
ul:hover { ul:hover {
transform: translateY(-3px); transform: translateY(-3px);
box-shadow: 0 5px 10px rgba(0,0,0,0.15); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
} }
li { li {
@@ -70,8 +77,13 @@ a:hover {
font-size: 0.95em; font-size: 0.95em;
} }
h1 { font-size: 1.5em; } h1 {
h2 { font-size: 1.2em; } font-size: 1.5em;
}
h2 {
font-size: 1.2em;
}
.grid { .grid {
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
@@ -89,11 +101,16 @@ a:hover {
} }
@media screen and (max-width: 480px) { @media screen and (max-width: 480px) {
h1 { font-size: 1.3em; } h1 {
h2 { font-size: 1em; } font-size: 1.3em;
}
h2 {
font-size: 1em;
}
.grid { .grid {
grid-template-columns: 1fr; /* single column for small screens */ grid-template-columns: 1fr;
gap: 10px; gap: 10px;
} }

View File

@@ -8,7 +8,7 @@
color: #fff; color: #fff;
border-radius: 0 0 10px 10px; border-radius: 0 0 10px 10px;
margin-bottom: 20px; margin-bottom: 20px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
} }
.navbar a { .navbar a {
@@ -27,3 +27,37 @@
font-size: 1.3em; font-size: 1.3em;
font-weight: bold; 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 { body {
font-family: Arial, sans-serif; font-family: Arial, sans-serif;
padding: 15px; padding: 15px;
@@ -22,7 +23,7 @@ table {
background: #fff; background: #fff;
border-radius: 10px; border-radius: 10px;
overflow: hidden; overflow: hidden;
box-shadow: 0 2px 8px rgba(0,0,0,0.1); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
} }
th, td { th, td {
@@ -60,135 +61,55 @@ td:hover {
color: #666; color: #666;
} }
/* /* Desktop/Mobile layout control */
@media (max-width: 768px) { .desktop-schedule {
table, thead, tbody, th, td, tr { display: table;
display: block;
width: 100%; width: 100%;
} border-collapse: collapse;
}
tr { .mobile-schedule {
margin-bottom: 15px; display: none;
border-bottom: 2px solid #ddd; }
padding-bottom: 10px;
}
th { /* Mobile styles */
@media (max-width: 768px) {
.desktop-schedule {
display: none; display: none;
} }
td { .mobile-schedule {
text-align: left; display: flex;
padding: 10px 10px 10px 45%; flex-direction: column;
position: relative; gap: 1.5rem;
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 */
@media (max-width: 768px) {
.desktop-schedule { display: none; }
.mobile-schedule { display: flex; flex-direction: column; gap: 1.5rem; }
.mobile-schedule .day { .mobile-schedule .day {
background: #f8f8f8; background: #f8f8f8;
border-radius: 10px; border-radius: 10px;
box-shadow: 0 2px 6px rgba(0,0,0,0.05); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
padding: 1rem; padding: 1rem;
} }
.mobile-schedule h2 { .mobile-schedule h2 {
margin-top: 0; margin-top: 0;
margin-bottom: .8rem; margin-bottom: 0.8rem;
font-size: 1.2rem; font-size: 1.2rem;
color: #111; color: #111;
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
padding-bottom: .3rem; padding-bottom: 0.3rem;
} }
.lesson { .lesson {
background: #fff; background: #fff;
border: 1px solid #eee; border: 1px solid #eee;
border-radius: 8px; border-radius: 8px;
padding: .6rem .8rem; padding: 0.6rem 0.8rem;
margin-bottom: .6rem; margin-bottom: 0.6rem;
} }
.lesson.empty { .lesson.empty {
opacity: .6; opacity: 0.6;
} }
.hour { .hour {
@@ -212,3 +133,13 @@ td:hover {
color: #777; color: #777;
} }
} }
@media (max-width: 480px) {
body {
padding: 10px;
}
h1 {
font-size: 1.5em;
}
}