feat(plugins/topics): add icons mode (#648)
This commit is contained in:
@@ -19,6 +19,7 @@ inputs:
|
|||||||
default: starred
|
default: starred
|
||||||
values:
|
values:
|
||||||
- starred # Display starred topics as labels
|
- starred # Display starred topics as labels
|
||||||
|
- icons # Display starred topics as icons
|
||||||
- mastered # Display starred topics as mastered/known technologies icons
|
- mastered # Display starred topics as mastered/known technologies icons
|
||||||
|
|
||||||
# Topics sorting order
|
# Topics sorting order
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<section>
|
<section>
|
||||||
<h2 class="field">
|
<h2 class="field">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M14.184 1.143a1.75 1.75 0 00-2.502-.57L.912 7.916a1.75 1.75 0 00-.53 2.32l.447.775a1.75 1.75 0 002.275.702l11.745-5.656a1.75 1.75 0 00.757-2.451l-1.422-2.464zm-1.657.669a.25.25 0 01.358.081l1.422 2.464a.25.25 0 01-.108.35l-2.016.97-1.505-2.605 1.85-1.26zM9.436 3.92l1.391 2.41-5.42 2.61-.942-1.63 4.97-3.39zM3.222 8.157l-1.466 1a.25.25 0 00-.075.33l.447.775a.25.25 0 00.325.1l1.598-.769-.83-1.436zm6.253 2.306a.75.75 0 00-.944-.252l-1.809.87a.75.75 0 00-.293.253L4.38 14.326a.75.75 0 101.238.848l1.881-2.75v2.826a.75.75 0 001.5 0v-2.826l1.881 2.75a.75.75 0 001.238-.848l-2.644-3.863z"></path></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M14.184 1.143a1.75 1.75 0 00-2.502-.57L.912 7.916a1.75 1.75 0 00-.53 2.32l.447.775a1.75 1.75 0 002.275.702l11.745-5.656a1.75 1.75 0 00.757-2.451l-1.422-2.464zm-1.657.669a.25.25 0 01.358.081l1.422 2.464a.25.25 0 01-.108.35l-2.016.97-1.505-2.605 1.85-1.26zM9.436 3.92l1.391 2.41-5.42 2.61-.942-1.63 4.97-3.39zM3.222 8.157l-1.466 1a.25.25 0 00-.075.33l.447.775a.25.25 0 00.325.1l1.598-.769-.83-1.436zm6.253 2.306a.75.75 0 00-.944-.252l-1.809.87a.75.75 0 00-.293.253L4.38 14.326a.75.75 0 101.238.848l1.881-2.75v2.826a.75.75 0 001.5 0v-2.826l1.881 2.75a.75.75 0 001.238-.848l-2.644-3.863z"></path></svg>
|
||||||
<%= {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] %>
|
||||||
</h2>
|
</h2>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<% if (plugins.topics.error) { %>
|
<% if (plugins.topics.error) { %>
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<% for (const {name, description} of plugins.topics.list) { %>
|
<% for (const {name, description} of plugins.topics.list) { %>
|
||||||
<div class="label" title="<%= description %>"><%= name.toLocaleLowerCase() %></div>
|
<div class="label" title="<%= description %>"><%= name.toLocaleLowerCase() %></div>
|
||||||
<% } %>
|
<% } %>
|
||||||
<% } else if (plugins.topics.mode === "mastered") { %>
|
<% } else if ((plugins.topics.mode === "mastered")||(plugins.topics.mode === "icons")) { %>
|
||||||
<% for (const {name, icon} of plugins.topics.list) { %>
|
<% for (const {name, icon} of plugins.topics.list) { %>
|
||||||
<% if (icon) { %>
|
<% if (icon) { %>
|
||||||
<img src="<%= icon %>" width="24" height="24" alt="<%= name %>" title="<%= name %>"/>
|
<img src="<%= icon %>" width="24" height="24" alt="<%= name %>" title="<%= name %>"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user