diff --git a/src/Catalog.css b/src/Catalog.css index 49037ad..d845558 100644 --- a/src/Catalog.css +++ b/src/Catalog.css @@ -210,7 +210,8 @@ body{ } .meeting-table{ - width: 100%; + width: auto; + max-width: 100%; vertical-align: top; } @@ -236,6 +237,17 @@ body{ .meeting-row .days, .meeting-row .time { display: block; + word-break: break-word; +} + +.table-wrapper { + width: 100%; + overflow-x: auto; + -webkit-overflow-scrolling: touch; +} + +.table-wrapper + .table-wrapper { + margin-top: 16px; } .days{ @@ -341,6 +353,50 @@ tr{ display: none; } +@media (max-width: 768px) { + .custom-table th, + .custom-table td { + font-size: 14px; + padding: 6px; + } + + .course-title { + font-size: 24px; + } + + .meeting-table-head, + .meeting-row { + column-gap: 8px; + } +} + +@media (max-width: 600px) { + .meeting-table-head, + .meeting-row { + grid-template-columns: 1fr; + row-gap: 2px; + text-align: left; + } + + .meeting-table-head { + font-weight: bold; + } + + .meeting-row .days::before { + content: 'Days: '; + font-weight: 600; + } + + .meeting-row .time { + margin-top: 2px; + } + + .meeting-row .time::before { + content: 'Time: '; + font-weight: 600; + } +} + diff --git a/src/CatalogPage.js b/src/CatalogPage.js index 48859dc..4297e5c 100644 --- a/src/CatalogPage.js +++ b/src/CatalogPage.js @@ -326,7 +326,7 @@ function CatalogPage() { } elements.push( -
+
{table}