From f4122ca342f56eaa657a4945915b434e5bfddb25 Mon Sep 17 00:00:00 2001 From: Vichingo455 Date: Thu, 30 Oct 2025 17:00:17 +0100 Subject: [PATCH] Fixiamo del codice con del codice non testato --- htdocs/css/home.css | 177 ++++++++++++----------- htdocs/css/navbar.css | 68 ++++++--- htdocs/css/timetable.css | 295 +++++++++++++++------------------------ 3 files changed, 261 insertions(+), 279 deletions(-) diff --git a/htdocs/css/home.css b/htdocs/css/home.css index cf85767..e590ec1 100644 --- a/htdocs/css/home.css +++ b/htdocs/css/home.css @@ -1,109 +1,126 @@ /* Base styles */ -body { - font-family: Arial, sans-serif; - padding: 15px; - background-color: #f0f2f5; - color: #333; - margin: 0; +body { + 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; +.grid { + 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; +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; } 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; +li { + margin: 6px 0; } -li b { - display: block; - margin-bottom: 8px; - font-size: 1em; - color: #1f618d; +li b { + 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; +a { + 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; +a:hover { + background-color: #0066cc; + color: #fff; } /* Responsive adjustments */ @media screen and (max-width: 768px) { - body { - padding: 10px; - font-size: 0.95em; - } - - h1 { font-size: 1.5em; } - h2 { font-size: 1.2em; } - - .grid { - grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); - gap: 10px; - } - - ul { - padding: 10px; - } - - a { - padding: 8px 10px; - font-size: 0.95em; - } + body { + padding: 10px; + font-size: 0.95em; + } + + h1 { + font-size: 1.5em; + } + + h2 { + font-size: 1.2em; + } + + .grid { + grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); + gap: 10px; + } + + 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; } - - .grid { - grid-template-columns: 1fr; /* single column for small screens */ - gap: 10px; - } - - ul { - padding: 8px; - } - - a { - display: block; - text-align: center; - padding: 10px; - } -} + h1 { + font-size: 1.3em; + } + + h2 { + font-size: 1em; + } + + .grid { + grid-template-columns: 1fr; + gap: 10px; + } + + ul { + padding: 8px; + } + + a { + display: block; + text-align: center; + padding: 10px; + } +} \ No newline at end of file diff --git a/htdocs/css/navbar.css b/htdocs/css/navbar.css index 196d69f..31da9dc 100644 --- a/htdocs/css/navbar.css +++ b/htdocs/css/navbar.css @@ -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; + } +} \ No newline at end of file diff --git a/htdocs/css/timetable.css b/htdocs/css/timetable.css index 7fd4462..f4003b1 100644 --- a/htdocs/css/timetable.css +++ b/htdocs/css/timetable.css @@ -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; + } +} \ No newline at end of file