|
1 | 1 | <template>
|
2 | 2 | <Header></Header>
|
3 | 3 | <section class="main-container">
|
| 4 | + <div class="content-wrapper" style="margin-top: 1em; display: flex; justify-content: center; align-items: center;"> |
| 5 | + <button |
| 6 | + @click="switchLeaderboard('Full')" |
| 7 | + class="outline teaser swebv" |
| 8 | + style="flex-direction: row; display: flex; justify-content: center; align-items: center; width: 15em;"> |
| 9 | + <img |
| 10 | + src="../img/logo-v3.svg" |
| 11 | + style="height: 1.3em; margin-right: 0.4em; margin-bottom: 0.1em;" /> |
| 12 | + Multi-SWE-bench |
| 13 | + </button> |
| 14 | + <button |
| 15 | + @click="switchLeaderboard('Lite')" |
| 16 | + class="outline teaser swebl" |
| 17 | + style="flex-direction: row; display: flex; justify-content: center; align-items: center; width: 15em;"> |
| 18 | + <img |
| 19 | + src="../img/logo-v3.svg" |
| 20 | + style="height: 1.3em; margin-right: 0.4em; margin-bottom: 0.1em; background-color: var(--dark_accent_color);" /> |
| 21 | + Multi-SWE-bench mini |
| 22 | + </button> |
| 23 | + </div> |
4 | 24 | <div class="content-wrapper">
|
5 | 25 | <div class="content-box" v-if="leaderboard">
|
6 |
| - <h2 class="text-title">Leaderboard</h2> |
7 |
| - <ul class="tab"> |
| 26 | + <h2 class="text-title">{{LeaderboardName}}</h2> |
| 27 | + <ul class="tab" v-if="currentMode !== 'Lite'"> |
8 | 28 | <li
|
9 | 29 | v-for="{ name, data } in leaderboard"
|
10 | 30 | :key="name"
|
@@ -143,8 +163,28 @@ import Resources from './Resources.vue'
|
143 | 163 |
|
144 | 164 | // const { leaderboard, languageData, datasetResults, language, dataset, total } = useLeaderboard()
|
145 | 165 | // const { visual_leaderboard, visual_languageData, visual_datasetResults, visual_language, visual_dataset, visual_total } = useVisualLeaderboard()
|
146 |
| -const { allLeaderboards, selectedCategory, leaderboard, languageData, datasetResults, language, dataset, total} = useAllLeaderboard() |
147 |
| -const GITHUB_URL = 'https://github.com/multi-swe-bench/experiments/tree/main/evaluation' |
| 166 | +const { allLeaderboards, selectedCategory, leaderboard, languageData, datasetResults, language, dataset, total, load} = useAllLeaderboard() |
| 167 | +let GITHUB_URL = 'https://github.com/multi-swe-bench/experiments/tree/main/evaluation' |
| 168 | +let LeaderboardName = 'Leaderboard' |
| 169 | +// 模式:默认是 full |
| 170 | +const currentMode = ref<'Full' | 'Lite'>('Full') |
| 171 | +
|
| 172 | +// 数据源映射 |
| 173 | +const urls = { |
| 174 | + Full: 'https://github.com/multi-swe-bench/experiments/tree/main/evaluation', |
| 175 | + Lite: 'https://github.com/multi-swe-bench/experiments/tree/main/evaluation/lite', |
| 176 | +} |
| 177 | +const leadnames = { |
| 178 | + Full: 'Leaderboard', |
| 179 | + Lite: 'Leaderboard-mini', |
| 180 | +} |
| 181 | +async function switchLeaderboard(mode: 'Full' | 'Lite') { |
| 182 | + if (mode === currentMode.value) return |
| 183 | + currentMode.value = mode |
| 184 | + load(mode) |
| 185 | + GITHUB_URL = urls[mode] |
| 186 | + LeaderboardName = leadnames[mode] |
| 187 | +} |
148 | 188 | console.log({ allLeaderboards, selectedCategory, leaderboard, languageData, datasetResults, language, dataset, total});
|
149 | 189 | import { ref,computed, watch } from 'vue';
|
150 | 190 |
|
@@ -297,5 +337,73 @@ ul.tab li.disabled {
|
297 | 337 | font-weight: bold;
|
298 | 338 | }
|
299 | 339 |
|
| 340 | +button { |
| 341 | + cursor: pointer; |
| 342 | + outline: none; |
| 343 | +
|
| 344 | + &.outline { |
| 345 | + font-size: 16pt; |
| 346 | + height: 2em; |
| 347 | + width: 7em; |
| 348 | + position: relative; |
| 349 | + background: transparent; |
| 350 | + border: 0px; |
| 351 | + border-radius: 0.5em; |
| 352 | + padding: 0em 0em; |
| 353 | + margin: 0.2em 0.5em; |
| 354 | + transition: background-color 0.1s linear, color 0.1s linear; |
| 355 | + color: var(--accent_color); |
| 356 | + background-color: white; |
300 | 357 |
|
| 358 | + &.multimodal { |
| 359 | + color: var(--slate_gray); |
| 360 | + } |
| 361 | +
|
| 362 | + &.teaser { |
| 363 | + border: 1px solid transparent; /* Specify border style */ |
| 364 | + border-radius: 0.5em; |
| 365 | + transition: box-shadow 1s ease, border-color 1s ease; |
| 366 | + box-shadow: 0px 4px 10px rgba(0, 123, 255, 0.3); |
| 367 | + } |
| 368 | + } |
| 369 | +
|
| 370 | + &.outline:hover { |
| 371 | + color: wheat; |
| 372 | + border-color: wheat; |
| 373 | + } |
| 374 | +
|
| 375 | + &.outline.teaser.swebm { |
| 376 | + background-color: var(--slate_gray); |
| 377 | + color: white; |
| 378 | + } |
| 379 | +
|
| 380 | + &.outline.teaser.swebm:hover { |
| 381 | + color: var(--slate_gray); |
| 382 | + background: radial-gradient(circle at 10% 30%, rgba(255, 99, 71, 1), transparent 40%), |
| 383 | + radial-gradient(circle at 30% 70%, rgba(0, 255, 127, 1), transparent 40%), |
| 384 | + radial-gradient(circle at 50% 30%, rgba(70, 130, 180, 1), transparent 40%), |
| 385 | + radial-gradient(circle at 70% 70%, rgba(255, 165, 0, 1), transparent 40%), |
| 386 | + radial-gradient(circle at 80% 30%, rgba(138, 43, 226, 1), transparent 40%); |
| 387 | + transform: scale(1.05); |
| 388 | + } |
| 389 | +
|
| 390 | + &.outline.teaser.swebv { |
| 391 | + background-color: #d1a22b; |
| 392 | + color: white; |
| 393 | + } |
| 394 | +
|
| 395 | + &.outline.teaser.swebv:hover { |
| 396 | + background: linear-gradient(to right, rgb(209, 162, 43), rgb(209, 162, 43), rgb(209, 162, 43)); |
| 397 | + transform: scale(1.05); |
| 398 | + } |
| 399 | +
|
| 400 | + &.outline.teaser.swebl { |
| 401 | + background-color: var(--dark_accent_color); |
| 402 | + color: white; |
| 403 | + } |
| 404 | +
|
| 405 | + &.outline.teaser.swebl:hover { |
| 406 | + transform: scale(1.05); |
| 407 | + } |
| 408 | +} |
301 | 409 | </style>
|
0 commit comments