CoolFace
Apppublic

CompileError/WebCoderBench

sourceHugging Faceapache-2.0updated 5mo agoView on Hugging Face
0likes
css_html_js.py275 linesDownload Raw Back to display
1custom_css = """2 3#space-title {4    font-size: clamp(26px, 3.2vw, 40px) !important;5    line-height: 1.1;6    margin: 10px 0 6px 0 !important;7    padding: 0 !important;8}9 10.markdown-text {11    font-size: 16px !important;12}13 14#models-to-add-text {15    font-size: 18px !important;16}17 18#citation-button span {19    font-size: 16px !important;20}21 22#citation-button textarea {23    font-size: 16px !important;24}25 26#citation-button > label > button {27    margin: 6px;28    transform: scale(1.3);29}30 31#leaderboard-table {32    margin-top: 15px33}34 35#leaderboard-table-lite {36    margin-top: 15px37}38 39#search-bar-table-box > div:first-child {40    background: none;41    border: none;42}43 44#search-bar {45    padding: 0px;46}47 48/* Limit the width of the first AutoEvalColumn so that names don't expand too much */49#leaderboard-table td:nth-child(2),50#leaderboard-table th:nth-child(2) {51    max-width: 400px;52    overflow: auto;53    white-space: nowrap;54}55 56.tab-buttons button {57    font-size: 20px;58}59 60#scale-logo {61    border-style: none !important;62    box-shadow: none;63    display: block;64    margin-left: auto;65    margin-right: auto;66    max-width: 600px;67}68 69#scale-logo .download {70    display: none;71}72#filter_type{73    border: 0;74    padding-left: 0;75    padding-top: 0;76}77#filter_type label {78    display: flex;79}80#filter_type label > span{81    margin-top: var(--spacing-lg);82    margin-right: 0.5em;83}84#filter_type label > .wrap{85    width: 103px;86}87#filter_type label > .wrap .wrap-inner{  88    padding: 2px;89}90#filter_type label > .wrap .wrap-inner input{91    width: 1px92}93#filter-columns-type{94    border:0;95    padding:0.5;96}97#filter-columns-size{98    border:0;99    padding:0.5;100}101#box-filter > .form{102    border: 0103}104 105#raw-score-table {106    overflow-x: auto !important;107    max-width: 100%;108    min-width: 0;109}110 111#raw-score-table,112#unweighted-z-table,113#weighted-z-table {114    overflow-x: auto !important;115    max-width: 100%;116    min-width: 0;117}118 119#result-tab {120    min-height: 78vh;121}122 123#raw-score-table th,124#unweighted-z-table th,125#weighted-z-table th {126    white-space: pre-line;127}128 129#raw-score-table td,130#unweighted-z-table td,131#weighted-z-table td {132    white-space: nowrap;133}134 135.score-table-scroll {136    overflow: auto;137    max-width: 100%;138}139 140.score-table {141    border-collapse: collapse;142    display: inline-table;143    width: max-content;144    table-layout: fixed;145}146 147.score-table th,148.score-table td {149    border: 1px solid rgba(0,0,0,0.08);150    padding: 8px 10px;151    vertical-align: middle;152    box-sizing: border-box;153}154 155.score-cell {156    display: block;157    margin: 0;158}159 160.score-table thead th {161    font-weight: 600;162    background: rgba(0,0,0,0.02);163    text-align: center;164}165 166.score-table tbody td:nth-child(n+3) {167    text-align: center;168}169 170.score-table thead .score-cell {171    white-space: normal;172    overflow-wrap: break-word;173    word-break: normal;174}175 176#weights-table {177    overflow-x: auto !important;178    max-width: 100%;179}180 181#weights-table .weights-scroll {182    overflow-x: auto;183    max-width: 100%;184}185 186#weights-table table {187    border-collapse: collapse;188    width: max-content;189}190 191#weights-table th,192#weights-table td {193    border: 1px solid rgba(0,0,0,0.08);194    padding: 10px 12px;195    vertical-align: middle;196    white-space: nowrap;197}198 199#weights-table th {200    font-weight: 600;201    background: rgba(0,0,0,0.02);202}203"""204 205custom_js = """206<script>207(function () {208    const tableIds = ["raw-score-table", "unweighted-z-table", "weighted-z-table"];209 210    const nudgeScroll = (el) => {211        const scroller =212            el.querySelector(".table-wrap") ||213            el.querySelector(".wrap") ||214            el.querySelector(".wrap-inner") ||215            el;216 217        const x = scroller.scrollLeft || 0;218        scroller.scrollLeft = x + 1;219        scroller.scrollLeft = x;220        scroller.dispatchEvent(new Event("scroll", { bubbles: true }));221    };222 223    const forceRelayout = () => {224        window.dispatchEvent(new Event("resize"));225        for (const id of tableIds) {226            const el = document.getElementById(id);227            if (!el) continue;228            nudgeScroll(el);229        }230    };231 232    const schedule = () => {233        forceRelayout();234        setTimeout(forceRelayout, 50);235        setTimeout(forceRelayout, 200);236        setTimeout(forceRelayout, 800);237    };238 239    const observer = new MutationObserver(() => {240        schedule();241    });242    observer.observe(document.documentElement, {243        subtree: true,244        childList: true,245        attributes: true,246        attributeFilter: ["style", "class", "aria-selected"],247    });248 249    document.addEventListener(250        "click",251        (e) => {252            const target = e.target;253            if (!(target instanceof Element)) return;254            if (target.closest("button, [role='tab'], .tab-buttons")) {255                setTimeout(schedule, 0);256            }257        },258        true259    );260 261    window.addEventListener("resize", () => setTimeout(forceRelayout, 0));262    window.addEventListener("load", () => setTimeout(schedule, 0));263    schedule();264})();265</script>266"""267 268get_window_url_params = """269    function(url_params) {270        const params = new URLSearchParams(window.location.search);271        url_params = Object.fromEntries(params);272        return url_params;273    }274    """275