Unverified Commit 465faa7c authored by Mohammed Mushahid Qureshi's avatar Mohammed Mushahid Qureshi Committed by GitHub
Browse files

fix: hide in top_languages interfering with number of languages displayed (#959)



* added a dark theme like the github dark theme

* fixed hide in top_languages interfering with number of languages displayed

* fixed hide in top_languages interfering with number of languages displayed

* fixed hide in top_languages interfering with number of languages displayed

* fixed misplaced function argument

* style(themes): Add GitHub dark theme (#758)

This styling falls in line with the recently released GitHub dark mode

Co-authored-by: default avatarAnurag Hazra <hazru.anurag@gmail.com>

* docs: add covid fund link (#1019)

* docs: add `npm install` step to CONTRIBUTING.md (#1015)

* fix: apply parseBoolean to hide_border in pin.js (#1014)

* feat: limit langs shown on wakatime card (#988)

* fix: fixed javascript oof moment

Co-authored-by: default avatarIssy <48881813+issy@users.noreply.github.com>
Co-authored-by: default avatarAnurag Hazra <hazru.anurag@gmail.com>
Co-authored-by: default avatarMike Beaton <mjsbeaton@gmail.com>
Co-authored-by: default avatarFlorian Bussmann <hallo@florian-bussmann.de>
parent 9773d924
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -47,6 +47,7 @@ module.exports = async (req, res) => {
      username,
      username,
      langs_count,
      langs_count,
      parseArray(exclude_repo),
      parseArray(exclude_repo),
      parseArray(hide),
    );
    );


    const cacheSeconds = clampValue(
    const cacheSeconds = clampValue(
+8 −3
Original line number Original line Diff line number Diff line
@@ -34,10 +34,15 @@ const fetcher = (variables, token) => {
  );
  );
};
};


async function fetchTopLanguages(username, langsCount = 5, exclude_repo = []) {
async function fetchTopLanguages(
  username,
  langsCount = 5,
  exclude_repo = [],
  hide = [],
) {
  if (!username) throw Error("Invalid username");
  if (!username) throw Error("Invalid username");

  langsCount = parseInt(langsCount) + hide.length;
  langsCount = clampValue(parseInt(langsCount), 1, 10);
  langsCount = clampValue(langsCount, 1, 10 + hide.length);


  const res = await retryer(fetcher, { login: username });
  const res = await retryer(fetcher, { login: username });


+6 −0
Original line number Original line Diff line number Diff line
@@ -268,6 +268,12 @@ const themes = {
    icon_color: "ff1aff",
    icon_color: "ff1aff",
    text_color: "8080ff",
    text_color: "8080ff",
    bg_color: "141439",
    bg_color: "141439",
  },
  github_dark: {
    title_color: "58a6ff",
    icon_color: "da3633",
    text_color: "c9d1d9",
    bg_color: "0d1117",
  },
  },
   ocean_dark:{
   ocean_dark:{
    title_color: "8957B2",
    title_color: "8957B2",