Fixiamo del codice con del codice non testato
This commit is contained in:
@@ -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 {
|
||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* Base styles */
|
||||||
body {
|
body {
|
||||||
font-family: Arial, sans-serif;
|
font-family: Arial, sans-serif;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
@@ -60,108 +61,28 @@ 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;
|
|
||||||
border-bottom: 2px solid #ddd;
|
|
||||||
padding-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
td {
|
/* Mobile styles */
|
||||||
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 */
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.desktop-schedule { display: none; }
|
.desktop-schedule {
|
||||||
.mobile-schedule { display: flex; flex-direction: column; gap: 1.5rem; }
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-schedule {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
.mobile-schedule .day {
|
.mobile-schedule .day {
|
||||||
background: #f8f8f8;
|
background: #f8f8f8;
|
||||||
@@ -172,23 +93,23 @@ td:hover {
|
|||||||
|
|
||||||
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user