From fa4a1f0b0e337728d51a2117aa10fb2843164625 Mon Sep 17 00:00:00 2001 From: Calum Mackervoy Date: Wed, 4 Dec 2019 12:27:05 +0100 Subject: [PATCH 1/2] fixed first name display in userDetails --- src/header.pug | 3 +-- src/styles/base/header.scss | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/header.pug b/src/header.pug index b327da4..9347750 100644 --- a/src/header.pug +++ b/src/header.pug @@ -17,8 +17,7 @@ include templates/hd-user-avatar.pug details#user-controls summary(tabindex='0' role='button') sib-display#user-controls__profile( - fields='firstName, account.picture' - extra-context='{firstName:"first_name"}' + fields='first_name, account.picture' widget-account.picture='hd-user-avatar' bind-user ) diff --git a/src/styles/base/header.scss b/src/styles/base/header.scss index 51cc2af..894ae90 100644 --- a/src/styles/base/header.scss +++ b/src/styles/base/header.scss @@ -157,7 +157,7 @@ width: 45%; } - sib-display-value[name='firstName'] { + sib-display-value[name='first_name'] { @include icon('arrow-down'); align-items: center; display: flex; From ef256c70f40d030cf67f153a4b6f9cf5f6dbd430 Mon Sep 17 00:00:00 2001 From: Calum Mackervoy Date: Wed, 4 Dec 2019 16:11:05 +0100 Subject: [PATCH 2/2] external context instead of _ in name --- src/context.jsonld | 4 +++- src/header.pug | 2 +- src/styles/base/header.scss | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/context.jsonld b/src/context.jsonld index 6ffc880..46a6a86 100644 --- a/src/context.jsonld +++ b/src/context.jsonld @@ -4,5 +4,7 @@ "object": "http://happy-dev.fr/owl/#object", "author": "http://happy-dev.fr/owl/#author", "account": "http://happy-dev.fr/owl/#account", - "jabberID": "foaf:jabberID" + "jabberID": "foaf:jabberID", + "firstName": "http://happy-dev.fr/owl/#first_name", + "lastName": "http://happy-dev.fr/owl/#last_name" } diff --git a/src/header.pug b/src/header.pug index 9347750..9edcdb0 100644 --- a/src/header.pug +++ b/src/header.pug @@ -17,7 +17,7 @@ include templates/hd-user-avatar.pug details#user-controls summary(tabindex='0' role='button') sib-display#user-controls__profile( - fields='first_name, account.picture' + fields='firstName, account.picture' widget-account.picture='hd-user-avatar' bind-user ) diff --git a/src/styles/base/header.scss b/src/styles/base/header.scss index 894ae90..51cc2af 100644 --- a/src/styles/base/header.scss +++ b/src/styles/base/header.scss @@ -157,7 +157,7 @@ width: 45%; } - sib-display-value[name='first_name'] { + sib-display-value[name='firstName'] { @include icon('arrow-down'); align-items: center; display: flex;