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

View File

@@ -1,29 +1,63 @@
/* Navbar */
.navbar {
background-color: #2c3e50;
padding: 10px 20px;
display: flex;
justify-content: space-between;
align-items: center;
color: #fff;
border-radius: 0 0 10px 10px;
margin-bottom: 20px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
background-color: #2c3e50;
padding: 10px 20px;
display: flex;
justify-content: space-between;
align-items: center;
color: #fff;
border-radius: 0 0 10px 10px;
margin-bottom: 20px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.navbar a {
color: #fff;
text-decoration: none;
margin-left: 15px;
font-weight: bold;
transition: color 0.2s;
color: #fff;
text-decoration: none;
margin-left: 15px;
font-weight: bold;
transition: color 0.2s;
}
.navbar a:hover {
color: #f39c12;
color: #f39c12;
}
.navbar .logo {
font-size: 1.3em;
font-weight: bold;
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,214 +1,145 @@
/* Base styles */
body {
font-family: Arial, sans-serif;
padding: 15px;
background-color: #f0f2f5;
color: #333;
margin: 0;
font-family: Arial, sans-serif;
padding: 15px;
background-color: #f0f2f5;
color: #333;
margin: 0;
}
h1 {
text-align: center;
margin-bottom: 20px;
color: #2c3e50;
font-size: 1.8em;
text-align: center;
margin-bottom: 20px;
color: #2c3e50;
font-size: 1.8em;
}
/* Table styles */
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;
}
/*
@media (max-width: 768px) {
table, thead, tbody, th, td, tr {
display: block;
border-collapse: collapse;
width: 100%;
}
tr {
margin-bottom: 15px;
border-bottom: 2px solid #ddd;
padding-bottom: 10px;
}
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);
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;
border: 1px solid #ccc;
text-align: center;
padding: 10px;
vertical-align: top;
}
th {
background-color: #e0e0e0;
font-weight: bold;
background-color: #e0e0e0;
font-weight: bold;
}
td {
transition: background-color 0.2s;
transition: background-color 0.2s;
}
td:hover {
background-color: #f7f7f7;
background-color: #f7f7f7;
}
.subject {
font-weight: bold;
color: #1f618d;
font-weight: bold;
color: #1f618d;
}
.teacher {
font-size: 0.9em;
color: #2c3e50;
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 {
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;
font-size: 0.8em;
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;
}
}