Skip to content
Merged
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
41 changes: 3 additions & 38 deletions server/assets/css/flash.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,10 @@
position: fixed;
top: 20px;
right: 20px;
z-index: 1000;
z-index: 1080;
width: 300px;
}

.alert {
padding: 15px;
margin-bottom: 20px;
border: 1px solid transparent;
border-radius: 4px;
color: white;
opacity: 0.9;
}

.alert-icon {
margin-right: 10px;
}

.close-alert {
float: right;
font-size: 20px;
font-weight: bold;
line-height: 20px;
color: white;
text-shadow: 0 1px 0 #fff;
opacity: 0.9;
border: none;
background: none;
cursor: pointer;
}

.alert-success {
background-color: #4caf50;
}
.alert-info {
background-color: #2196f3;
}
.alert-warning {
background-color: #ff9800;
}
.alert-error {
background-color: #f44336;
.flash-messages .alert {
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
255 changes: 92 additions & 163 deletions server/assets/css/style.css
Original file line number Diff line number Diff line change
@@ -1,211 +1,140 @@
/* Copied from seating (server/static/css/style.css) so the two apps look the same; keep them in sync. */
/* Adapted from seating (server/static/css/style.css) so the two apps look the same;
keep them in sync. src/index.css applies the same colors to the course pages.

a {
color: #1976d2;
text-decoration: none;
}

body {
color: #333;
background-color: #f7f7f7;
}

header a {
color: inherit;
font-weight: inherit;
}
UC Berkeley colors (https://brand.berkeley.edu/visual-identity/colors/): Berkeley
Blue #003262 takes the place of Bootstrap's blue, and California Gold #FDB515
underlines the header. */
:root {
--berkeley-blue: #003262;
--berkeley-blue-dark: #00243f;
--berkeley-blue-darker: #001a2e;
--berkeley-blue-light: #8098b0;
--california-gold: #fdb515;

.main-container {
/* margin: 0 auto;
padding: 20px 0; */
max-width: 960px;
/* justify-content: center; */
--bs-primary: var(--berkeley-blue);
--bs-primary-rgb: 0, 50, 98;
--bs-primary-text-emphasis: var(--berkeley-blue-darker);
--bs-primary-bg-subtle: #ccd6e0;
--bs-primary-border-subtle: #99adc0;
--bs-link-color: var(--berkeley-blue);
--bs-link-color-rgb: 0, 50, 98;
--bs-link-hover-color: var(--berkeley-blue-dark);
--bs-link-hover-color-rgb: 0, 36, 63;
--bs-focus-ring-color: rgba(0, 50, 98, 0.25);
}

.add-item {
/* Dropdown menu: creating new items */
border-bottom: 1px solid #e8e8e8;
/* Bootstrap's components set their own copy of its blue rather than reading --bs-primary */
.btn-primary {
--bs-btn-bg: var(--berkeley-blue);
--bs-btn-border-color: var(--berkeley-blue);
--bs-btn-hover-bg: var(--berkeley-blue-dark);
--bs-btn-hover-border-color: var(--berkeley-blue-dark);
--bs-btn-focus-shadow-rgb: 0, 50, 98;
--bs-btn-active-bg: var(--berkeley-blue-darker);
--bs-btn-active-border-color: var(--berkeley-blue-darker);
--bs-btn-disabled-bg: var(--berkeley-blue);
--bs-btn-disabled-border-color: var(--berkeley-blue);
}

.checkbox ul {
list-style-type: none;
.dropdown-menu {
--bs-dropdown-link-active-bg: var(--berkeley-blue);
}

.delist {
padding-left: 40px;
.form-check-input:focus {
border-color: var(--berkeley-blue-light);
box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}

.delitem {
font-size: 14px;
line-height: 2px;
min-height: 0px;
.form-check-input:checked {
background-color: var(--berkeley-blue);
border-color: var(--berkeley-blue);
}

.errormsg {
color: #ff0000;
.nav-link:focus-visible {
box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}

.form-buttons {
padding: 20px 10px 5px 10px;
.btn-close {
--bs-btn-close-focus-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}

.material-icons.help {
margin-right: 30px;
padding-bottom: 0px;
}

.material-icons.std {
font-size: 30px;
margin-left: 30px;
padding-bottom: 0px;
}

.material-icons.std:hover {
cursor: pointer;
background-color: rgba(0, 0, 0, 0.12);
border-radius: 5px;
}

.mdl-layout__content {
padding-bottom: 10em;
}

.rooms {
max-width: 620px;
a {
text-decoration: none;
}

.rooms li {
padding-left: 0;
/* Berkeley Blue is too close to the text color to mark a link on its own, so links
within a sentence are underlined too */
p a {
text-decoration: underline;
}

.roomspg-add-room-button {
padding-left: 0;
.navbar.site-header {
border-bottom: 4px solid var(--california-gold);
/* Bootstrap's dark navbar dims its links to 55% white, too faint to read on the blue */
--bs-navbar-color: #fff;
--bs-navbar-hover-color: #fff;
--bs-navbar-active-color: #fff;
}

.room h1,
.room h2,
.room h3,
.room h4,
.room h5,
.room h6 {
text-align: center;
.site-header .nav-link:hover,
.site-header .nav-link:focus-visible {
text-decoration: underline;
text-decoration-color: var(--california-gold);
text-decoration-thickness: 2px;
text-underline-offset: 4px;
}

.seats {
position: relative;
margin: 10px auto;
.site-title {
margin: 0;
font-size: 1.25rem;
}

/*horizontal scrolling on mobile*/
@media (max-width: 620px) {
.seats {
left: 15%;
/* while the links are folded behind the menu button, the title takes the room left
beside it, so a long title wraps instead of pushing the button onto its own line */
@media (max-width: 991.98px) {
.site-title {
flex: 1;
min-width: 0;
}
}

.seat {
position: absolute;
border-radius: 50%;
width: 18px;
height: 18px;
border: 2px solid #555;
background-color: #ddd;
outline: 0;
}

.seat.highlight {
background-color: #ef5350;
.site-title .navbar-brand {
white-space: normal;
}

.seat.occupied {
background-color: #64b5f6;
.site-content {
padding: 16px 16px 10em;
}

.seat:hover {
background-color: #ef5350;
}

.seat-label {
position: absolute;
width: 22px;
height: 22px;
line-height: 22px;
text-align: center;
font-weight: bold;
font-size: 22px;
/* Seat names like "A 1" must stay on one line; the box is only 22px wide,
so a regular space would otherwise wrap the label onto a second line. */
white-space: nowrap;
}

.seat-tooltip:not(.is-active) {
display: none;
/* pages that keep to a column in the middle of the screen */
.landing,
.main-container,
.rooms {
margin: 0 auto;
}

.seat-tooltip .photo {
display: inline-block;
width: 94px;
height: 125px;
margin: 5px;
.landing {
max-width: 840px;
}

.students {
.main-container {
max-width: 960px;
}

.students table {
width: 100%;
table-layout: fixed;
}

.students table td {
width: 50%;
text-overflow: ellipsis;
}

.student {
.rooms {
max-width: 620px;
text-align: center;
}

.student .photo {
width: 187px;
height: 250px;
margin: auto;
}

.sort {
cursor: pointer;
}

.sort:after {
display: inline-block;
position: relative;
width: 0;
height: 0;
top: -2px;
right: -5px;
content: "";
border-left: 5px solid transparent;
border-right: 5px solid transparent;
}

.sort.asc:after {
border-bottom: 5px solid #000;
}

.sort.desc:after {
border-top: 5px solid #000;
.checkbox ul {
list-style-type: none;
}

@media (max-width: 400px) {
.hidden-small {
display: none;
}
.form-buttons {
padding: 20px 10px 5px 10px;
}

@media (max-width: 767px) {
.mdl-layout__header-row {
padding: 0 16px 0 16px;
}
.offering-term {
min-width: 4.5em;
color: #424242;
font-weight: bold;
}
21 changes: 21 additions & 0 deletions server/assets/vendor/bootstrap/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2011-2025 The Bootstrap Authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
7 changes: 7 additions & 0 deletions server/assets/vendor/bootstrap/bootstrap.bundle.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions server/assets/vendor/bootstrap/bootstrap.bundle.min.js.map

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions server/assets/vendor/bootstrap/bootstrap.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions server/assets/vendor/bootstrap/bootstrap.min.css.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
)
app.url_map.strict_slashes = False
# Offering pages are the React build in static/; server-rendered pages live in templates/.
# static/ is searched first, so templates/ must not reuse the build's names (hence landing.html,
# not index.html). Name templates *.html so that Flask autoescapes them.
app.jinja_loader = ChoiceLoader([
app.jinja_loader,
FileSystemLoader(os.path.join(os.path.dirname(os.path.abspath(__file__)), "templates")),
Expand Down
Loading
Loading