Repository navigation
Replace Material Design Lite with Bootstrap 5, with seating's Berkeley colors - #19
Merged
Merged
Conversation
Use the same indigo (#3f51b5) as the header of the server-rendered pages, which use Material Design Lite's indigo theme, instead of Bootstrap 4's teal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🚀 Staging Preview Deployed! URL: https://preview-sections-pr-19-137456085712.us-west1.run.app |
…y colors Follow seating (berkeley-cdss/seating#146): - The landing, offerings and import pages use Bootstrap 5.3.8 instead of MDL, Roboto and Material Icons. Bootstrap is self-hosted (the same files seating vendors), so these pages load nothing from another site. - Both they and the course pages (the React app) use Berkeley Blue in place of Bootstrap's blue, and a Berkeley Blue header underlined in California Gold, as seating does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
do not merge until preview checked out; waiting for redirect uri to be added (will likely happen within 24 hours of this comment). |
Flask autoescapes templates whose name ends in .html (or .htm, .xml, .xhtml, .svg). Ours were named *.html.j2, as seating's were before berkeley-cdss/seating#139, but without seating's autoescape override, so Canvas course names and user names were rendered as raw HTML. Rename them to *.html, as seating now does. The landing page becomes landing.html rather than index.html, because main.py looks in the React build first and its index.html would take its place. test_autoescape.py checks Flask's rule, that every template is escaped, that no template shares the React page's name, and that a course and user name containing <script> are escaped on /offerings and /offerings/new. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follows seating's move off Material Design Lite (berkeley-cdss/seating#146), so the two apps look the same and sections no longer uses anything from MDL.
Server-rendered pages (landing
/,/offerings,/offerings/new):server/assets/vendor/bootstrap/contains the same files seating vendors. These pages previously loaded MDL, Roboto and Material Icons from Google and cdnjs; they now load nothing from another site.style.cssis adapted from seating's (only the parts these pages use), andflash.cssis copied from it.Course pages (the React app, already Bootstrap 5 since #15): the same colors.
Colors, as in seating:
#003262replaces Bootstrap's blue for buttons, links, tabs and focus rings.#FDB515) bottom border and white links, underlined in gold on hover.Templates are now
.html, and autoescaped:.html.j2, which Flask does not autoescape, and unlike seating (#116, then #139) sections had no override, so Canvas course names and user names went into the page as raw HTML..html, as seating's are. The landing page islanding.html, notindex.html, becausemain.pysearches the React build first and itsindex.htmlwould take its place.server/test_autoescape.pychecks that every template is escaped, that none shares the React page's name, and that a<script>in a course or user name comes out escaped on/offeringsand/offerings/new.Test plan
.j2names, the new escaping tests fail, and the<script>reaches the page unescapedrgb(0, 50, 98), with the gold border./assets/🤖 Generated with Claude Code