mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 11:14:59 +00:00
feat: Make leaderboard title configurable and set custom title in post
This commit is contained in:
parent
d32d0b7909
commit
35fe1df499
2 changed files with 9 additions and 3 deletions
|
@ -188,10 +188,15 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
|
||||||
// Update the leaderboard title based on mode and selection
|
// Update the leaderboard title based on mode and selection
|
||||||
if (leaderboardTitle) {
|
if (leaderboardTitle) {
|
||||||
if (currentMode === 'view' && selectedRows.size > 0) {
|
// Check if a custom title is provided globally
|
||||||
leaderboardTitle.textContent = filteredTitle;
|
if (typeof LEADERBOARD_CUSTOM_TITLE !== 'undefined' && LEADERBOARD_CUSTOM_TITLE) {
|
||||||
|
leaderboardTitle.textContent = LEADERBOARD_CUSTOM_TITLE;
|
||||||
} else {
|
} else {
|
||||||
leaderboardTitle.textContent = defaultTitle;
|
if (currentMode === 'view' && selectedRows.size > 0) {
|
||||||
|
leaderboardTitle.textContent = filteredTitle;
|
||||||
|
} else {
|
||||||
|
leaderboardTitle.textContent = defaultTitle;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -252,5 +252,6 @@ You can add some introductory text for your blog post here.
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
const LEADERBOARD_CUSTOM_TITLE = "Aider polyglot coding benchmark results (selected)";
|
||||||
{% include leaderboard_table.js %}
|
{% include leaderboard_table.js %}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue