Skip to content

Commit

Permalink
Add dynamic table display for claims
Browse files Browse the repository at this point in the history
  • Loading branch information
gkatrakazas committed Jun 20, 2024
1 parent 07f4070 commit 7810abc
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ th {
}

textarea.wide{
width: 40% !important;
width: 60% !important;
}

#json-textarea {
Expand All @@ -614,7 +614,6 @@ textarea.wide{
color: black;
overflow: auto;
resize: vertical;
width: 500px;
min-height: 200px;
}

Expand Down Expand Up @@ -718,3 +717,63 @@ textarea.wide{
.checkbox input[type="checkbox"]:checked + label:after {
display: block;
}

/* CSS for the claims tables */

/* CSS for the claims tables */
.claims-tables {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}

.claims-tables h4 {
margin: 10px 0;
color: #333;
}

.table-container {
width: 60%;
margin-bottom: 20px;
overflow-x: auto; /* Enable horizontal scrolling */
}

.table-container table {
width: 100%;
border-collapse: collapse;
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {

.table-container{
width: -webkit-fill-available!important;
margin-left: 1%;
margin-right: 1%;
}
}

.table-container table thead tr {
background-color: #f2f2f2;
}

.table-container table th,
.table-container table td {
padding: 10px;
text-align: left;
border: 1px solid #ddd;
font-size: 14px;
}

.table-container table th {
color: white;
}

.table-container table tbody tr:nth-child(even) {
background-color: #f9f9f9;
}

.table-container table tbody tr:hover {
background-color: #f1f1f1;
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,20 @@ block layout-content

h3 Requested claims extracted from credentials

// Text area to display claims
textarea#json-textarea.wide
//- Display the 'credentialPayloads' JSON object
| #{JSON.stringify(presentationClaims, null, 2)}
.claims-tables
each claimType in Object.keys(presentationClaims)
h4= claimType
.table-container(style="overflow-x: auto;")
table
thead
tr
th Name
th Value
tbody
each claim in presentationClaims[claimType]
tr
td= claim.name
td= claim.value

h3 Credentials

Expand Down

0 comments on commit 7810abc

Please sign in to comment.