Merge pull request 'Add h-card markup to profile pages' (#130) from caesar/keyoxide-web:microformats into main

Reviewed-on: https://codeberg.org/keyoxide/keyoxide-web/pulls/130
This commit is contained in:
Yarmo Mackenbach 2022-04-14 14:32:44 +02:00
commit 1755ee21d2
3 changed files with 8 additions and 8 deletions

View file

@ -62,7 +62,7 @@ export class Key extends HTMLElement {
const subsection_links_text = subsection_links.appendChild(document.createElement('div')); const subsection_links_text = subsection_links.appendChild(document.createElement('div'));
const profile_link = subsection_links_text.appendChild(document.createElement('p')); const profile_link = subsection_links_text.appendChild(document.createElement('p'));
profile_link.innerHTML = `Key link: <a href="${data.key.uri}" aria-label="Link to cryptographic key">${data.key.uri}</a>`; profile_link.innerHTML = `Key link: <a class="u-key" rel="pgpkey" href="${data.key.uri}" aria-label="Link to cryptographic key">${data.key.uri}</a>`;
elContent.appendChild(document.createElement('hr')); elContent.appendChild(document.createElement('hr'));

View file

@ -22,7 +22,7 @@ block content
p Profile link: not accessible from browser p Profile link: not accessible from browser
if (demoData.matches[0].proof.uri) if (demoData.matches[0].proof.uri)
p Proof link: p Proof link:
a(rel='me' href=demoData.matches[0].proof.uri)= demoData.matches[0].proof.uri a(href=demoData.matches[0].proof.uri)= demoData.matches[0].proof.uri
else else
p Proof link: not accessible from browser p Proof link: not accessible from browser

View file

@ -2,7 +2,7 @@ extends templates/base.pug
mixin generateUser(user, isPrimary) mixin generateUser(user, isPrimary)
h2 h2
| #{user.userData.email} span.p-email #{user.userData.email}
if isPrimary if isPrimary
small.primary primary small.primary primary
each claim in user.claims each claim in user.claims
@ -27,7 +27,7 @@ mixin generateUser(user, isPrimary)
p Profile link: not accessible from browser p Profile link: not accessible from browser
if (claim.matches[0].proof.uri) if (claim.matches[0].proof.uri)
p Proof link: p Proof link:
a(rel='me' href=claim.matches[0].proof.uri aria-label="Link to proof")= claim.matches[0].proof.uri a(href=claim.matches[0].proof.uri aria-label="Link to proof")= claim.matches[0].proof.uri
else else
p Proof link: not accessible from browser p Proof link: not accessible from browser
@ -40,7 +40,7 @@ block content
} }
} }
section.profile.narrow section.profile.narrow.h-card
noscript noscript
p Keyoxide requires JavaScript to function. p Keyoxide requires JavaScript to function.
@ -95,9 +95,9 @@ block content
else else
unless (isSignature && !signature) unless (isSignature && !signature)
#profileHeader.card.card--transparent.card--profileHeader #profileHeader.card.card--transparent.card--profileHeader
img#profileAvatar(src=data.extra.avatarURL alt="avatar") img#profileAvatar.u-logo(src=data.extra.avatarURL alt="avatar")
p#profileName= data.keyData.users[data.keyData.primaryUserIndex].userData.name p#profileName.p-name= data.keyData.users[data.keyData.primaryUserIndex].userData.name
.button-wrapper .button-wrapper
button(onClick="document.querySelector('#dialog--encryptMessage').showModal();") Encrypt message button(onClick="document.querySelector('#dialog--encryptMessage').showModal();") Encrypt message
button(onClick="document.querySelector('#dialog--verifySignature').showModal();") Verify signature button(onClick="document.querySelector('#dialog--verifySignature').showModal();") Verify signature
@ -115,7 +115,7 @@ block content
img(src='/static/img/link.png') img(src='/static/img/link.png')
div div
p Key link: p Key link:
a(href=data.keyData.key.uri aria-label="Link to cryptographic key")= data.keyData.key.uri a.u-key(href=data.keyData.key.uri rel="pgpkey" aria-label="Link to cryptographic key")= data.keyData.key.uri
hr hr
.subsection .subsection
img(src='/static/img/qrcode.png') img(src='/static/img/qrcode.png')