Spaces:
Sleeping
Sleeping
Download src/display/css_html_js.py from Pitt-iRiS-Lab/MedIRT: direct link, hf CLI and curl.
- Browser
- Download file 4.37 kB
-
https://huggingface.co/spaces/Pitt-iRiS-Lab/MedIRT/resolve/main/src/display/css_html_js.py
- Command line
-
hf download hf://spaces/Pitt-iRiS-Lab/MedIRT/src/display/css_html_js.py
-
curl -L -o css_html_js.py https://huggingface.co/spaces/Pitt-iRiS-Lab/MedIRT/resolve/main/src/display/css_html_js.py
4.37 kB
| """ | |
| Medical Leaderboard CSS Styles | |
| """ | |
| custom_css = """ | |
| .markdown-text { | |
| font-size: 16px !important; | |
| } | |
| .tab-buttons button { | |
| font-size: 20px; | |
| } | |
| /* **************************** | |
| MEDICAL THEME LEADERBOARD | |
| **************************** */ | |
| .pretty-leaderboard-table { | |
| width: 100%; | |
| border-collapse: separate; | |
| border-spacing: 0; | |
| background: rgba(240, 248, 255, 0.98); | |
| box-shadow: 0 4px 24px 0 rgba(0, 150, 136, 0.15), 0 1.5px 6px 0 rgba(76, 175, 80, 0.08); | |
| margin-bottom: 24px; | |
| border: 1px solid #e1f5fe; | |
| } | |
| .pretty-leaderboard-table thead { | |
| border-radius: 16px 16px 0 0; | |
| overflow: hidden; | |
| background: linear-gradient(135deg, #00695c 0%, #004d40 100%); | |
| } | |
| /* **************************** | |
| STICKY COLUMNS | |
| **************************** */ | |
| .pretty-leaderboard-table th:nth-child(1) { | |
| position: sticky; | |
| left: 0; | |
| top: 0; | |
| z-index: 5; | |
| background: linear-gradient(135deg, #00695c 0%, #004d40 100%); | |
| min-width: 60px; | |
| max-width: 60px; | |
| width: 60px; | |
| } | |
| .pretty-leaderboard-table th:nth-child(2) { | |
| position: sticky; | |
| left: 60px; | |
| top: 0; | |
| z-index: 5; | |
| background: linear-gradient(135deg, #00695c 0%, #004d40 100%); | |
| min-width: 220px; | |
| max-width: 400px; | |
| width: 220px; | |
| } | |
| .pretty-leaderboard-table td:nth-child(1) { | |
| position: sticky; | |
| left: 0; | |
| z-index: 4; | |
| background: var(--row-bg) !important; | |
| min-width: 60px; | |
| max-width: 60px; | |
| width: 60px; | |
| } | |
| .pretty-leaderboard-table td:nth-child(2) { | |
| position: sticky; | |
| left: 60px; | |
| z-index: 4; | |
| background: var(--row-bg) !important; | |
| min-width: 220px; | |
| max-width: 400px; | |
| width: 220px; | |
| } | |
| .pretty-leaderboard-table tr { | |
| --row-bg: #ffffff; | |
| } | |
| .pretty-leaderboard-table tr:nth-child(even) { | |
| --row-bg: #f8fbff; | |
| } | |
| .pretty-leaderboard-table tr:hover { | |
| --row-bg: #e8f5e8; | |
| } | |
| .pretty-leaderboard-table th, .pretty-leaderboard-table td { | |
| padding: 12px 16px; | |
| text-align: left; | |
| border-bottom: 1px solid #23244a; | |
| font-size: 16px; | |
| } | |
| .pretty-leaderboard-table .score-stars-cell { | |
| min-width: 160px; | |
| width: 160px; | |
| } | |
| .pretty-leaderboard-table th { | |
| background: linear-gradient(135deg, #00695c 0%, #004d40 100%); | |
| color: #ffffff; | |
| font-weight: 800; | |
| letter-spacing: 0.5px; | |
| border-bottom: 2px solid #4caf50; | |
| text-shadow: 0 1px 4px rgba(0,0,0,0.3); | |
| transition: background 0.2s, color 0.2s; | |
| position: sticky; | |
| top: 0; | |
| z-index: 2; | |
| border-radius: 0 !important; | |
| } | |
| .pretty-leaderboard-table th:hover, .pretty-leaderboard-table th:focus { | |
| background: linear-gradient(135deg, #00796b 0%, #00695c 100%); | |
| color: #fff; | |
| } | |
| .pretty-leaderboard-table td { | |
| color: #37474f; | |
| vertical-align: middle; | |
| background: var(--row-bg); | |
| } | |
| .pretty-leaderboard-table tr:last-child td { | |
| border-bottom: none; | |
| } | |
| /* **************************** | |
| SCORE VISUALIZATION (UNUSED) | |
| **************************** */ | |
| .score-bar { | |
| display: flex; | |
| align-items: center; | |
| gap: 12px; | |
| width: 100%; | |
| } | |
| .score-bar-track { | |
| flex-grow: 1; | |
| height: 10px; | |
| background: rgba(200, 230, 201, 0.4); | |
| border-radius: 5px; | |
| overflow: hidden; | |
| max-width: 220px; | |
| box-shadow: 0 1px 4px 0 rgba(76, 175, 80, 0.15); | |
| } | |
| .score-bar-fill { | |
| height: 100%; | |
| background: linear-gradient(90deg, #66bb6a 0%, #4caf50 100%); | |
| border-radius: 5px; | |
| transition: width 0.3s cubic-bezier(0.4,0,0.2,1); | |
| } | |
| .score-bar-value { | |
| font-family: 'SF Mono', monospace; | |
| font-weight: 600; | |
| color: #455a64; | |
| min-width: 60px; | |
| font-size: 14px; | |
| } | |
| .leaderboard-table-container { | |
| margin-top: 15px; | |
| background: linear-gradient(135deg, #e3e6f3 60%, #f5f6fa 100%); | |
| background-image: | |
| radial-gradient(rgba(255,255,255,0.15) 1.2px, transparent 1.2px), | |
| radial-gradient(rgba(255,255,255,0.10) 1px, transparent 1px); | |
| background-size: 40px 40px, 80px 80px; | |
| background-position: 0 0, 20px 20px; | |
| } | |
| #citation-button span { | |
| font-size: 16px !important; | |
| } | |
| #citation-button textarea { | |
| font-size: 16px !important; | |
| } | |
| #citation-button > label > button { | |
| margin: 6px; | |
| transform: scale(1.3); | |
| } | |
| """ | |
| get_window_url_params = """ | |
| function(url_params) { | |
| const params = new URLSearchParams(window.location.search); | |
| url_params = Object.fromEntries(params); | |
| return url_params; | |
| } | |
| """ | |