From f55f7c85108c67ff78a8322260360e8c78c8cf0b Mon Sep 17 00:00:00 2001 From: pikachu0542 <112343747+pikachu0542@users.noreply.github.com> Date: Tue, 8 Sep 2026 15:34:15 -0400 Subject: [PATCH 1/3] Bootstrap 5 (#265) * updated imports for bs5, removed themeswitcher * fixed profile image size * fixed role badges * fixed name of var to look for in .env * fixed script link * bump to bootstrap 5.3.11, fix navbar * fixed image upload * add logo to use in navbar * changed inline styles to bootstrap classes (and a tiny bit of custom css) * fixed a couple position badges * updated listing pages * a couple misc fixes * fixed searchbar being off center on listing pages * Converted indentation to 4 spaces * Updated search style, vertical centered title text * Custom css classes for each ldap group badge * Added color modes * Fixed theme switcher in mobile navbar * addressed feedback * fixed bg on other pages --- config.env.py | 2 +- .../static/assets/images/csh_logo_white.svg | 14 ++ profiles/static/js/edit.js | 8 +- profiles/static/style.css | 64 ++++++- profiles/templates/include/head.html | 79 ++++----- profiles/templates/include/nav.html | 51 ++++-- profiles/templates/include/scripts.html | 10 +- profiles/templates/listing.html | 13 +- profiles/templates/profile.html | 164 +++++++++--------- 9 files changed, 249 insertions(+), 156 deletions(-) create mode 100644 profiles/static/assets/images/csh_logo_white.svg diff --git a/config.env.py b/config.env.py index 16d1583..4672b81 100644 --- a/config.env.py +++ b/config.env.py @@ -27,7 +27,7 @@ OIDC_REDIRECT_URI = env.get("PROFILES_OIDC_REDIRECT_URI", "http://localhost:8080/redirect_uri") LDAP_BIND_DN = env.get("LDAP_BIND_DN", default="cn=profiles,ou=Apps,dc=csh,dc=rit,dc=edu") -LDAP_BIND_PASS = env.get("LDAP_BIND_PW", default=None) +LDAP_BIND_PASS = env.get("LDAP_BIND_PASS", default=None) GIT_HASH = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('utf-8').rstrip() diff --git a/profiles/static/assets/images/csh_logo_white.svg b/profiles/static/assets/images/csh_logo_white.svg new file mode 100644 index 0000000..682920e --- /dev/null +++ b/profiles/static/assets/images/csh_logo_white.svg @@ -0,0 +1,14 @@ + + + + Slice 1 + Created with Sketch. + + + + + \ No newline at end of file diff --git a/profiles/static/js/edit.js b/profiles/static/js/edit.js index 42d3b47..59cfe06 100644 --- a/profiles/static/js/edit.js +++ b/profiles/static/js/edit.js @@ -11,7 +11,13 @@ $(function() { //show image upload on click $(function() { $("#self-picture").on('click', function () { - $("#upload-form").toggle() + let uploadForm = document.getElementById("upload-form"); + + if (uploadForm.classList.contains("d-none")) { + uploadForm.classList.remove("d-none"); + } else { + uploadForm.classList.add("d-none"); + } }); }); diff --git a/profiles/static/style.css b/profiles/static/style.css index 2191d1a..1687418 100644 --- a/profiles/static/style.css +++ b/profiles/static/style.css @@ -20,10 +20,6 @@ padding-top: 50px; } -.img-circle { - border-radius: 50%; -} - .profile-img { height: 250px; width: 250px; @@ -60,9 +56,10 @@ .badge { font-size: 85%; + font-weight: 600; } -.form-control-sm { +#search-field { font-size: 13px !important; } @@ -72,7 +69,6 @@ body { padding-top: 80px; - background-color: #eee; } a, @@ -83,22 +79,72 @@ a:active { text-decoration: none; } -.badge-pink { +/* LDAP ROLE BADGES */ + +.badge-current-student { + color: #fff; + background-color: #bbb; +} +.badge-rtp { + color: #fff; + background-color: #ff9800; +} + +.badge-eboard { + color: #fff; + background-color: #4caf50; +} + +.badge-constitutional-maintainer { + color: #fff; + background-color: #e51c23; +} +.badge-3da { color: #fff; background-color: #cb42a9; } -.badge-purple { +.badge-drink { + color: #fff; + background-color: #b0197e; +} + +.badge-webmaster, +.badge-devcade, +.badge-mediapc { + color: #fff; + background-color: #2196f3; +} + +.badge-wiki { color: #fff; background-color: #b19cd9; } -.badge-strange { +.badge-segfault { color: #000; background-color: #ffffff; font-family: "Comic Sans MS", "Comic Sans", cursive; } +.badge-disabled { + color: #fff; + background-color: #181818; +} + +.badge-misc { + background-color: var(--bs-secondary-bg); + color: var(--bs-secondary-text); +} + +.color-twitter-blue { + color: #00aced; +} + +.color-gh-purple { + color: #6e5494; +} + .profile-link, .profile-link:hover, .profile-link:visited { diff --git a/profiles/templates/include/head.html b/profiles/templates/include/head.html index 4de3859..cb7807d 100644 --- a/profiles/templates/include/head.html +++ b/profiles/templates/include/head.html @@ -1,58 +1,55 @@ - + - + CSH Profiles - + - - - - - + + + + - - - + + + - + - + - + - + - + diff --git a/profiles/templates/include/nav.html b/profiles/templates/include/nav.html index 2d46d25..e4ce79d 100644 --- a/profiles/templates/include/nav.html +++ b/profiles/templates/include/nav.html @@ -1,9 +1,12 @@