Unverified Commit c8a5e835 authored by Teddy Heinen's avatar Teddy Heinen Committed by GitHub
Browse files

feat: add corner rounding parameter so we can make square cards (#845)

* add corner rounding parameter so i can make square cards

* rename rx to border_radius
parent ad486d1a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ module.exports = async (req, res) => {
    custom_title,
    locale,
    disable_animations,
    border_radius,
  } = req.query;
  let stats;

@@ -74,6 +75,7 @@ module.exports = async (req, res) => {
        bg_color,
        theme,
        custom_title,
        border_radius,
        locale: locale ? locale.toLowerCase() : null,
        disable_animations: parseBoolean(disable_animations),
      }),
+2 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ module.exports = async (req, res) => {
    show_owner,
    cache_seconds,
    locale,
    border_radius,
  } = req.query;

  let repoData;
@@ -69,6 +70,7 @@ module.exports = async (req, res) => {
        text_color,
        bg_color,
        theme,
        border_radius,
        show_owner: parseBoolean(show_owner),
        locale: locale ? locale.toLowerCase() : null,
      }),
+2 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ module.exports = async (req, res) => {
    exclude_repo,
    custom_title,
    locale,
    border_radius
  } = req.query;
  let topLangs;

@@ -68,6 +69,7 @@ module.exports = async (req, res) => {
        bg_color,
        theme,
        layout,
        border_radius,
        locale: locale ? locale.toLowerCase() : null,
      }),
    );
+2 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ module.exports = async (req, res) => {
    locale,
    layout,
    api_domain,
    border_radius,
  } = req.query;

  res.setHeader("Content-Type", "image/svg+xml");
@@ -61,6 +62,7 @@ module.exports = async (req, res) => {
        bg_color,
        theme,
        hide_progress,
        border_radius,
        locale: locale ? locale.toLowerCase() : null,
        layout,
      }),
+1 −0
Original line number Diff line number Diff line
@@ -145,6 +145,7 @@ You can customize the appearance of your `Stats Card` or `Repo Card` however you
- `theme` - name of the theme, choose from [all available themes](./themes/README.md)
- `cache_seconds` - set the cache header manually _(min: 1800, max: 86400)_
- `locale` - set the language in the card _(e.g. cn, de, es, etc.)_
- `border_radius` - Corner rounding on the card_

##### Gradient in bg_color

Loading