From dd357159020f653ef53e6cb81b6e41752d64231e Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Tue, 18 Jan 2022 13:10:14 -0500 Subject: [PATCH] docs: community plugins examples --- .../partials/templated/plugins.community.md | 29 +++++++++++-------- source/plugins/community/README.md | 26 +++++++++++++---- 2 files changed, 38 insertions(+), 17 deletions(-) diff --git a/.github/readme/partials/templated/plugins.community.md b/.github/readme/partials/templated/plugins.community.md index a609bc0c..03b76b5a 100644 --- a/.github/readme/partials/templated/plugins.community.md +++ b/.github/readme/partials/templated/plugins.community.md @@ -1,18 +1,24 @@
🎲 Community plugins | ||
|---|---|---|
| Additional plugins maintained by community for even more features! | ||
- <% for (const [plugin, {name, category}] of Object.entries(plugins).filter(([key, value], index) => (index%2 === 0)&&(value)&&(value.category === "community")).sort(([an, a], [bn, b]) => a.category === b.category ? an.localeCompare(bn) : 0)) { %><%# -%>
- <%- name %> <%= plugin %><% } %> - |
-
- <% for (const [plugin, {name, category}] of Object.entries(plugins).filter(([key, value], index) => (index%2 === 1)&&(value)&&(value.category === "community")).sort(([an, a], [bn, b]) => a.category === b.category ? an.localeCompare(bn) : 0)) { %><%# -%>
- <%- name %> <%= plugin %><% } %> - |
+<% {
+ let cell = 0
+ const elements = Object.entries(plugins).filter(([key, value]) => (value)&&(value.category === "community"))
+ if (elements.length%2)
+ elements.push(["", {readme:{demo:`|
| <% if (plugin) { %><%= name -%><% } %> | <% + if (cell === "odd") { %>||
nightscoutscreenshotpoopmapstock