mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44: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
|
||||
if (leaderboardTitle) {
|
||||
if (currentMode === 'view' && selectedRows.size > 0) {
|
||||
leaderboardTitle.textContent = filteredTitle;
|
||||
// Check if a custom title is provided globally
|
||||
if (typeof LEADERBOARD_CUSTOM_TITLE !== 'undefined' && LEADERBOARD_CUSTOM_TITLE) {
|
||||
leaderboardTitle.textContent = LEADERBOARD_CUSTOM_TITLE;
|
||||
} 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>
|
||||
|
||||
<script>
|
||||
const LEADERBOARD_CUSTOM_TITLE = "Aider polyglot coding benchmark results (selected)";
|
||||
{% include leaderboard_table.js %}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue