mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
chore: add additional language icons
fix: support ipynb, cjs, tsx file endings
This commit is contained in:
parent
9586dbf781
commit
f182b804bb
@ -21,6 +21,9 @@ app:
|
||||
custom_languages:
|
||||
vue: Vue
|
||||
jsx: JSX
|
||||
tsx: TSX
|
||||
cjs: JavaScript
|
||||
ipynb: Python
|
||||
svelte: Svelte
|
||||
|
||||
# url template for user avatar images (to be used with services like gravatar or dicebear)
|
||||
|
@ -48,25 +48,32 @@ func (s *LeaderboardViewModel) ColorModifier(item *models.LeaderboardItemRanked,
|
||||
func (s *LeaderboardViewModel) LangIcon(lang string) string {
|
||||
// https://icon-sets.iconify.design/mdi/
|
||||
langs := map[string]string{
|
||||
"c++": "cpp",
|
||||
"cpp": "cpp",
|
||||
"go": "go",
|
||||
"haskell": "haskell",
|
||||
"html": "html5",
|
||||
"java": "java",
|
||||
"javascript": "javascript",
|
||||
"kotlin": "kotlin",
|
||||
"lua": "lua",
|
||||
"php": "php",
|
||||
"python": "python",
|
||||
"r": "r",
|
||||
"ruby": "ruby",
|
||||
"rust": "rust",
|
||||
"swift": "swift",
|
||||
"typescript": "typescript",
|
||||
"c++": "language-cpp",
|
||||
"cpp": "language-cpp",
|
||||
"go": "language-go",
|
||||
"haskell": "language-haskell",
|
||||
"html": "language-html5",
|
||||
"java": "language-java",
|
||||
"javascript": "language-javascript",
|
||||
"jsx": "language-javascript",
|
||||
"kotlin": "language-kotlin",
|
||||
"lua": "language-lua",
|
||||
"php": "language-php",
|
||||
"python": "language-python",
|
||||
"r": "language-r",
|
||||
"ruby": "language-ruby",
|
||||
"rust": "language-rust",
|
||||
"swift": "language-swift",
|
||||
"typescript": "language-typescript",
|
||||
"tsx": "language-typescript",
|
||||
"vue": "language-vuejs",
|
||||
"react": "language-react",
|
||||
"markdown": "language-markdown",
|
||||
"bash": "bash",
|
||||
"json": "code-json",
|
||||
}
|
||||
if match, ok := langs[strings.ToLower(lang)]; ok {
|
||||
return "mdi:language-" + match
|
||||
return "mdi:" + match
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
@ -70,6 +70,11 @@ let icons = [
|
||||
'mdi:language-rust',
|
||||
'mdi:language-swift',
|
||||
'mdi:language-typescript',
|
||||
'mdi:language-vuejs',
|
||||
'mdi:language-react',
|
||||
'mdi:language-markdown',
|
||||
'mdi:code-json',
|
||||
'mdi:bash',
|
||||
'twemoji:frowning-face',
|
||||
]
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Loading…
Reference in New Issue
Block a user