diff --git a/frontend/src/routes/contact/Card.svelte b/frontend/src/routes/contact/Card.svelte index 45b1332..ee412b4 100644 --- a/frontend/src/routes/contact/Card.svelte +++ b/frontend/src/routes/contact/Card.svelte @@ -11,24 +11,64 @@ let { contact } = $props(); let addresses = $derived(contact.vcard.match(/^ADR.*:.+$/gm)); + let code = $state(false); let emails = $derived(contact.vcard.match(/^EMAIL.*:.+$/gm)); let extra_fields = $derived(contact.vcard.match(/^X-.*:.+/gm)); + + function toggleCode(){ + code = !code; + } -
- {t('contact_number',{number:contact.id})} - - - - {#each addresses as code} -
- {/each} - {#each emails as code} - - {/each} - {#each extra_fields as code} - - {/each} -
-
{contact.vcard}
+
+ + {t('contact_number',{number:contact.id})} + + + + + + + + {#if code} + + {/if} + + + + + + + + + + + + + + + + + +
+ + +
{contact.vcard}
+
+ +
+ +
+ {#each addresses as code} +
+ {/each} +
+ {#each emails as code} + + {/each} +
+ {#each extra_fields as code} + + {/each} +
\ No newline at end of file diff --git a/frontend/src/routes/contact/FN.svelte b/frontend/src/routes/contact/FN.svelte index 1f91b54..4e00b97 100644 --- a/frontend/src/routes/contact/FN.svelte +++ b/frontend/src/routes/contact/FN.svelte @@ -8,5 +8,5 @@ {#if name} -{t('formatted name')}: {name} +{name} {/if} \ No newline at end of file diff --git a/frontend/src/routes/contact/Org.svelte b/frontend/src/routes/contact/Org.svelte index 0ea6ecb..54d2fe9 100644 --- a/frontend/src/routes/contact/Org.svelte +++ b/frontend/src/routes/contact/Org.svelte @@ -8,5 +8,5 @@ {#if o} -{t('organization')}: {o} +{o} {/if} \ No newline at end of file diff --git a/web/src/main/resources/web/css/default.css b/web/src/main/resources/web/css/default.css index ddab8ce..9736800 100644 --- a/web/src/main/resources/web/css/default.css +++ b/web/src/main/resources/web/css/default.css @@ -387,4 +387,32 @@ a.wikilink{ text-align: initial; padding-top: 8px; } +} + +fieldset.vcard{ + display: inline; + margin: 10px; + padding: 0; +} + +.vcard legend{ + margin-left: 10px; +} + +.vcard .name{ + font-weight: bold; +} + +.vcard .address span { + display: block; +} +.vcard table{ + border-collapse: collapse; + margin: -1px; +} +.vcard td{ + border-style: solid; + border-width: 1px; + vertical-align: top; + padding: 2px; } \ No newline at end of file