From 976102a2b85ded84ec0d722d6565daaaecc630e5 Mon Sep 17 00:00:00 2001 From: Kai Henseler Date: Mon, 19 Aug 2024 16:59:54 +0200 Subject: [PATCH] docs: enhance custom elements readme Signed-off-by: Kai Henseler --- IONOS/README.md | 117 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 106 insertions(+), 11 deletions(-) diff --git a/IONOS/README.md b/IONOS/README.md index 4605489..e4ad9ea 100644 --- a/IONOS/README.md +++ b/IONOS/README.md @@ -2,15 +2,95 @@ as a Custom Element written in Svelte for convenience. Targeted to be used as Header for Easystorage as part of a custom Nextcloud theme (`/themes`). -## Usage +## 🚚 Available Elements -### Activate Theme +### 🏠 Header + +#### ⚙️ Attributes + +- `home_src` => The link the logo is supposed to use + +#### 🎰 Slots + +- `webmail` => links to peer products +- `usermenu` => see [Usermenu](#user-menu) + +```html + + + ... + +
+ + ... +
+
+``` + +### 👤 User Menu + +#### 🎰 Slots + +- `username` => shows in the upper user menu element +- `options` => container for [usermenu entries](#user-menu-entries) +- `logout` => last & separated usermenu elment + +```html + + + Username + +
+ + ... +
+
+ +
+
+``` + +#### 🗂️ User Menu Entries + +##### ⚙️ Attributes + +- `icon` => [ionos-icon](#icon) to be used +- `label` => text to be displayed +- `link` => link the entry is supposed to lead to +- `target` => defines how the link is supposed to be opened **(default: `_self`)** + +```html + + +``` + +### 🖼️ Icon + +#### ⚙️ Attributes + +- `type` => choose from the available icons: + - `webmail` + - `user` + - `logout` + - `settings` + - `help` +- `size` => multiplyer for the icon size **(default: `1`)** + +```html + +``` + +## 🚀 Usage + +### 🎨 Activate Theme 1. put the a folder with the name of the theme as foldername into `/themes` 2. activate by putting `'theme' => 'nc-ionos-theme',` into the `config.php` -3. (optional) make theme exclusive by putting `'theme => 'nc-ionos-theme'` into the `config.php` file +3. _(optional)_ make theme exclusive by putting `'theme => 'nc-ionos-theme'` into the `config.php` file -### Use +### 🛠️ Use + +Make sure the latest version of the Global Navigation is used by [building](#-build) the project into `../core/js/custom-elements/global-navigation` 1. Import file for example using: `` @@ -18,7 +98,28 @@ as a Custom Element written in Svelte for convenience. Targeted to be used as He ```html -

This is Placed on the rigth side of the header as a slot

+ Webmail +
+ + Username +
+ + +
+
+ +
+
+
``` @@ -26,12 +127,6 @@ as a Custom Element written in Svelte for convenience. Targeted to be used as He ### 🛠️ Setup -#### 📦 Podman Dev Container - -Uses containerized Node environment - -simply run `make run-dev` to start a container, install dependencies and start the dev server. - #### 🖥️ Without Container Make sure Node v20 is installed