Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 46 additions & 3 deletions src/Catalog.css
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,27 @@ body{
.button-container{
display: flex;
justify-content: flex-end;
gap: 0.5rem;
flex-wrap: wrap;
}

.catalog-link{
display: inline-flex;
text-decoration: none;
}

.catalog-link .catalog-button{
width: 100%;
}

.course-table-container{
width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}

.course-table-container .custom-table{
min-width: 600px;
}


Expand Down Expand Up @@ -272,11 +293,11 @@ tr{


.catalogPage .custom-table {
width: 100%;
width: clamp(600px, 100%, 1000px);
max-width: 1000px; /* Limit the table width on large screens */
border: 1px solid #fff;
border-radius: 3px;
table-layout: fixed;
table-layout: auto;
}

.custom-table th, .custom-table td {
Expand Down Expand Up @@ -537,7 +558,16 @@ tr.title-header:hover th{
.catalogPage .catalog-button {
text-align: right;
font-size: 8px;
white-space: nowrap;
white-space: nowrap;
}

.catalogPage .button-container{
justify-content: flex-start;
gap: 0.25rem;
}

.catalogPage .external-buttons{
width: auto;
}

.toggle-button {
Expand Down Expand Up @@ -629,6 +659,19 @@ tr.title-header:hover th{
.section-title{
font-size: 20px;
}
.catalogPage .course-table-container{
margin-bottom: 1.5rem;
}
.catalogPage .button-container{
flex-direction: column;
align-items: stretch;
}
.catalogPage .button-container .catalog-link{
width: 100%;
}
.catalogPage .catalog-button{
width: 100%;
}
.catalog-section {
padding: 10px; /* Add some padding to the section for narrower screens */
}
Expand Down
16 changes: 11 additions & 5 deletions src/CatalogPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,16 @@ function CatalogPage() {
<th colSpan="4" className='course-title' onClick={() => toggleTableExpansion(tableKey)}>{course.subject} {course.catalog_number}: {course.descr}</th>

<th className="external-buttons">
<div className = "button-container">
<th className="sis-button"><a target="_blank" rel="noopener noreferrer" href={getSisLink(course.subject, course.catalog_number) }><button className="catalog-button">SIS</button></a></th>
<th><a target="_blank" rel="noopener noreferrer" href={getCourseForumLink(course.subject, course.catalog_number)}><button className="catalog-button">theCourseForum</button></a> </th>
<th><a target="_blank" rel="noopener noreferrer" href={getVAGradesLink(course.subject, course.catalog_number)}> <button className="catalog-button hide-button">VA Grades</button></a></th>
<div className="button-container">
<a className="catalog-link" target="_blank" rel="noopener noreferrer" href={getSisLink(course.subject, course.catalog_number)}>
<button className="catalog-button">SIS</button>
</a>
<a className="catalog-link" target="_blank" rel="noopener noreferrer" href={getCourseForumLink(course.subject, course.catalog_number)}>
<button className="catalog-button">theCourseForum</button>
</a>
<a className="catalog-link hide-button" target="_blank" rel="noopener noreferrer" href={getVAGradesLink(course.subject, course.catalog_number)}>
<button className="catalog-button">VA Grades</button>
</a>
</div>
</th>
</tr>
Expand Down Expand Up @@ -326,7 +332,7 @@ function CatalogPage() {
}

elements.push(
<div>
<div className="course-table-container">
<table className={'custom-table'} id={tableKey}>
<tbody>{table}</tbody>
</table>
Expand Down