From 605b3801e8138d0b89b74a65a59365122c36c081 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 11:36:29 +0000 Subject: [PATCH 1/2] Auto-regenerate files --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index b972aa3d..82875a23 100644 --- a/action.yml +++ b/action.yml @@ -1111,7 +1111,7 @@ inputs: # Action metadata name: GitHub metrics as SVG image author: lowlighter -description: An SVG generator with 20+ metrics about your GitHub account! Additional plugins are available to display even more! +description: An infographics generator with 30+ plugins and 100+ options to display stats about your GitHub account and render them as SVG, Markdown, PDF or JSON! branding: icon: user-check color: gray-dark From 3727e8f71a437969b55a931620bf3424eb863465 Mon Sep 17 00:00:00 2001 From: Simon Lecoq <22963968+lowlighter@users.noreply.github.com> Date: Tue, 11 May 2021 13:57:34 +0200 Subject: [PATCH 2/2] Add followup, habits and introduction section in insights (#291) --- source/app/web/instance.mjs | 10 +++- source/app/web/statics/about/index.html | 68 +++++++++++++++++++++++ source/app/web/statics/about/script.js | 9 +++ source/app/web/statics/about/style.css | 74 +++++++++++++++++++++++-- 4 files changed, 156 insertions(+), 5 deletions(-) diff --git a/source/app/web/instance.mjs b/source/app/web/instance.mjs index d1a1aee5..b1d8f280 100644 --- a/source/app/web/instance.mjs +++ b/source/app/web/instance.mjs @@ -188,9 +188,17 @@ export default async function({mock, nosettings} = {}) { "activity.limit":100, "activity.days":0, notable:true, + followup:true, + "followup.sections":"repositories, user", + habits:true, + "habits.from":100, + "habits.days":7, + "habits.facts":false, + "habits.charts":true, + introduction:true }, }, - {graphql, rest, plugins:{achievements:{enabled:true}, isocalendar:{enabled:true}, languages:{enabled:true}, activity:{enabled:true, markdown:"extended"}, notable:{enabled:true}}, conf, convert:"json"}, + {graphql, rest, plugins:{achievements:{enabled:true}, isocalendar:{enabled:true}, languages:{enabled:true}, activity:{enabled:true, markdown:"extended"}, notable:{enabled:true}, followup:{enabled:true}, habits:{enabled:true}, introduction:{enabled:true}}, conf, convert:"json"}, {Plugins, Templates}, ) //Cache diff --git a/source/app/web/statics/about/index.html b/source/app/web/statics/about/index.html index 6726e925..475dbc91 100644 --- a/source/app/web/statics/about/index.html +++ b/source/app/web/statics/about/index.html @@ -76,6 +76,10 @@ +
+ {{ introduction }} +
+
@@ -165,6 +169,56 @@
+
+

+ + Overall status of related issues and pull requests +

+
+ +
+
+

@@ -175,6 +229,20 @@

+
+

+ + Average commits per day over the last week +

+
+
+ {{ habits[h] }} +
+ {{ `${h}`.padStart(2, 0) }} +
+
+
+

diff --git a/source/app/web/statics/about/script.js b/source/app/web/statics/about/script.js index 4a04ff71..794dda60 100644 --- a/source/app/web/statics/about/script.js +++ b/source/app/web/statics/about/script.js @@ -98,6 +98,15 @@ achievements() { return this.metrics?.rendered.plugins.achievements.list?.filter(({ leaderboard }) => !leaderboard).filter(({ title }) => !/(?:automater|octonaut|infographile)/i.test(title)) ?? [] }, + introduction() { + return this.metrics?.rendered.plugins.introduction?.text ?? "" + }, + followup() { + return this.metrics?.rendered.plugins.followup ?? null + }, + habits() { + return this.metrics?.rendered.plugins.habits.commits.hours ?? null + }, isocalendar() { return (this.metrics?.rendered.plugins.isocalendar.svg ?? "") .replace(/#ebedf0/gi, "var(--color-calendar-graph-day-bg)") diff --git a/source/app/web/statics/about/style.css b/source/app/web/statics/about/style.css index 8990e845..29e03db2 100644 --- a/source/app/web/statics/about/style.css +++ b/source/app/web/statics/about/style.css @@ -11,6 +11,9 @@ align-items: center; margin-top: 1rem; } + .text-center { + text-align: center; + } /* Search */ .search { @@ -82,6 +85,33 @@ box-shadow: 0 0 0 1px var(--color-avatar-border); } +/** Progress bars */ + .progress-bars { + display: flex; + margin: .5rem 0; + } + .progress { + height: 8px; + border-radius: 6px; + outline: 1px solid transparent; + } + .progress:not(:last-child) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + .progress:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .legend { + display: flex; + align-items: center; + flex-wrap: wrap; + } + .legend > * { + margin: 0 1rem; + } + /* Languages */ .languages .list { display: flex; @@ -99,10 +129,16 @@ font-size: .8rem; color: var(--color-text-secondary); } - .progress { - height: 8px; - border-radius: 6px; - outline: 1px solid transparent; + +/* Followup */ + .followup { + display: flex; + flex-wrap: wrap; + flex-direction: row; + } + .followup .followup-section { + width: 100%; + margin-bottom: .5rem; } /* Isocalendar */ @@ -240,6 +276,32 @@ width: 100%; } +/* Charts */ + .chart-bars { + display: flex; + justify-content: space-between; + align-items: flex-end; + width: 100%; + height: 12rem; + overflow: auto; + } + .chart-bars .entry { + flex: 1 1 0; + display: flex; + flex-direction: column; + align-items: center; + } + .chart-bars .entry .value { + color: var(--color-text-secondary); + font-size: .8rem; + } + .chart-bars .entry .label { + margin: 0 .25rem; + } + .chart-bars .bar { + width: 100%; + } + /* Icon gauges */ .gauge { stroke-linecap: round; @@ -387,6 +449,10 @@ .languages .language { width: 25%; } + .followup .followup-section { + width: calc(50% - 1rem); + margin-right: 1rem; + } .search { width: 520px; }