Skip to content

Commit

Permalink
Add go-mcstatus to libraries list
Browse files Browse the repository at this point in the history
  • Loading branch information
PassTheMayo committed Jun 10, 2024
1 parent 9f842a7 commit 5bb30cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/docs/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ export default function Page() {
libraryList.map((library, index) => (
<li key={index}>
<a href={library.url} rel="sponsored" className="flex items-center gap-2 p-4 button">
<span className="badge badge-gray">{library.official ? 'Official' : 'Unofficial'}</span>
<span className="badge badge-gray">{library.official ? 'Official' : 'Community'}</span>
<span className="badge" style={{ color: languageColors[library.language][0], backgroundColor: languageColors[library.language][1] }}>{languageNames[library.language]}</span>
<code className="text-black dark:text-white">{library.name}</code>
</a>
Expand Down
12 changes: 10 additions & 2 deletions src/assets/libraries.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ export const libraryList = [
name: 'node-mcstatus',
url: 'https://www.npmjs.com/package/node-mcstatus'
},
{
official: true,
language: 'go',
name: 'go-mcstatus',
url: 'https://github.com/mcstatus-io/go-mcstatus'
},
{
official: false,
language: 'python',
Expand All @@ -16,11 +22,13 @@ export const libraryList = [
// Mapping of language names to capitalized formats
export const languageNames = {
javascript: 'JavaScript',
python: 'Python'
python: 'Python',
go: 'Go'
};

// Value format is [textColor, backgroundColor]
export const languageColors = {
javascript: ['#000000', '#f7df1e'],
python: ['#ffffff', '#306998']
python: ['#ffffff', '#306998'],
go: ['#ffffff', '#00add8']
};

0 comments on commit 5bb30cf

Please sign in to comment.