From 8bd9bf091bb21af132ba8216fa5febc41b73287e Mon Sep 17 00:00:00 2001 From: Christoph Reiter <reiter.christoph@gmail.com> Date: Thu, 19 Nov 2020 14:32:44 +0100 Subject: [PATCH] app-shell: add another example activity and make it scroll Add more content so it can be used to test scrolling and activity switching --- .../assets/example.topic.metadata.json | 3 ++- .../app-shell/assets/example2.metadata.json | 17 +++++++++++++++++ packages/app-shell/src/dbp-activity-example.js | 3 ++- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 packages/app-shell/assets/example2.metadata.json diff --git a/packages/app-shell/assets/example.topic.metadata.json b/packages/app-shell/assets/example.topic.metadata.json index b50437bc..108e6eba 100644 --- a/packages/app-shell/assets/example.topic.metadata.json +++ b/packages/app-shell/assets/example.topic.metadata.json @@ -13,7 +13,8 @@ }, "routing_name": "example", "activities": [ - {"path": "example.metadata.json"} + {"path": "example.metadata.json"}, + {"path": "example2.metadata.json"} ], "attributes": [] } \ No newline at end of file diff --git a/packages/app-shell/assets/example2.metadata.json b/packages/app-shell/assets/example2.metadata.json new file mode 100644 index 00000000..e91d2807 --- /dev/null +++ b/packages/app-shell/assets/example2.metadata.json @@ -0,0 +1,17 @@ +{ + "element": "dbp-activity-example", + "module_src": "dbp-activity-example.js", + "routing_name": "activity-example2", + "name": { + "de": "Beispielaktivität 2", + "en": "Example Activity 2" + }, + "short_name": { + "de": "Beispielaktivität 2", + "en": "Example Activity 2" + }, + "description": { + "de": "Eine Beschreibung", + "en": "A Description" + } +} diff --git a/packages/app-shell/src/dbp-activity-example.js b/packages/app-shell/src/dbp-activity-example.js index 7f15f681..850a73c2 100644 --- a/packages/app-shell/src/dbp-activity-example.js +++ b/packages/app-shell/src/dbp-activity-example.js @@ -31,7 +31,8 @@ class ActivityExample extends LitElement { render() { return html` - <p>${ i18n.t('activity-example.hello-world') }</p> + <h3>${i18n.t('activity-example.hello-world')}</h3> + <ul>${(Array.from(Array(100).keys())).map(i => html`<li>${i18n.t('activity-example.hello-world') + ' ' + i}</li>`)}</ul> `; } } -- GitLab