Skip to content

Commit 76f597b

Browse files
committed
feat(verification): improve credential, QR, and blockchain validation flows
1 parent 1e5fa45 commit 76f597b

8 files changed

Lines changed: 82 additions & 217 deletions

File tree

templates/activation_result.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ <h2 class="mb-0">{% if success %}Security Audit Successful{% else %}Security Ale
2929
{% endif %}
3030

3131
<hr class="my-4">
32-
<a href="{{ url_for('index') }}" class="btn btn-primary btn-lg px-5">Back to Home</a>
32+
<a href="{{ url_for('api.index') }}" class="btn btn-primary btn-lg px-5">Back to Home</a>
3333
</div>
3434
</div>
3535
</div>

templates/base.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@
337337
<!-- Navigation -->
338338
<nav class="navbar navbar-expand-lg navbar-dark">
339339
<div class="container">
340-
<a class="navbar-brand" href="{{ url_for('index') }}" id="navbarLogo" onclick="clickLogo()"
340+
<a class="navbar-brand" href="{{ url_for('api.index') }}" id="navbarLogo" onclick="clickLogo()"
341341
title="Easter Egg: Click me 5 times!">
342342
<i class="fas fa-cube me-2"></i>
343343
CREDIFY 2026
@@ -351,7 +351,7 @@
351351
<ul class="navbar-nav me-auto">
352352
{% if session.get('role') == 'issuer' %}
353353
<li class="nav-item">
354-
<a class="nav-link active" href="{{ url_for('issuer') }}">
354+
<a class="nav-link active" href="{{ url_for('issuer.issuer') }}">
355355
<i class="fas fa-university me-1"></i>Issuer
356356
</a>
357357
</li>
@@ -378,7 +378,7 @@
378378
</li>
379379
{% elif session.get('role') == 'student' %}
380380
<li class="nav-item">
381-
<a class="nav-link active" href="{{ url_for('holder') }}">
381+
<a class="nav-link active" href="{{ url_for('holder.holder') }}">
382382
<i class="fas fa-user-graduate me-1"></i>Student
383383
</a>
384384
</li>
@@ -405,7 +405,7 @@
405405
</li>
406406
{% elif session.get('role') == 'verifier' %}
407407
<li class="nav-item">
408-
<a class="nav-link active" href="{{ url_for('verifier') }}">
408+
<a class="nav-link active" href="{{ url_for('verifier.verifier') }}">
409409
<i class="fas fa-shield-alt me-1"></i>Verifier
410410
</a>
411411
</li>
@@ -432,31 +432,31 @@
432432
</li>
433433
{% else %}
434434
<li class="nav-item">
435-
<a class="nav-link {{ 'active' if request.endpoint == 'index' }}" href="{{ url_for('index') }}">
435+
<a class="nav-link {{ 'active' if request.endpoint == 'index' }}" href="{{ url_for('api.index') }}">
436436
<i class="fas fa-home me-1"></i>Home
437437
</a>
438438
</li>
439439
<li class="nav-item">
440440
<a class="nav-link {{ 'active' if request.endpoint == 'issuer' }}"
441-
href="{{ url_for('issuer') }}">
441+
href="{{ url_for('issuer.issuer') }}">
442442
<i class="fas fa-university me-1"></i>Issuer
443443
</a>
444444
</li>
445445
<li class="nav-item">
446446
<a class="nav-link {{ 'active' if request.endpoint == 'holder' }}"
447-
href="{{ url_for('holder') }}">
447+
href="{{ url_for('holder.holder') }}">
448448
<i class="fas fa-user-graduate me-1"></i>Student
449449
</a>
450450
</li>
451451
<li class="nav-item">
452452
<a class="nav-link {{ 'active' if request.endpoint == 'verifier' }}"
453-
href="{{ url_for('verifier') }}">
453+
href="{{ url_for('verifier.verifier') }}">
454454
<i class="fas fa-shield-alt me-1"></i>Verifier
455455
</a>
456456
</li>
457457
<li class="nav-item">
458458
<a class="nav-link {{ 'active' if request.endpoint == 'tutorial' }}"
459-
href="{{ url_for('tutorial') }}">
459+
href="{{ url_for('api.tutorial') }}">
460460
<i class="fas fa-book me-1"></i>Tutorial
461461
</a>
462462
</li>
@@ -481,7 +481,7 @@
481481
style="font-size: 0.65rem; font-weight: 600; color: {{ 'var(--red-500)' if session.get('role') == 'issuer' else 'var(--green-500)' if session.get('role') == 'student' else 'var(--amber-400)' }}; text-transform: uppercase; letter-spacing: 0.5px;">
482482
{{ session.get('role') }} Access</div>
483483
</div>
484-
<a class="btn btn-sm px-3 py-1" href="{{ url_for('logout') }}"
484+
<a class="btn btn-sm px-3 py-1" href="{{ url_for('auth.logout') }}"
485485
style="background: rgba(239, 68, 68, 0.15); border: 1.5px solid var(--red-500); color: var(--red-500); font-weight: 700; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; transition: all 0.3s ease;"
486486
onmouseover="this.style.background='var(--red-500)'; this.style.color='white';"
487487
onmouseout="this.style.background='rgba(239, 68, 68, 0.15)'; this.style.color='var(--red-500)';">

templates/certificate_view.html

Lines changed: 45 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
body {
3838
margin: 0;
39-
background: #edf2f7;
39+
background: radial-gradient(circle at 10% 10%, #f7fbff 0%, #e8edf3 58%, #d9e0e9 100%);
4040
font-family: 'Crimson Pro', serif;
4141
}
4242

@@ -53,8 +53,8 @@
5353
linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 252, 245, 0.98)),
5454
var(--cert-paper);
5555
border: 1px solid #d7dce3;
56-
box-shadow: 0 28px 70px rgba(15, 23, 42, 0.12);
57-
padding: 56px 60px 44px;
56+
box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
57+
padding: 46px 50px 38px;
5858
}
5959

6060
.certificate::before,
@@ -65,13 +65,13 @@
6565
}
6666

6767
.certificate::before {
68-
inset: 16px;
69-
border: 6px solid var(--cert-gold);
68+
inset: 14px;
69+
border: 3px solid var(--cert-gold);
7070
}
7171

7272
.certificate::after {
73-
inset: 32px;
74-
border: 2px solid var(--cert-gold);
73+
inset: 24px;
74+
border: 1px solid rgba(200, 160, 56, 0.45);
7575
}
7676

7777
.certificate-shell {
@@ -88,11 +88,11 @@
8888
align-items: center;
8989
justify-content: center;
9090
font-family: 'Manrope', sans-serif;
91-
font-size: clamp(90px, 12vw, 170px);
91+
font-size: clamp(84px, 11vw, 146px);
9292
font-weight: 800;
9393
letter-spacing: 0.12em;
94-
color: rgba(200, 160, 56, 0.04);
95-
transform: rotate(-29deg);
94+
color: rgba(200, 160, 56, 0.035);
95+
transform: rotate(-24deg);
9696
user-select: none;
9797
pointer-events: none;
9898
z-index: 0;
@@ -128,7 +128,7 @@
128128

129129
.cert-header h2 {
130130
margin: 10px 0 8px;
131-
font-size: clamp(28px, 3.8vw, 40px);
131+
font-size: clamp(26px, 3.4vw, 35px);
132132
line-height: 1.02;
133133
letter-spacing: -0.03em;
134134
color: var(--cert-ink);
@@ -158,7 +158,7 @@
158158
.student-name {
159159
margin: 0;
160160
font-family: 'Manrope', sans-serif;
161-
font-size: clamp(34px, 5vw, 56px);
161+
font-size: clamp(30px, 4.4vw, 46px);
162162
line-height: 0.95;
163163
letter-spacing: -0.04em;
164164
color: #020617;
@@ -170,7 +170,7 @@
170170
display: inline-flex;
171171
align-items: center;
172172
gap: 8px;
173-
padding: 10px 18px;
173+
padding: 8px 16px;
174174
border-radius: 999px;
175175
background: rgba(15, 138, 95, 0.1);
176176
border: 1px solid rgba(15, 138, 95, 0.16);
@@ -193,9 +193,9 @@
193193
.portal-panel {
194194
background: rgba(255, 255, 255, 0.88);
195195
border: 1px solid var(--cert-border);
196-
border-radius: 22px;
197-
padding: 18px 20px;
198-
box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
196+
border-radius: 16px;
197+
padding: 16px 18px;
198+
box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
199199
}
200200

201201
.section-heading {
@@ -248,7 +248,7 @@
248248

249249
.proof-panel {
250250
display: grid;
251-
grid-template-columns: minmax(0, 1.4fr) 220px;
251+
grid-template-columns: minmax(0, 1.45fr) 190px;
252252
gap: 18px;
253253
align-items: start;
254254
}
@@ -308,27 +308,27 @@
308308

309309
#qrcode {
310310
background: #fff;
311-
padding: 10px;
312-
border-radius: 20px;
311+
padding: 8px;
312+
border-radius: 14px;
313313
border: 1px solid #e2e8f0;
314-
box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
314+
box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
315315
}
316316

317317
#certQrCanvas {
318318
display: block;
319319
}
320320

321321
.proof-badge {
322-
width: 88px;
323-
height: 88px;
322+
width: 76px;
323+
height: 76px;
324324
border-radius: 50%;
325325
display: grid;
326326
place-items: center;
327327
text-align: center;
328328
background: radial-gradient(circle at 30% 30%, #fff6d3, #d1a62b 70%);
329329
color: #7c5800;
330330
font-family: 'Manrope', sans-serif;
331-
font-size: 10px;
331+
font-size: 9px;
332332
font-weight: 800;
333333
letter-spacing: 0.08em;
334334
text-transform: uppercase;
@@ -383,6 +383,11 @@
383383
word-break: break-all;
384384
}
385385

386+
.portal-url.muted {
387+
opacity: 0.85;
388+
font-size: 11px;
389+
}
390+
386391
.portal-copy {
387392
margin: 8px 0 0;
388393
color: var(--cert-muted);
@@ -398,8 +403,9 @@
398403
}
399404

400405
.portal-actions .btn {
401-
border-radius: 999px;
402-
padding: 10px 16px;
406+
border-radius: 10px;
407+
padding: 8px 14px;
408+
font-size: 12px;
403409
}
404410

405411
.final-note {
@@ -416,6 +422,12 @@
416422
z-index: 1;
417423
}
418424

425+
.btn-group-container .btn {
426+
border-radius: 12px;
427+
padding: 12px 24px;
428+
font-weight: 700;
429+
}
430+
419431
@media (max-width: 1100px) {
420432
.certificate {
421433
padding: 48px 42px 38px;
@@ -616,7 +628,7 @@ <h5 class="authority-title">Credify Network Validator</h5>
616628
<section class="portal-panel">
617629
<div>
618630
<h4 class="portal-title">Verification Portal</h4>
619-
<div class="portal-url">https://udaycodespace.github.io/credify-verify/</div>
631+
<div id="portalUrlDisplay" class="portal-url muted">Generating secure verification link...</div>
620632
<p class="portal-copy">
621633
Scan the QR or enter the Credential ID to verify authenticity.
622634
</p>
@@ -637,9 +649,9 @@ <h4 class="portal-title">Verification Portal</h4>
637649
</div>
638650
</div>
639651

640-
<div class="btn-group-container mt-5 text-center">
652+
<div class="btn-group-container mt-4 text-center">
641653
<a href="{{ pdf_download_url }}"
642-
class="btn btn-primary btn-lg px-5 shadow rounded-pill">
654+
class="btn btn-primary btn-lg px-5 shadow">
643655
<i class="fas fa-file-download me-2"></i>Download Official Certificate (PDF)
644656
</a>
645657
</div>
@@ -652,6 +664,11 @@ <h4 class="portal-title">Verification Portal</h4>
652664
document.addEventListener('DOMContentLoaded', function () {
653665
certVerifyURL = `{{ verify_url|safe }}`;
654666
document.getElementById('certVerifyUrl').value = certVerifyURL;
667+
const portalUrlDisplay = document.getElementById('portalUrlDisplay');
668+
if (portalUrlDisplay) {
669+
portalUrlDisplay.textContent = certVerifyURL;
670+
portalUrlDisplay.classList.remove('muted');
671+
}
655672

656673
QRCode.toCanvas(document.createElement('canvas'), certVerifyURL, {
657674
width: 180,

0 commit comments

Comments
 (0)