diff --git a/slides/assets/logout-dark.svg b/slides/assets/logout-dark.svg new file mode 100644 index 00000000..2a38228b --- /dev/null +++ b/slides/assets/logout-dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/slides/assets/logout.svg b/slides/assets/logout.svg new file mode 100644 index 00000000..4ccae33b --- /dev/null +++ b/slides/assets/logout.svg @@ -0,0 +1,4 @@ + + + + diff --git a/slides/assets/setting-dark.svg b/slides/assets/setting-dark.svg new file mode 100644 index 00000000..b34cdc90 --- /dev/null +++ b/slides/assets/setting-dark.svg @@ -0,0 +1,6 @@ + + + + diff --git a/slides/assets/setting.svg b/slides/assets/setting.svg new file mode 100644 index 00000000..1caefbeb --- /dev/null +++ b/slides/assets/setting.svg @@ -0,0 +1,4 @@ + + + + diff --git a/slides/assets/toggle-down-dark.svg b/slides/assets/toggle-down-dark.svg new file mode 100644 index 00000000..8994164f --- /dev/null +++ b/slides/assets/toggle-down-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/slides/assets/toggle-down.svg b/slides/assets/toggle-down.svg new file mode 100644 index 00000000..c6a142e6 --- /dev/null +++ b/slides/assets/toggle-down.svg @@ -0,0 +1,3 @@ + + + diff --git a/slides/assets/toggle-up-dark.svg b/slides/assets/toggle-up-dark.svg new file mode 100644 index 00000000..d3698fcb --- /dev/null +++ b/slides/assets/toggle-up-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/slides/assets/toggle-up.svg b/slides/assets/toggle-up.svg new file mode 100644 index 00000000..aa9a5d3d --- /dev/null +++ b/slides/assets/toggle-up.svg @@ -0,0 +1,3 @@ + + + diff --git a/slides/components/full-page.ftd b/slides/components/full-page.ftd index 0925ed51..08727052 100644 --- a/slides/components/full-page.ftd +++ b/slides/components/full-page.ftd @@ -3,6 +3,7 @@ -- import: fastn-community.github.io/dark-mode-switcher as dms + -- component page: module site-data: site-data module user-data: user-data @@ -51,7 +52,7 @@ height.fixed.px: 32 -- ftd.row: spacing.fixed.px: 32 align-content: center -;; if: { header.user-data.ud.is-logged-in } +if: { header.user-data.ud.is-logged-in } -- button: Share button-link: / @@ -59,9 +60,11 @@ button-icon: $assets.files.slides.assets.share.svg -- notification: -/-- avatar: $header.user-data.ud.user.name -email: $header.user-data.ud.user.email -if: { header.user-data.ud.user != NULL } +/-- ftd.text: $header.user-data.ud.ww.name +if: { header.user-data.ud.ww != NULL } + +-- avatar: $header.user-data.ud.name +email: $header.user-data.ud.email -- end: ftd.row @@ -159,8 +162,8 @@ align-content: center -- profile-circle: $avatar.title -- ftd.image: -src: $assets.files.assets.toggle-down.svg -src if { avatar.pop-up }: $assets.files.assets.toggle-up.svg +src: $assets.files.slides.assets.toggle-down.svg +src if { avatar.pop-up }: $assets.files.slides.assets.toggle-up.svg width.fixed.px: 24 height.fixed.px: 24 @@ -205,7 +208,7 @@ padding-vertical.px: 12 spacing.fixed.px: 8 -- ftd.image: -src: $assets.files.assets.setting.svg +src: $assets.files.slides.assets.setting.svg width.fixed.px: 24 height.fixed.px: 24 align-self: center @@ -221,7 +224,7 @@ width: fill-container spacing.fixed.px: 8 -- ftd.image: -src: $assets.files.assets.logout.svg +src: $assets.files.slides.assets.logout.svg width.fixed.px: 24 height.fixed.px: 24 align-self: center @@ -310,6 +313,6 @@ color: white -- string get-initials(name): string name: -js: $assets.files.functions.js +js: $assets.files.slides.functions.js get_initials(name) diff --git a/slides/functions.js b/slides/functions.js new file mode 100644 index 00000000..50f467d3 --- /dev/null +++ b/slides/functions.js @@ -0,0 +1,7 @@ +function get_initials(name) { + return name + .get("value") + .split(" ") + .map((p) => p[0]) + .join(""); +} diff --git a/slides/scenarios/john-doe-ud.ftd b/slides/scenarios/john-doe-ud.ftd index 4193e75e..0bbdc564 100644 --- a/slides/scenarios/john-doe-ud.ftd +++ b/slides/scenarios/john-doe-ud.ftd @@ -1,21 +1,11 @@ --- record status: -boolean is-logged-in: -optional user-details user: - -- record user-details: +boolean is-logged-in: string name: string email: -string login: -integer id: +string username: - --- status ud: +-- user-details ud: is-logged-in: true -user: $john - - --- user-details john: name: John Doe email: john-doe@abc.com -login: john-doe -id: 1 +username: john-doe diff --git a/slides/scenarios/logged-in-templates.ftd b/slides/scenarios/logged-in-templates.ftd index fcfec123..09cf04f5 100644 --- a/slides/scenarios/logged-in-templates.ftd +++ b/slides/scenarios/logged-in-templates.ftd @@ -1,5 +1,5 @@ -- import: ui.fifthtry.com/slides/pages/templates --- import: ui.fifthtry.com/slides/scenerios/john-doe-ud +-- import: ui.fifthtry.com/slides/scenarios/john-doe-ud -- templates.page: diff --git a/slides/user-data.ftd b/slides/user-data.ftd index 87c12e55..69cd821d 100644 --- a/slides/user-data.ftd +++ b/slides/user-data.ftd @@ -1,13 +1,11 @@ --- record status: -boolean is-logged-in: -optional user-details user: - -- record user-details: +boolean is-logged-in: string name: string email: -string login: -integer id: - +string username: --- status ud: +-- user-details ud: is-logged-in: false +name: $ftd.empty +email: $ftd.empty +username: $ftd.empty