Add codewars buton (#501)

This commit is contained in:
Jan Dittrich 2023-10-16 02:32:44 +02:00 committed by GitHub
parent 746e9ef641
commit c2d0d2e8b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 0 deletions

View File

@ -128,6 +128,7 @@ services:
- PIXELFED=https://pixelfed.org/
- VRCHAT=https://vrchat.com
- X=https://x.com
- CODEWARS=https://www.codewars.com
ports:
- 8080:3000
restart: unless-stopped

View File

@ -598,3 +598,9 @@ button {
color: #000000;
background-color: #000000;
}
/* Codewars */
.button.button-codewars {
color: #df605c;
background-color: #222327;
}

View File

@ -90,6 +90,7 @@ import lemmyLogo from '../../icons/lemmy.svg';
import pixelfedLogo from '../../icons/pixelfed.svg';
import vrchatLogo from '../../icons/vrchat.svg';
import xLogo from '../../icons/x.svg';
import codewarsLogo from '../../icons/codewars.svg';
function Home(props) {
let order = [];
@ -949,6 +950,15 @@ function Home(props) {
order={buttonOrder('X')}
/>
)}
{runtimeConfig.CODEWARS && (
<Button
name="codewars"
href={runtimeConfig.CODEWARS}
displayName="Codewars"
logo={codewarsLogo}
order={buttonOrder('CODEWARS')}
/>
)}
</Sort>
<div>
<p className="footer">

View File

@ -142,6 +142,7 @@ export const runtimeConfig =
PIXELFED: window?.env?.PIXELFED,
VRCHAT: window?.env?.VRCHAT,
X: window?.env?.X,
CODEWARS: window?.env?.CODEWARS,
}
: {
// server
@ -511,4 +512,7 @@ export const runtimeConfig =
? process.env.VRCHAT
: process.env.RAZZLE_VRCHAT,
X: nodeIsProduction ? process.env.X : process.env.RAZZLE_X,
CODEWARS: nodeIsProduction
? process.env.CODEWARS
: process.env.RAZZLE_CODEWARS,
};

3
src/icons/codewars.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 KiB