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

@@ -1,109 +1,126 @@
/* Base styles */ /* Base styles */
body { body {
font-family: Arial, sans-serif; font-family: Arial, sans-serif;
padding: 15px; padding: 15px;
background-color: #f0f2f5; background-color: #f0f2f5;
color: #333; color: #333;
margin: 0; margin: 0;
} }
h1, h2 { h1, h2 {
text-align: center; text-align: center;
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 {
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 15px; gap: 15px;
max-width: 1000px; max-width: 1000px;
margin: 0 auto; margin: 0 auto;
} }
/* Card styles */ /* Card styles */
ul { ul {
list-style: none; list-style: none;
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 {
margin: 6px 0; margin: 6px 0;
} }
li b { li b {
display: block; display: block;
margin-bottom: 8px; margin-bottom: 8px;
font-size: 1em; font-size: 1em;
color: #1f618d; color: #1f618d;
} }
a { a {
text-decoration: none; text-decoration: none;
color: #0066cc; color: #0066cc;
padding: 5px 8px; padding: 5px 8px;
border-radius: 5px; border-radius: 5px;
transition: background-color 0.2s, color 0.2s; transition: background-color 0.2s, color 0.2s;
} }
a:hover { a:hover {
background-color: #0066cc; background-color: #0066cc;
color: #fff; color: #fff;
} }
/* Responsive adjustments */ /* Responsive adjustments */
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
body { body {
padding: 10px; padding: 10px;
font-size: 0.95em; font-size: 0.95em;
} }
h1 { font-size: 1.5em; } h1 {
h2 { font-size: 1.2em; } font-size: 1.5em;
}
.grid {
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); h2 {
gap: 10px; font-size: 1.2em;
} }
ul { .grid {
padding: 10px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
} gap: 10px;
}
a {
padding: 8px 10px; ul {
font-size: 0.95em; padding: 10px;
} }
a {
padding: 8px 10px;
font-size: 0.95em;
}
} }
@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;
}
.grid {
grid-template-columns: 1fr; /* single column for small screens */ h2 {
gap: 10px; font-size: 1em;
} }
ul { .grid {
padding: 8px; grid-template-columns: 1fr;
} gap: 10px;
}
a {
display: block; ul {
text-align: center; padding: 8px;
padding: 10px; }
}
} a {
display: block;
text-align: center;
padding: 10px;
}
}

View File

@@ -1,29 +1,63 @@
/* Navbar */ /* Navbar */
.navbar { .navbar {
background-color: #2c3e50; background-color: #2c3e50;
padding: 10px 20px; padding: 10px 20px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
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 {
color: #fff; color: #fff;
text-decoration: none; text-decoration: none;
margin-left: 15px; margin-left: 15px;
font-weight: bold; font-weight: bold;
transition: color 0.2s; transition: color 0.2s;
} }
.navbar a:hover { .navbar a:hover {
color: #f39c12; color: #f39c12;
} }
.navbar .logo { .navbar .logo {
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,214 +1,145 @@
/* Base styles */
body { body {
font-family: Arial, sans-serif; font-family: Arial, sans-serif;
padding: 15px; padding: 15px;
background-color: #f0f2f5; background-color: #f0f2f5;
color: #333; color: #333;
margin: 0; margin: 0;
} }
h1 { h1 {
text-align: center; text-align: center;
margin-bottom: 20px; margin-bottom: 20px;
color: #2c3e50; color: #2c3e50;
font-size: 1.8em; font-size: 1.8em;
} }
/* Table styles */ /* Table styles */
table { table {
border-collapse: collapse; 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;
}
/*
@media (max-width: 768px) {
table, thead, tbody, th, td, tr {
display: block;
width: 100%; width: 100%;
} max-width: 1000px;
margin: 0 auto;
tr { background: #fff;
margin-bottom: 15px; border-radius: 10px;
border-bottom: 2px solid #ddd; overflow: hidden;
padding-bottom: 10px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
th {
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 { th, td {
border: 1px solid #ccc; border: 1px solid #ccc;
text-align: center; text-align: center;
padding: 10px; padding: 10px;
vertical-align: top; vertical-align: top;
} }
th { th {
background-color: #e0e0e0; background-color: #e0e0e0;
font-weight: bold; font-weight: bold;
} }
td { td {
transition: background-color 0.2s; transition: background-color 0.2s;
} }
td:hover { td:hover {
background-color: #f7f7f7; background-color: #f7f7f7;
} }
.subject { .subject {
font-weight: bold; font-weight: bold;
color: #1f618d; color: #1f618d;
} }
.teacher { .teacher {
font-size: 0.9em; font-size: 0.9em;
color: #2c3e50; color: #2c3e50;
} }
.room { .room {
font-size: 0.8em; 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 {
background: #f8f8f8;
border-radius: 10px;
box-shadow: 0 2px 6px rgba(0,0,0,0.05);
padding: 1rem;
}
.mobile-schedule h2 {
margin-top: 0;
margin-bottom: .8rem;
font-size: 1.2rem;
color: #111;
border-bottom: 1px solid #ddd;
padding-bottom: .3rem;
}
.lesson {
background: #fff;
border: 1px solid #eee;
border-radius: 8px;
padding: .6rem .8rem;
margin-bottom: .6rem;
}
.lesson.empty {
opacity: .6;
}
.hour {
font-size: 0.9rem;
color: #666; color: #666;
margin-bottom: 3px;
}
.subject {
font-weight: 600;
color: #222;
}
.teacher {
font-size: 0.85rem;
color: #555;
}
.room {
font-size: 0.8rem;
color: #777;
}
} }
/* Desktop/Mobile layout control */
.desktop-schedule {
display: table;
width: 100%;
border-collapse: collapse;
}
.mobile-schedule {
display: none;
}
/* Mobile styles */
@media (max-width: 768px) {
.desktop-schedule {
display: none;
}
.mobile-schedule {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.mobile-schedule .day {
background: #f8f8f8;
border-radius: 10px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
padding: 1rem;
}
.mobile-schedule h2 {
margin-top: 0;
margin-bottom: 0.8rem;
font-size: 1.2rem;
color: #111;
border-bottom: 1px solid #ddd;
padding-bottom: 0.3rem;
}
.lesson {
background: #fff;
border: 1px solid #eee;
border-radius: 8px;
padding: 0.6rem 0.8rem;
margin-bottom: 0.6rem;
}
.lesson.empty {
opacity: 0.6;
}
.hour {
font-size: 0.9rem;
color: #666;
margin-bottom: 3px;
}
.subject {
font-weight: 600;
color: #222;
}
.teacher {
font-size: 0.85rem;
color: #555;
}
.room {
font-size: 0.8rem;
color: #777;
}
}
@media (max-width: 480px) {
body {
padding: 10px;
}
h1 {
font-size: 1.5em;
}
}