summaryrefslogtreecommitdiffstats
path: root/src/components/ProjectSummary
Commit message (Collapse)AuthorAgeFilesLines
* refactor: use formatjs swc pluginArmand Philippot2022-03-231-0/+8
| | | | | I'm not able to configure SWC plugins in Next.js so to make it works, all translation must have an id.
* chore: update some texts to reduce its widthArmand Philippot2022-02-131-2/+2
| | | | | | | In French, "Utiliser le thème sombre" was a little too long, so instead I decided to remove the "Toggle" word and add an icon to help user understand the button purpose. Same way, "Aucune étoile" was too long, so I replace it with "0 étoile"
* refactor(config): move config from config dir to utilsArmand Philippot2022-01-291-4/+2
|
* chore: replace lingui functions with react-intlArmand Philippot2022-01-291-9/+59
|
* fix(project): make sure the project cover is displayedArmand Philippot2022-01-271-5/+5
| | | | | | | | Next.js does not support the dynamic import of images. Sometimes the images was displayed and other times the loading did not finish. So even if I would like to keep the content in a same place, I choose to put the projects covers inside the public directory. Then I use a hasCover boolean to determine if the project cover need to be printed.
* chore: wrap dates with time tagArmand Philippot2022-01-251-21/+24
|
* refactor(project): replace repo api call method with hook and swrArmand Philippot2022-01-241-22/+19
| | | | | | | | | | Instead of using post slug and an environment variable to fetch repo data, I use the given repo in each project MDX file. It allows me to fetch data from another user/organization if needed. To make it work, I no longer provide the full URL in MDX file. The new format is: "User/repo-slug". I also replaced the fetch method with SWR to improve caching and to avoid React complaining about cleanup useEffect.
* chore: add a project summary componentArmand Philippot2022-01-202-0/+195
background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
!(function (e) {
  var a = /\{[^\r\n\[\]{}]*\}/,
    n = {
      'quoted-string': { pattern: /"(?:[^"\\]|\\.)*"/, alias: 'operator' },
      'command-param-id': {
        pattern: /(\s)\w+:/,
        lookbehind: !0,
        alias: 'property',
      },
      'command-param-value': [
        { pattern: a, alias: 'selector' },
        {
          pattern: /([\t ])\S+/,
          lookbehind: !0,
          greedy: !0,
          alias: 'operator',
        },
        { pattern: /\S(?:.*\S)?/, alias: 'operator' },
      ],
    };
  function t(e) {
    return 'string' == typeof e
      ? e
      : Array.isArray(e)
      ? e.map(t).join('')
      : t(e.content);
  }
  (e.languages.naniscript = {
    comment: { pattern: /^([\t ]*);.*/m, lookbehind: !0 },
    define: {
      pattern: /^>.+/m,
      alias: 'tag',
      inside: {
        value: {
          pattern: /(^>\w+[\t ]+)(?!\s)[^{}\r\n]+/,
          lookbehind: !0,
          alias: 'operator',
        },
        key: { pattern: /(^>)\w+/, lookbehind: !0 },
      },
    },
    label: {
      pattern: /^([\t ]*)#[\t ]*\w+[\t ]*$/m,
      lookbehind: !0,
      alias: 'regex',
    },
    command: {
      pattern: /^([\t ]*)@\w+(?=[\t ]|$).*/m,
      lookbehind: !0,
      alias: 'function',
      inside: {
        'command-name': /^@\w+/,
        expression: { pattern: a, greedy: !0, alias: 'selector' },
        'command-params': { pattern: /\s*\S[\s\S]*/, inside: n },
      },
    },
    'generic-text': {
      pattern: /(^[ \t]*)[^#@>;\s].*/m,
      lookbehind: !0,
      alias: 'punctuation',
      inside: {
        'escaped-char': /\\[{}\[\]"]/,
        expression: { pattern: a, greedy: !0, alias: 'selector' },
        'inline-command': {
          pattern: /\[[\t ]*\w[^\r\n\[\]]*\]/,
          greedy: !0,
          alias: 'function',
          inside: {
            'command-params': {
              pattern: /(^\[[\t ]*\w+\b)[\s\S]+(?=\]$)/,
              lookbehind: !0,
              inside: n,
            },
            'command-param-name': {
              pattern: /^(\[[\t ]*)\w+/,
              lookbehind: !0,
              alias: 'name',
            },
            'start-stop-char': /[\[\]]/,
          },
        },
      },
    },
  }),
    (e.languages.nani = e.languages.naniscript),
    e.hooks.add('after-tokenize', function (e) {
      e.tokens.forEach(function (e) {
        if ('string' != typeof e && 'generic-text' === e.type) {
          var a = t(e);
          (function (e) {
            for (var a = [], n = 0; n < e.length; n++) {
              var t = e[n],
                r = '[]{}'.indexOf(t);
              if (-1 !== r)
                if (r % 2 == 0) a.push(r + 1);
                else if (a.pop() !== r) return !1;
            }
            return 0 === a.length;
          })(a) || ((e.type = 'bad-line'), (e.content = a));
        }
      });
    });
})(Prism);