From cea5f01f9af614797582f71c53741d33cf986c3a Mon Sep 17 00:00:00 2001 From: Simon Lecoq <22963968+lowlighter@users.noreply.github.com> Date: Wed, 3 Nov 2021 21:51:36 -0400 Subject: [PATCH] feat(plugins/topics): add `icons` mode (#648) --- source/plugins/topics/metadata.yml | 1 + source/templates/classic/partials/topics.ejs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/plugins/topics/metadata.yml b/source/plugins/topics/metadata.yml index 1a57a613..c4d4afbf 100644 --- a/source/plugins/topics/metadata.yml +++ b/source/plugins/topics/metadata.yml @@ -19,6 +19,7 @@ inputs: default: starred values: - starred # Display starred topics as labels + - icons # Display starred topics as icons - mastered # Display starred topics as mastered/known technologies icons # Topics sorting order diff --git a/source/templates/classic/partials/topics.ejs b/source/templates/classic/partials/topics.ejs index 8dc9dcd6..3be1d782 100644 --- a/source/templates/classic/partials/topics.ejs +++ b/source/templates/classic/partials/topics.ejs @@ -2,7 +2,7 @@

- <%= {starred:"Starred topics", mastered:"Mastered technologies and topics"}[plugins.topics.mode] %> + <%= {starred:"Starred topics", icons:"Starred topics", mastered:"Mastered technologies and topics"}[plugins.topics.mode] %>

<% if (plugins.topics.error) { %> @@ -19,7 +19,7 @@ <% for (const {name, description} of plugins.topics.list) { %>
<%= name.toLocaleLowerCase() %>
<% } %> - <% } else if (plugins.topics.mode === "mastered") { %> + <% } else if ((plugins.topics.mode === "mastered")||(plugins.topics.mode === "icons")) { %> <% for (const {name, icon} of plugins.topics.list) { %> <% if (icon) { %> <%= name %>