Spaces:
Running
Running
Update docs.html
Browse files
docs.html
CHANGED
|
@@ -952,6 +952,110 @@
|
|
| 952 |
grid-template-columns: 1fr;
|
| 953 |
}
|
| 954 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 955 |
</style>
|
| 956 |
</head>
|
| 957 |
<body>
|
|
@@ -1108,6 +1212,31 @@
|
|
| 1108 |
</div>
|
| 1109 |
<div id="groupsContainer"></div>
|
| 1110 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1111 |
</div>
|
| 1112 |
</div>
|
| 1113 |
|
|
@@ -1365,6 +1494,79 @@
|
|
| 1365 |
// Show stats grid
|
| 1366 |
document.getElementById('statsGrid').style.display = 'grid';
|
| 1367 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1368 |
setTimeout(() => {
|
| 1369 |
document.getElementById('groupLoading').style.display = 'none';
|
| 1370 |
|
|
@@ -1588,6 +1790,52 @@
|
|
| 1588 |
loadMoreBtn.style.display = 'none';
|
| 1589 |
}
|
| 1590 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1591 |
</script>
|
| 1592 |
</body>
|
| 1593 |
</html>
|
|
|
|
| 952 |
grid-template-columns: 1fr;
|
| 953 |
}
|
| 954 |
}
|
| 955 |
+
|
| 956 |
+
.progress {
|
| 957 |
+
width: 100%;
|
| 958 |
+
height: 8px;
|
| 959 |
+
background: var(--theme-bg-primary);
|
| 960 |
+
border-radius: 4px;
|
| 961 |
+
overflow: hidden;
|
| 962 |
+
margin: 5px 0;
|
| 963 |
+
border: 1px solid var(--theme-border);
|
| 964 |
+
}
|
| 965 |
+
|
| 966 |
+
.bar {
|
| 967 |
+
height: 100%;
|
| 968 |
+
background: linear-gradient(90deg, var(--theme-primary), var(--theme-secondary));
|
| 969 |
+
border-radius: 4px;
|
| 970 |
+
transition: width 2s ease-in-out;
|
| 971 |
+
width: 0%;
|
| 972 |
+
}
|
| 973 |
+
|
| 974 |
+
.progress-text {
|
| 975 |
+
font-size: 0.75rem;
|
| 976 |
+
color: var(--theme-text-secondary);
|
| 977 |
+
text-align: center;
|
| 978 |
+
margin-top: 3px;
|
| 979 |
+
}
|
| 980 |
+
|
| 981 |
+
.global-progress-section {
|
| 982 |
+
background: linear-gradient(135deg, var(--theme-bg-secondary) 0%, var(--theme-bg-tertiary) 100%);
|
| 983 |
+
border: 2px solid var(--theme-border);
|
| 984 |
+
border-radius: 12px;
|
| 985 |
+
padding: 20px;
|
| 986 |
+
margin-bottom: 20px;
|
| 987 |
+
box-shadow: 0 4px 15px var(--theme-shadow);
|
| 988 |
+
}
|
| 989 |
+
|
| 990 |
+
.global-progress-section h3 {
|
| 991 |
+
color: var(--theme-primary);
|
| 992 |
+
margin-bottom: 15px;
|
| 993 |
+
font-size: 1.1rem;
|
| 994 |
+
border-bottom: 1px solid var(--theme-border);
|
| 995 |
+
padding-bottom: 8px;
|
| 996 |
+
}
|
| 997 |
+
|
| 998 |
+
.progress-stats {
|
| 999 |
+
display: grid;
|
| 1000 |
+
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
| 1001 |
+
gap: 15px;
|
| 1002 |
+
margin-bottom: 15px;
|
| 1003 |
+
}
|
| 1004 |
+
|
| 1005 |
+
.progress-stat {
|
| 1006 |
+
text-align: center;
|
| 1007 |
+
padding: 10px;
|
| 1008 |
+
background: var(--theme-bg-primary);
|
| 1009 |
+
border-radius: 8px;
|
| 1010 |
+
border: 1px solid var(--theme-border);
|
| 1011 |
+
}
|
| 1012 |
+
|
| 1013 |
+
.progress-stat strong {
|
| 1014 |
+
display: block;
|
| 1015 |
+
color: var(--theme-secondary);
|
| 1016 |
+
font-size: 0.8rem;
|
| 1017 |
+
margin-bottom: 5px;
|
| 1018 |
+
}
|
| 1019 |
+
|
| 1020 |
+
.progress-stat-value {
|
| 1021 |
+
font-size: 1.1rem;
|
| 1022 |
+
font-weight: 700;
|
| 1023 |
+
color: var(--theme-primary);
|
| 1024 |
+
}
|
| 1025 |
+
|
| 1026 |
+
.individual-group-progress {
|
| 1027 |
+
margin-top: 20px;
|
| 1028 |
+
}
|
| 1029 |
+
|
| 1030 |
+
.group-progress-item {
|
| 1031 |
+
background: var(--theme-bg-primary);
|
| 1032 |
+
border: 1px solid var(--theme-border);
|
| 1033 |
+
border-radius: 8px;
|
| 1034 |
+
padding: 15px;
|
| 1035 |
+
margin-bottom: 10px;
|
| 1036 |
+
}
|
| 1037 |
+
|
| 1038 |
+
.group-progress-header {
|
| 1039 |
+
display: flex;
|
| 1040 |
+
justify-content: space-between;
|
| 1041 |
+
align-items: center;
|
| 1042 |
+
margin-bottom: 10px;
|
| 1043 |
+
}
|
| 1044 |
+
|
| 1045 |
+
.group-progress-title {
|
| 1046 |
+
font-weight: 600;
|
| 1047 |
+
color: var(--theme-text-primary);
|
| 1048 |
+
font-size: 0.9rem;
|
| 1049 |
+
}
|
| 1050 |
+
|
| 1051 |
+
.group-rank-badge {
|
| 1052 |
+
padding: 3px 8px;
|
| 1053 |
+
border-radius: 12px;
|
| 1054 |
+
font-size: 0.7rem;
|
| 1055 |
+
font-weight: 600;
|
| 1056 |
+
background: var(--theme-primary);
|
| 1057 |
+
color: var(--theme-bg-primary);
|
| 1058 |
+
}
|
| 1059 |
</style>
|
| 1060 |
</head>
|
| 1061 |
<body>
|
|
|
|
| 1212 |
</div>
|
| 1213 |
<div id="groupsContainer"></div>
|
| 1214 |
</div>
|
| 1215 |
+
|
| 1216 |
+
<!-- Added global progress section -->
|
| 1217 |
+
<div class="global-progress-section" id="globalProgressSection" style="display:none;">
|
| 1218 |
+
<h3>π Global Progress</h3>
|
| 1219 |
+
<div class="progress-stats">
|
| 1220 |
+
<div class="progress-stat">
|
| 1221 |
+
<strong>Combined Level</strong>
|
| 1222 |
+
<div class="progress-stat-value" id="combinedLevel">-</div>
|
| 1223 |
+
</div>
|
| 1224 |
+
<div class="progress-stat">
|
| 1225 |
+
<strong>Next Level</strong>
|
| 1226 |
+
<div class="progress-stat-value" id="nextCombinedLevel">-</div>
|
| 1227 |
+
</div>
|
| 1228 |
+
<div class="progress-stat">
|
| 1229 |
+
<strong>Progress</strong>
|
| 1230 |
+
<div class="progress-stat-value" id="globalProgressPercent">-</div>
|
| 1231 |
+
</div>
|
| 1232 |
+
<div class="progress-stat">
|
| 1233 |
+
<strong>XP Needed</strong>
|
| 1234 |
+
<div class="progress-stat-value" id="xpNeeded">-</div>
|
| 1235 |
+
</div>
|
| 1236 |
+
</div>
|
| 1237 |
+
<div id="globalProgressBar"></div>
|
| 1238 |
+
<div class="individual-group-progress" id="individualGroupProgress"></div>
|
| 1239 |
+
</div>
|
| 1240 |
</div>
|
| 1241 |
</div>
|
| 1242 |
|
|
|
|
| 1494 |
// Show stats grid
|
| 1495 |
document.getElementById('statsGrid').style.display = 'grid';
|
| 1496 |
|
| 1497 |
+
const globalProgress = calculateGlobalProgress(infoData.groups);
|
| 1498 |
+
const combinedLevel = infoData.groups.reduce((sum, group) => sum + group.level, 0);
|
| 1499 |
+
|
| 1500 |
+
// Display global progress stats
|
| 1501 |
+
document.getElementById('combinedLevel').textContent = combinedLevel;
|
| 1502 |
+
document.getElementById('nextCombinedLevel').textContent = globalProgress.nextCombinedLevel;
|
| 1503 |
+
document.getElementById('globalProgressPercent').textContent = `${globalProgress.progressPercentage.toFixed(1)}%`;
|
| 1504 |
+
document.getElementById('xpNeeded').textContent = (globalProgress.neededProgress - globalProgress.currentProgress).toLocaleString();
|
| 1505 |
+
|
| 1506 |
+
// Create global progress bar
|
| 1507 |
+
const globalProgressBar = document.getElementById('globalProgressBar');
|
| 1508 |
+
globalProgressBar.innerHTML = `
|
| 1509 |
+
<div class="progress">
|
| 1510 |
+
<div class="bar" style="width: 0%" data-target="${globalProgress.progressPercentage.toFixed(1)}%"></div>
|
| 1511 |
+
</div>
|
| 1512 |
+
<div class="progress-text">${globalProgress.currentProgress.toLocaleString()} / ${globalProgress.neededProgress.toLocaleString()} XP to next combined level</div>
|
| 1513 |
+
`;
|
| 1514 |
+
|
| 1515 |
+
const individualProgress = document.getElementById('individualGroupProgress');
|
| 1516 |
+
const uniqueGroups = {};
|
| 1517 |
+
|
| 1518 |
+
// Group by groupId and calculate progress for each
|
| 1519 |
+
for (const group of infoData.groups) {
|
| 1520 |
+
const groupId = group.groupId || group.id || 'unknown';
|
| 1521 |
+
|
| 1522 |
+
if (!uniqueGroups[groupId]) {
|
| 1523 |
+
uniqueGroups[groupId] = {
|
| 1524 |
+
groupId: groupId,
|
| 1525 |
+
level: group.level,
|
| 1526 |
+
xp: group.xp,
|
| 1527 |
+
totalLevel: group.level,
|
| 1528 |
+
totalXP: group.xp
|
| 1529 |
+
};
|
| 1530 |
+
} else {
|
| 1531 |
+
uniqueGroups[groupId].totalLevel += group.level;
|
| 1532 |
+
uniqueGroups[groupId].totalXP += group.xp;
|
| 1533 |
+
}
|
| 1534 |
+
}
|
| 1535 |
+
|
| 1536 |
+
let groupProgressHTML = '<h4 style="color: var(--theme-secondary); margin-bottom: 15px;">π Individual Group Progress</h4>';
|
| 1537 |
+
|
| 1538 |
+
for (const groupId in uniqueGroups) {
|
| 1539 |
+
const group = uniqueGroups[groupId];
|
| 1540 |
+
const groupRank = getGroupRank(group.totalLevel);
|
| 1541 |
+
const progressBar = createProgressBar(group.totalXP, group.totalLevel);
|
| 1542 |
+
|
| 1543 |
+
groupProgressHTML += `
|
| 1544 |
+
<div class="group-progress-item">
|
| 1545 |
+
<div class="group-progress-header">
|
| 1546 |
+
<span class="group-progress-title">Group ${groupId}</span>
|
| 1547 |
+
<span class="group-rank-badge">${groupRank.emoji} ${groupRank.rank}</span>
|
| 1548 |
+
</div>
|
| 1549 |
+
<div style="font-size: 0.8rem; color: var(--theme-text-secondary); margin-bottom: 8px;">
|
| 1550 |
+
Level ${group.totalLevel} β’ ${group.totalXP.toLocaleString()} XP
|
| 1551 |
+
</div>
|
| 1552 |
+
${progressBar}
|
| 1553 |
+
</div>
|
| 1554 |
+
`;
|
| 1555 |
+
}
|
| 1556 |
+
|
| 1557 |
+
individualProgress.innerHTML = groupProgressHTML;
|
| 1558 |
+
|
| 1559 |
+
// Show global progress section
|
| 1560 |
+
document.getElementById('globalProgressSection').style.display = 'block';
|
| 1561 |
+
|
| 1562 |
+
setTimeout(() => {
|
| 1563 |
+
const progressBars = document.querySelectorAll('.bar[data-target]');
|
| 1564 |
+
progressBars.forEach(bar => {
|
| 1565 |
+
const target = bar.getAttribute('data-target');
|
| 1566 |
+
bar.style.width = target;
|
| 1567 |
+
});
|
| 1568 |
+
}, 500);
|
| 1569 |
+
|
| 1570 |
setTimeout(() => {
|
| 1571 |
document.getElementById('groupLoading').style.display = 'none';
|
| 1572 |
|
|
|
|
| 1790 |
loadMoreBtn.style.display = 'none';
|
| 1791 |
}
|
| 1792 |
}
|
| 1793 |
+
|
| 1794 |
+
function calculateGlobalProgress(groups) {
|
| 1795 |
+
let currentProgress = 0;
|
| 1796 |
+
let neededProgress = 0;
|
| 1797 |
+
let nextCombinedLevel = 0;
|
| 1798 |
+
|
| 1799 |
+
if (groups && groups.length > 0) {
|
| 1800 |
+
const combinedLevel = groups.reduce((sum, group) => sum + group.level, 0);
|
| 1801 |
+
nextCombinedLevel = combinedLevel + 1;
|
| 1802 |
+
|
| 1803 |
+
currentProgress = groups.reduce((sum, group) => sum + group.xp, 0);
|
| 1804 |
+
neededProgress = getXpForLevel(nextCombinedLevel);
|
| 1805 |
+
} else {
|
| 1806 |
+
nextCombinedLevel = 1;
|
| 1807 |
+
neededProgress = getXpForLevel(1);
|
| 1808 |
+
}
|
| 1809 |
+
|
| 1810 |
+
const progressPercentage = (currentProgress / neededProgress) * 100;
|
| 1811 |
+
|
| 1812 |
+
return {
|
| 1813 |
+
currentProgress: currentProgress,
|
| 1814 |
+
neededProgress: neededProgress,
|
| 1815 |
+
progressPercentage: progressPercentage,
|
| 1816 |
+
nextCombinedLevel: nextCombinedLevel
|
| 1817 |
+
};
|
| 1818 |
+
}
|
| 1819 |
+
|
| 1820 |
+
function getGroupRank(level) {
|
| 1821 |
+
if (level >= 100) return { rank: 'Legendary', emoji: 'π' };
|
| 1822 |
+
if (level >= 75) return { rank: 'Epic', emoji: 'π' };
|
| 1823 |
+
if (level >= 50) return { rank: 'Rare', emoji: 'π' };
|
| 1824 |
+
if (level >= 25) return { rank: 'Uncommon', emoji: 'πΏ' };
|
| 1825 |
+
return { rank: 'Common', emoji: 'βοΈ' };
|
| 1826 |
+
}
|
| 1827 |
+
|
| 1828 |
+
function createProgressBar(currentXP, level) {
|
| 1829 |
+
const neededXP = getXpForLevel(level + 1);
|
| 1830 |
+
const progress = (currentXP / neededXP) * 100;
|
| 1831 |
+
|
| 1832 |
+
return `
|
| 1833 |
+
<div class="progress">
|
| 1834 |
+
<div class="bar" style="width: ${progress}%"></div>
|
| 1835 |
+
</div>
|
| 1836 |
+
<div class="progress-text">${currentXP.toLocaleString()} / ${neededXP.toLocaleString()} XP to next level</div>
|
| 1837 |
+
`;
|
| 1838 |
+
}
|
| 1839 |
</script>
|
| 1840 |
</body>
|
| 1841 |
</html>
|