Skip to content

Commit

Permalink
Merge pull request #241 from coder12git/sistent-site-draft
Browse files Browse the repository at this point in the history
Fix Sistent Website build failure
  • Loading branch information
aabidsofi19 committed Nov 7, 2023
2 parents 0116c81 + b29f6e0 commit bcb52f1
Show file tree
Hide file tree
Showing 14 changed files with 202 additions and 174 deletions.
6 changes: 6 additions & 0 deletions site/gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
import React from 'react'
import "./src/styles/global.css"
import { ThemeProvider } from "./src/components/Theme"

export const wrapRootElement = ({ element }) => (
<ThemeProvider>{element}</ThemeProvider>
)
2 changes: 1 addition & 1 deletion site/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ module.exports = {
title: `Sistent Design System | Layer5`,
siteUrl: `https://design.layer5.io`
},
plugins: ["gatsby-plugin-postcss", 'gatsby-plugin-dark-mode']
plugins: ["gatsby-plugin-postcss"]
};
20 changes: 0 additions & 20 deletions site/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"dependencies": {
"autoprefixer": "^10.4.16",
"gatsby": "^5.12.4",
"gatsby-plugin-dark-mode": "^1.1.2",
"gatsby-plugin-postcss": "^6.12.0",
"postcss": "^8.4.31",
"react": "^18.2.0",
Expand Down
5 changes: 5 additions & 0 deletions site/src/assets/images/ChevronDark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
6 changes: 2 additions & 4 deletions site/src/assets/images/Weather.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions site/src/assets/images/WeatherDark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 12 additions & 8 deletions site/src/components/Navigation/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import React from "react";
import React, {useContext} from "react";
import Search from '../../assets/images/Search.svg';
import SearchDark from "../../assets/images/SearchDark.svg";
import ThemeToggle from "../Theme";
import ThemeContext from "../Theme";
import Weather from '../../assets/images/Weather.svg';
import WeatherDark from '../../assets/images/WeatherDark.svg';

const Navbar = ()=>{
return (
<>
const Navbar = () => {
const theme = useContext(ThemeContext)

return (
<>
<div className=" w-[1440px] h-[100px] px-10 py-6 bg-background-default justify-between items-center inline-flex">
<div className="h-12 justify-center items-center gap-4 flex">
<div className="w-12 h-12 relative rounded-lg border border-border-strong" />
Expand All @@ -24,16 +28,16 @@ const Navbar = ()=>{
</div>
</div>
<div className="justify-end items-center gap-8 flex">
<div className="w-6 h-6 relative"><img src={localStorage.getItem('theme')==='dark'? SearchDark : Search}/></div>
<div className="w-6 h-6 relative"><img src={theme.dark? SearchDark : Search }/></div>
<div className="w-6 h-6 justify-center items-center flex">
<div className="w-6 h-6 relative flex-col justify-start items-start flex"><ThemeToggle/></div>
<div className="w-6 h-6 relative flex-col justify-start items-start flex"><img src={theme.dark? WeatherDark : Weather } onClick={theme.toggleDark}/></div>
</div>
</div>
</div>
</div>
<hr className="border-border-default border-solid"/>
</>
)
)
};

export default Navbar;
Loading

0 comments on commit bcb52f1

Please sign in to comment.