From fca9162f02f997e327ca3a6cf6d9a17f9c903d6f Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Wed, 2 Jun 2021 19:06:28 +0100 Subject: [PATCH] Adds option for a section to have an icon --- README.md | 1 + public/conf.yml | 1 + src/components/LinkItems/Collapsable.vue | 185 ++++++++++++----------- src/components/LinkItems/ItemGroup.vue | 2 + src/styles/color-themes.scss | 3 +- src/views/Home.vue | 1 + 6 files changed, 102 insertions(+), 91 deletions(-) diff --git a/README.md b/README.md index 8fce76b0..6b1d17f9 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,7 @@ All fields are optional, unless otherwise stated. **`section`** - `name` - String: (required) The title of that section - `items` - Item[]: (required) An array of items - _See **`item`** below_ +- `icon` - String: (optional) An single icon to be displayed next to the title _See **`icon`** below_ - `displayData`: An object with the following fields (all optional) - `collapsed` - Boolean: If true, the section will be collapsed initially (defaults to `false`) - `color` - String: A custom accent color for the section, as a hex code or HTML color (e.g. `#fff`) diff --git a/public/conf.yml b/public/conf.yml index 99c1cd80..3f500182 100644 --- a/public/conf.yml +++ b/public/conf.yml @@ -13,6 +13,7 @@ appConfig: fontAwesomeKey: 0821c65656 sections: - name: Getting Started + icon: fab fa-github items: - title: Source description: Source code and documentation on GitHub diff --git a/src/components/LinkItems/Collapsable.vue b/src/components/LinkItems/Collapsable.vue index 8878cbf0..e67b0042 100644 --- a/src/components/LinkItems/Collapsable.vue +++ b/src/components/LinkItems/Collapsable.vue @@ -11,6 +11,7 @@ tabIndex="-1" >
@@ -24,18 +25,23 @@