Skip to content

Commit

Permalink
use themed devicons
Browse files Browse the repository at this point in the history
  • Loading branch information
coffee-cup committed May 13, 2021
1 parent 266b92a commit 1868deb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/layouts/starterLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,22 @@ const getCSS: GetCSSFn = config => {
};

const Component: LayoutComponent = ({ config }) => {
const theme = gString(config, "Theme", defaultTheme).toLowerCase();
const name = gString(config, "Name");
const url = gString(config, "URL");
const iconURL = `https://devicons.railway.app/${name}?variant=${
theme === "light" ? "dark" : "light"
}`;

console.log({ iconURL });

return (
<div className="top">
<RLogo config={config} />

<div className="content">
<div className="dicon-wrapper">
<img
className="dicon"
src={`https://devicons-production.up.railway.app/${name}`}
/>
<img className="dicon" src={iconURL} />
</div>

<h1>
Expand Down

0 comments on commit 1868deb

Please sign in to comment.