diff --git a/.github/readme/partials/setup/action/setup.md b/.github/readme/partials/setup/action/setup.md index 58e020b042d..56f7204bb3c 100644 --- a/.github/readme/partials/setup/action/setup.md +++ b/.github/readme/partials/setup/action/setup.md @@ -99,4 +99,6 @@ Update your README.md to embed your metrics: ![Metrics](https://github.com/my-github-user/my-github-user/blob/master/github-metrics.svg) ![Metrics](https://github.com/my-github-user/my-github-user/blob/main/github-metrics.svg) + +Metrics ``` \ No newline at end of file diff --git a/README.md b/README.md index 7945d5c0ca0..1cb33495011 100644 --- a/README.md +++ b/README.md @@ -529,6 +529,8 @@ Update your README.md to embed your metrics: ![Metrics](https://github.com/my-github-user/my-github-user/blob/master/github-metrics.svg) ![Metrics](https://github.com/my-github-user/my-github-user/blob/main/github-metrics.svg) + +Metrics ``` diff --git a/source/app/web/statics/app.placeholder.js b/source/app/web/statics/app.placeholder.js index 28fd6e6f427..62afa93c5f6 100644 --- a/source/app/web/statics/app.placeholder.js +++ b/source/app/web/statics/app.placeholder.js @@ -56,6 +56,7 @@ animated: false, //Display size large: set.config.display === "large", + columns: set.config.display === "columns", //Config config: set.config, //Base elements diff --git a/source/plugins/core/README.md b/source/plugins/core/README.md index 3429f889e47..93639359426 100644 --- a/source/plugins/core/README.md +++ b/source/plugins/core/README.md @@ -145,6 +145,7 @@ It may increase filesize since it replace unicode characters by SVG images. Some templates like `classic` and `repositories` support different output display size: - `regular` (default) will render a medium-sized image, which is suitable for both desktop and mobile displays and is preferable when using data-intensive metrics (since text may be scaled down on small devices) - `large` will render a large-sized image, which may be more suitable for some plugins (like displaying topics icons, repository contributors, etc.) +- `columns` will render a full-width image, with two columns on desktop / one column on mobile #### ℹ️ Examples workflows diff --git a/source/plugins/core/index.mjs b/source/plugins/core/index.mjs index 0259ed85d8a..80e0622f7fa 100644 --- a/source/plugins/core/index.mjs +++ b/source/plugins/core/index.mjs @@ -34,6 +34,7 @@ export default async function({login, q}, {conf, data, rest, graphql, plugins, q //Display data.large = display === "large" + data.columns = display === "columns" //Animations data.animated = animations diff --git a/source/plugins/core/metadata.yml b/source/plugins/core/metadata.yml index e33b72a0575..ba0ea90e9a6 100644 --- a/source/plugins/core/metadata.yml +++ b/source/plugins/core/metadata.yml @@ -175,6 +175,7 @@ inputs: values: - regular # 480px width - large # 960px width (may not be supported by all templates) + - columns # Full width with two columns on desktop / One column on mobile # Enable SVG CSS animations config_animations: diff --git a/source/templates/classic/image.svg b/source/templates/classic/image.svg index 1525607d3e8..419cfad789d 100644 --- a/source/templates/classic/image.svg +++ b/source/templates/classic/image.svg @@ -1,10 +1,10 @@ - + -
+
<% for (const partial of [...partials]) { %> <%- await include(`partials/${partial}.ejs`) %> <% } %> diff --git a/source/templates/classic/style.css b/source/templates/classic/style.css index df88a79d5f7..5ac18d906c0 100644 --- a/source/templates/classic/style.css +++ b/source/templates/classic/style.css @@ -35,6 +35,23 @@ width: 50%; } +/* Columns display */ + svg.columns .items-wrapper{ + column-count: 2; + column-gap: 10px; + } + svg.columns .items-wrapper>*{ + -webkit-column-break-inside: avoid; + page-break-inside: avoid; + break-inside: avoid-column; + } + + @media (max-width: 850px){ + svg.columns .items-wrapper{ + column-count: 1; + } + } + /* Headers */ h1, h2, h3 { margin: 8px 0 2px;