feat: Add X (#470)

* feat: Add X

* fix: Run lint fix
This commit is contained in:
Kieran 2023-08-09 14:16:51 +01:00 committed by GitHub
parent 21cb6352ac
commit a38d00d74f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 1 deletions

View File

@ -126,7 +126,7 @@ services:
- LEMMY=https://join-lemmy.org
- PIXELFED=https://pixelfed.org/
- VRCHAT=https://vrchat.com
- X=https://x.com
ports:
- 8080:3000
restart: unless-stopped

View File

@ -581,3 +581,9 @@ button {
color: #000000;
background-color: #ffffff;
}
/* X */
.button.button-x {
color: #000000;
background-color: #000000;
}

View File

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

View File

@ -140,6 +140,7 @@ export const runtimeConfig =
LEMMY: window?.env?.LEMMY,
PIXELFED: window?.env?.PIXELFED,
VRCHAT: window?.env?.VRCHAT,
X: window?.env?.X,
}
: {
// server
@ -505,4 +506,5 @@ export const runtimeConfig =
VRCHAT: nodeIsProduction
? process.env.VRCHAT
: process.env.RAZZLE_VRCHAT,
X: nodeIsProduction ? process.env.X : process.env.RAZZLE_X,
};

3
src/icons/x.svg Normal file
View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M18.9014 1.16016H22.5816L14.5415 10.3493L24 22.8537H16.5941L10.7935 15.2699L4.15631 22.8537H0.473926L9.07356 13.0249L0 1.16016H7.59394L12.8372 8.09208L18.9014 1.16016ZM17.6098 20.651H19.649L6.48589 3.24719H4.29759L17.6098 20.651Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 358 B