Skip to content

Commit 51976bb

Browse files
committed
fix site
1 parent dee61e1 commit 51976bb

File tree

3 files changed

+15
-32
lines changed

3 files changed

+15
-32
lines changed

site/assets/style.css

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
--color-gray-7: #343437;
1313
--color-gray-8: #232325;
1414
--color-gray-9: #111112;
15-
--color-gray-10: var(--color-gray-9);
15+
--color-gray-10: #111112;
1616
--color-blue-4: #4BB7FF;
1717
--color-purple-4: #9A52FF;
1818
--color-green-4: #5BEB9D;
@@ -195,25 +195,25 @@ main { min-height: calc(100vh - 200px); padding: 48px 0; }
195195
.status-badge { min-width: 70px; padding: 6px 12px; font-size: 12px; }
196196
.xls-status-badge { padding: 8px 16px; font-size: 14px; }
197197

198-
.status-badge.released, .xls-status-badge.released {
198+
.status-badge.final, .xls-status-badge.final {
199199
border: 1px solid var(--color-green-4);
200200
background-color: var(--color-green-10);
201201
color: var(--color-green-4);
202202
}
203203

204-
.status-badge.candidate, .xls-status-badge.candidate {
205-
border: 1px solid #FAFF19;
206-
background-color: #4B4C00;
207-
color: #FAFF19;
208-
}
209-
210204
.status-badge.draft, .xls-status-badge.draft {
211205
border: 1px solid var(--color-blue-4);
212206
background-color: #002E4C;
213207
color: var(--color-blue-4);
214208
}
215209

216-
.status-badge.other, .xls-status-badge.other {
210+
.status-badge.stagnant, .xls-status-badge.stagnant {
211+
border: 1px solid #FAFF19;
212+
background-color: #4B4C00;
213+
color: #FAFF19;
214+
}
215+
216+
.status-badge.withdrawn, .xls-status-badge.withdrawn {
217217
border: 1px solid var(--text-color-secondary);
218218
background-color: var(--color-gray-7);
219219
color: var(--text-color-secondary);

site/build_site.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from jinja2 import Environment, FileSystemLoader
1313

1414
from xls_parser import find_xls_documents
15+
from collections import Counter
1516

1617

1718
def convert_markdown_to_html(content: str) -> str:
@@ -116,21 +117,11 @@ def build_site():
116117
print(f"Site built successfully! Generated {len(xls_docs)} XLS documents.")
117118

118119
# Count by status for reporting
119-
released_count = len([doc for doc in xls_docs if doc.status == "released"])
120-
candidates_count = len([doc for doc in xls_docs if doc.status == "candidate"])
121-
drafts_count = len([doc for doc in xls_docs if doc.status == "draft"])
122-
others_count = len(
123-
[
124-
doc
125-
for doc in xls_docs
126-
if doc.status not in ["draft", "candidate", "released"]
127-
]
128-
)
120+
# Count documents by status (case-insensitive, no hardcoding)
121+
status_counts = Counter(getattr(doc, "status", "").strip().lower() or "unknown" for doc in xls_docs)
129122

130-
print(f"- Released: {released_count}")
131-
print(f"- Candidates: {candidates_count}")
132-
print(f"- Drafts: {drafts_count}")
133-
print(f"- Others: {others_count}")
123+
for status, count in status_counts.items():
124+
print(f"- {status.capitalize()}: {count}")
134125

135126

136127
if __name__ == "__main__":

site/templates/index.html

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,7 @@ <h2>XRP Ledger Standards (XLS)</h2>
4949

5050
<!-- Status badge with conditional styling -->
5151
<td class="status-col" data-label="Status" data-sort-value="{{ doc.status|lower }}">
52-
{% if doc.status == 'released' %}
53-
<span class="status-badge released">Released</span>
54-
{% elif doc.status == 'candidate' %}
55-
<span class="status-badge candidate">Candidate</span>
56-
{% elif doc.status == 'draft' %}
57-
<span class="status-badge draft">Draft</span>
58-
{% else %}
59-
<span class="status-badge other">{{ doc.status.title() }}</span>
60-
{% endif %}
52+
<span class="status-badge {{doc.status|lower}}">{{ doc.status.title() }}</span>
6153
</td>
6254
</tr>
6355
{% endfor %}

0 commit comments

Comments
 (0)