Refactor categoryColour support
- cleanup .gitignore - fix icon color for bullet style - use simple_list in theme settings - fix yaml linting
This commit is contained in:
parent
e88463d901
commit
b59c961f0a
|
@ -1,71 +1 @@
|
||||||
.discourse-site
|
.discourse-site
|
||||||
# Created by https://www.toptal.com/developers/gitignore/api/eclipse
|
|
||||||
# Edit at https://www.toptal.com/developers/gitignore?templates=eclipse
|
|
||||||
|
|
||||||
### Eclipse ###
|
|
||||||
.metadata
|
|
||||||
bin/
|
|
||||||
tmp/
|
|
||||||
*.tmp
|
|
||||||
*.bak
|
|
||||||
*.swp
|
|
||||||
*~.nib
|
|
||||||
local.properties
|
|
||||||
.settings/
|
|
||||||
.loadpath
|
|
||||||
.recommenders
|
|
||||||
|
|
||||||
# External tool builders
|
|
||||||
.externalToolBuilders/
|
|
||||||
|
|
||||||
# Locally stored "Eclipse launch configurations"
|
|
||||||
*.launch
|
|
||||||
|
|
||||||
# PyDev specific (Python IDE for Eclipse)
|
|
||||||
*.pydevproject
|
|
||||||
|
|
||||||
# CDT-specific (C/C++ Development Tooling)
|
|
||||||
.cproject
|
|
||||||
|
|
||||||
# CDT- autotools
|
|
||||||
.autotools
|
|
||||||
|
|
||||||
# Java annotation processor (APT)
|
|
||||||
.factorypath
|
|
||||||
|
|
||||||
# PDT-specific (PHP Development Tools)
|
|
||||||
.buildpath
|
|
||||||
|
|
||||||
# sbteclipse plugin
|
|
||||||
.target
|
|
||||||
|
|
||||||
# Tern plugin
|
|
||||||
.tern-project
|
|
||||||
|
|
||||||
# TeXlipse plugin
|
|
||||||
.texlipse
|
|
||||||
|
|
||||||
# STS (Spring Tool Suite)
|
|
||||||
.springBeans
|
|
||||||
|
|
||||||
# Code Recommenders
|
|
||||||
.recommenders/
|
|
||||||
|
|
||||||
# Annotation Processing
|
|
||||||
.apt_generated/
|
|
||||||
.apt_generated_test/
|
|
||||||
|
|
||||||
# Scala IDE specific (Scala & Java development for Eclipse)
|
|
||||||
.cache-main
|
|
||||||
.scala_dependencies
|
|
||||||
.worksheet
|
|
||||||
|
|
||||||
# Uncomment this line if you wish to ignore the project description file.
|
|
||||||
# Typically, this file would be tracked if it contains build/dependency configurations:
|
|
||||||
.project
|
|
||||||
|
|
||||||
### Eclipse Patch ###
|
|
||||||
# Spring Boot Tooling
|
|
||||||
.sts4-cache/
|
|
||||||
|
|
||||||
# End of https://www.toptal.com/developers/gitignore/api/eclipse
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ span.category-badge-icon {
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.badge-wrapper.bullet span.category-badge-icon .d-icon,
|
||||||
.categories-list .category .category-icon .d-icon {
|
.categories-list .category .category-icon .d-icon {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,11 @@ export default {
|
||||||
/// Add custom category icon from theme settings
|
/// Add custom category icon from theme settings
|
||||||
let iconItem = getIconItem(category.slug);
|
let iconItem = getIconItem(category.slug);
|
||||||
if (iconItem) {
|
if (iconItem) {
|
||||||
let itemColor = iconItem[2] == 'categoryColour' ? `style="color: #${color}"` : iconItem[2] ? `style="color: ${iconItem[2]}"` : "";
|
let itemColor = iconItem[2]
|
||||||
|
? iconItem[2] == "categoryColour"
|
||||||
|
? `style="color: #${color}"`
|
||||||
|
: `style="color: ${iconItem[2]}"`
|
||||||
|
: "";
|
||||||
let itemIcon = iconItem[1] != "" ? iconHTML(iconItem[1]) : "";
|
let itemIcon = iconItem[1] != "" ? iconHTML(iconItem[1]) : "";
|
||||||
html += `<span ${itemColor} class="category-badge-icon">${itemIcon}</span>`;
|
html += `<span ${itemColor} class="category-badge-icon">${itemIcon}</span>`;
|
||||||
}
|
}
|
||||||
|
|
17
settings.yml
17
settings.yml
|
@ -1,12 +1,13 @@
|
||||||
category_icon_list:
|
category_icon_list:
|
||||||
default: 'help,question-circle,#CC0000,partial|'
|
default: "help,question-circle,#CC0000,partial|"
|
||||||
type: 'list'
|
type: "list"
|
||||||
|
list_type: "simple"
|
||||||
description: 'Enter comma-delimited configuration for categories, in the format "slug,icon,colour,match". Colour in format #123456 or "categoryColour" to use the default colour for the category (same as the Badge colour). If match is "partial" then the slug need only partially match the category-slug, otherwise an exact match is required'
|
description: 'Enter comma-delimited configuration for categories, in the format "slug,icon,colour,match". Colour in format #123456 or "categoryColour" to use the default colour for the category (same as the Badge colour). If match is "partial" then the slug need only partially match the category-slug, otherwise an exact match is required'
|
||||||
svg_icons:
|
svg_icons:
|
||||||
default: 'question-circle'
|
default: "question-circle"
|
||||||
type: 'list'
|
type: "list"
|
||||||
list_type: 'compact'
|
list_type: "compact"
|
||||||
description: 'List of FontAwesome 5 icons used in this theme component'
|
description: "List of FontAwesome 5 icons used in this theme component"
|
||||||
category_lock_icon:
|
category_lock_icon:
|
||||||
default: ''
|
default: ""
|
||||||
description: 'Enter the name of a FontAwesome 5 icon to display instead of the lock icon next to private categories.'
|
description: "Enter the name of a FontAwesome 5 icon to display instead of the lock icon next to private categories."
|
||||||
|
|
Loading…
Reference in New Issue