Skip to content

Commit

Permalink
Add Buttons (#675)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ki-er authored Sep 11, 2024
1 parent b2207b4 commit b61a7b5
Show file tree
Hide file tree
Showing 9 changed files with 240 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ services:
- GOOGLESCHOLAR=https://scholar.google.co.uk/
- SIMPLEX=https://simplex.chat/
- MIXCLOUD=https://www.mixcloud.com/
- INTERNETARCHIVE=https://archive.org/
- GOOGLEMAPS=https://www.google.com/maps
- TIDAL=https://tidal.com/
- THESTORYGRAPH=https://www.thestorygraph.com/
- GEOCACHING=https://www.geocaching.com/play
ports:
- 8080:3000
restart: unless-stopped
Expand Down
35 changes: 34 additions & 1 deletion public/css/brands.css
Original file line number Diff line number Diff line change
Expand Up @@ -703,4 +703,37 @@ button {
.button.button-mixcloud {
color: #000000;
background-color: #ffffff;
}
}

/* Internet Archive */
.button.button-internetarchive {
color: #000000;
background-color: #ffff;
}

/* Google Maps */
.button.button-googlemaps {
color: #4482f1;
background-color: #fff;
}

/* Tidal */
.button.button-tidal {
color: #000000;
background-color: #fff;
}

/* TheStoryGraph */
.button.button-thestorygraph {
color: #ffff;
background-color: #18949c;
}

/* Geocaching */
.button.button-geocaching {
color: #000000;
background-color: #ffff;
}



50 changes: 50 additions & 0 deletions src/components/Home/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ import semanticscholarLogo from '../../icons/semanticscholar.svg';
import googlescholarLogo from '../../icons/googlescholar.svg';
import simplexLogo from '../../icons/simplex.svg';
import mixcloudLogo from '../../icons/mixcloud.svg';
import internetarchiveLogo from '../../icons/internetarchive.svg';
import googlemapsLogo from '../../icons/googlemaps.svg';
import tidalLogo from '../../icons/tidal.svg';
import thestorygraphLogo from '../../icons/storygraph.svg';
import geocachingLogo from '../../icons/geocaching.svg';

function Home(props) {
let order = [];
Expand Down Expand Up @@ -1098,6 +1103,51 @@ function Home(props) {
order={buttonOrder('MIXCLOUD')}
/>
)}
{runtimeConfig.INTERNETARCHIVE && (
<Button
name="internetarchive"
href={runtimeConfig.INTERNETARCHIVE}
displayName="Internet Archive"
logo={internetarchiveLogo}
order={buttonOrder('INTERNETARCHIVE')}
/>
)}
{runtimeConfig.GOOGLEMAPS && (
<Button
name="googlemaps"
href={runtimeConfig.GOOGLEMAPS}
displayName="Google Maps"
logo={googlemapsLogo}
order={buttonOrder('GOOGLEMAPS')}
/>
)}
{runtimeConfig.TIDAL && (
<Button
name="tidal"
href={runtimeConfig.TIDAL}
displayName="Tidal"
logo={tidalLogo}
order={buttonOrder('TIDAL')}
/>
)}
{runtimeConfig.THESTORYGRAPH && (
<Button
name="thestorygraph"
href={runtimeConfig.THESTORYGRAPH}
displayName="The StoryGraph"
logo={thestorygraphLogo}
order={buttonOrder('THESTORYGRAPH')}
/>
)}
{runtimeConfig.GEOCACHING && (
<Button
name="geocaching"
href={runtimeConfig.GEOCACHING}
displayName="GEOCACHING"
logo={geocachingLogo}
order={buttonOrder('GEOCACHING')}
/>
)}
</Sort>
<div>
<p className="footer">
Expand Down
18 changes: 18 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ export const runtimeConfig =
GOOGLESCHOLAR: window?.env?.GOOGLESCHOLAR,
SIMPLEX: window?.env?.SIMPLEX,
MIXCLOUD: window?.env?.MIXCLOUD,
INTERNETARCHIVE: window?.env?.INTERNETARCHIVE,
GOOGLEMAPS: window?.env?.GOOGLEMAPS,
TIDAL: window?.env?.TIDAL,
THESTORYGRAPH: window?.env?.THESTORYGRAPH,
GEOCACHING: window?.env?.GEOCACHING,
}
: {
// server
Expand Down Expand Up @@ -571,4 +576,17 @@ export const runtimeConfig =
MIXCLOUD: nodeIsProduction
? process.env.MIXCLOUD
: process.env.RAZZLE_MIXCLOUD,
INTERNETARCHIVE: nodeIsProduction
? process.env.INTERNETARCHIVE
: process.env.RAZZLE_INTERNETARCHIVE,
GOOGLEMAPS: nodeIsProduction
? process.env.GOOGLEMAPS
: process.env.RAZZLE_GOOGLEMAPS,
TIDAL: nodeIsProduction ? process.env.TIDAL : process.env.RAZZLE_TIDAL,
THESTORYGRAPH: nodeIsProduction
? process.env.THESTORYGRAPH
: process.env.RAZZLE_THESTORYGRAPH,
GEOCACHING: nodeIsProduction
? process.env.GEOCACHING
: process.env.RAZZLE_GEOCACHING,
};
4 changes: 4 additions & 0 deletions src/icons/geocaching.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/icons/googlemaps.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 84 additions & 0 deletions src/icons/internetarchive.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions src/icons/storygraph.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/icons/tidal.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b61a7b5

Please sign in to comment.