Skip to content

Commit

Permalink
Merge pull request #19 from privacybydesign/improve-style
Browse files Browse the repository at this point in the history
Frontend improvements
  • Loading branch information
saravahdatipour authored Jan 13, 2025
2 parents c0e8072 + 9d89c9c commit f77a6d8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
21 changes: 15 additions & 6 deletions generate-index.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,15 @@ def readIssuer(path):
}
issuer['identifier'] = '%s.%s' % (issuer['schememgr'], issuer['id'])

for fn in sorted(os.listdir(path + '/Issues')):
issuer['credentials'][fn] = readCredential(path + '/Issues/' + fn)
for filename in sorted(os.listdir(path + '/Issues')):
issuer['credentials'][filename] = readCredential(path + '/Issues/' + filename)

return issuer

def get_issuer_name(issuer_tuple):
filename, issuer = issuer_tuple
return issuer['name']['en']

def readSchemeManager(path):
schememgr = {}

Expand Down Expand Up @@ -139,11 +143,16 @@ def readSchemeManager(path):
keyshareAttributeElements = xml.getElementsByTagName('KeyshareAttribute')
if keyshareAttributeElements:
schememgr['keyshareAttribute'] = getText(keyshareAttributeElements[0])

for fn in sorted(os.listdir(path)):
issuerPath = path + '/' + fn
issuer_list = []
for filename in sorted(os.listdir(path)):
issuerPath = path + '/' + filename
if os.path.exists(issuerPath + '/description.xml'):
schememgr['issuers'][fn] = readIssuer(issuerPath)
issuer= readIssuer(issuerPath)
issuer_list.append((filename, issuer))
sorted_issuers=sorted(issuer_list, key=get_issuer_name)

for filename, issuer in sorted_issuers:
schememgr['issuers'][filename]= issuer

return schememgr

Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ h1,h2,h3 {
}

a {
color: #360c1d;
color: #3869d1;
text-decoration: none;
}

Expand Down
2 changes: 1 addition & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<!-- Issuers Section -->
<div class="nav-text small text-muted fw-bold ps-3 mt-2">Issuers</div>
<ul class="nav flex-column">
{% for issuerId, issuer in schememgr.issuers|dictsort %}
{% for issuerId, issuer in schememgr.issuers.items() %}
<li class="nav-item">
<div class="d-flex align-items-center">
<!-- Issuer navigation link -->
Expand Down

0 comments on commit f77a6d8

Please sign in to comment.