Skip to content

Commit

Permalink
fix: styles
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-vm committed Mar 11, 2024
1 parent e370ed2 commit 7725315
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 95 deletions.
7 changes: 4 additions & 3 deletions src/components/Home/Navbar/Hanburger/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
.menu-list {
position: fixed;
top: 0;
z-index: 3;
left: calc(100vw - 250px);
height: 100vh;
width: 250px;
Expand All @@ -35,14 +36,14 @@
align-self: flex-end;
}

ul {
.ul {
list-style-type: none;
padding: 0;
flex-grow: 1;
overflow-y: auto;
}

li {
.li {
margin: 10px 0;
}

Expand All @@ -52,7 +53,7 @@ li {
margin-bottom: 5px;
}

a {
.a {
text-decoration: none;
color: #333;
}
9 changes: 4 additions & 5 deletions src/components/Home/Navbar/Hanburger/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,20 @@ export const Hamburger: React.FC<Props> = ({ menuItems, buttonsItems }) => {
{isOpen && (
<>
<div className="menu-list" ref={menuRef}>
<ul>
<ul className="ul">
{menuItems.map((item, index) => (
<li key={index}>
<a href={item.link}>{item.label}</a>
<li className="li" key={index}>
<a className="a" href={item.link}>{item.label}</a>
</li>
))}
{buttonsItems.length && (<div className='divider'></div>)}
{buttonsItems.length && buttonsItems.map(b => (
<li>
<li className="li">
{b}
</li>
))}
</ul>
</div>

</>
)}
</div>
Expand Down
103 changes: 47 additions & 56 deletions src/components/Home/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ import React, { useCallback, useMemo, useState } from 'react'
import "./index.css"
import { Hamburger } from './Hanburger';
import { Icon } from '@iconify/react'
import { useWindowDimensions } from '@site/src/utils/useWindowSize';

export const Navbar = () => {
const { width } = useWindowDimensions();
const menuItems = useMemo(() => {
return [
{ label: "Documentation", link: "/docs/intro" },
Expand All @@ -15,70 +13,63 @@ export const Navbar = () => {
]
}, [])

const handleClickCloud = useCallback(()=>{
const handleClickCloud = useCallback(() => {
window.open("https://domino-workflows.cloud/sign-in", "_blank")
},[])
}, [])

const handleClickContact = useCallback(()=>{
const handleClickContact = useCallback(() => {
window.location.href = "#contact"
},[])

const handleClickGithub = useCallback(()=>{
window.open("https://github.com/Tauffer-Consulting/domino", "_blank")
},[])
}, [])

return (
<>
{width <= 1144 ? (
<nav id="navbar-small">
<img id="logo" src="brand/png/main_logo.png" alt="Logo" />
<Hamburger
menuItems={menuItems}
buttonsItems={
[<button id="primary" onClick={handleClickCloud}>
Try cloud
</button>,
<button id="secondary" onClick={handleClickContact}>
Contact
</button>,
<a id="github" href="https://github.com/Tauffer-Consulting/domino" target='_blank' >
Github <Icon icon="fa-brands:github" fontSize={36} />
</a>
]}
/>
</nav>
) : (
<nav id="navbar">
<img id="logo" src="brand/png/main_logo.png" alt="Logo" />
<nav id="navbar-small">
<img id="logo" src="brand/png/main_logo.png" alt="Logo" />
<Hamburger
menuItems={menuItems}
buttonsItems={
[<button id="primary" onClick={handleClickCloud}>
Try cloud
</button>,
<button id="secondary" onClick={handleClickContact}>
Contact
</button>,
<a id="github" href="https://github.com/Tauffer-Consulting/domino" target='_blank' >
Github <Icon icon="fa-brands:github" fontSize={36} />
</a>
]}
/>
</nav>
<nav id="navbar">
<img id="logo" src="brand/png/main_logo.png" alt="Logo" />

<ul className='ul' id="central-links">
{menuItems.map(({ label, link }) =>
<li className='li'>
<a href={link}>
{label}
</a>
</li>
)}
</ul>
<ul id="right-buttons" className='ul'>
<li className='li'>
<button id="primary" onClick={handleClickCloud}>
Try cloud
</button>
</li>
<li className='li'>
<button id="secondary" onClick={handleClickContact}>
Contact
</button>
</li>
<ul className='ul' id="central-links">
{menuItems.map(({ label, link }) =>
<li className='li'>
<a id="github" href="https://github.com/Tauffer-Consulting/domino" target='_blank' >
<Icon icon="fa-brands:github" fontSize={36} />
<a href={link}>
{label}
</a>
</li>
</ul>
</nav>
)}
)}
</ul>
<ul id="right-buttons" className='ul'>
<li className='li'>
<button id="primary" onClick={handleClickCloud}>
Try cloud
</button>
</li>
<li className='li'>
<button id="secondary" onClick={handleClickContact}>
Contact
</button>
</li>
<li className='li'>
<a id="github" href="https://github.com/Tauffer-Consulting/domino" target='_blank' >
<Icon icon="fa-brands:github" fontSize={36} />
</a>
</li>
</ul>
</nav>
</>
)
}
2 changes: 1 addition & 1 deletion src/components/Home/Session1/Frame/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const Frame = () => {
<div id="ellipse" className='red' />
<div id="ellipse" className='yellow' />
<div id="ellipse" className='green' />
<img id="gif" src="img/intro/gif-example.gif" />
<img id="gif" src="img/intro/gif-example.gif" alt="domino platform gif"/>
</div>
</div>
)
Expand Down
4 changes: 2 additions & 2 deletions src/pages/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ button#primary {
padding: 0;
cursor: pointer;

background: var(--ifm-color-primary);
background: #00B140;
color: #fff;

width: 115px;
Expand All @@ -18,7 +18,7 @@ button#primary:hover {
padding: 0;
cursor: pointer;

background: var(--ifm-color-primary-dark);
background: #008F34;
}

button#secondary {
Expand Down
3 changes: 2 additions & 1 deletion src/pages/index.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
html {
#landing {
z-index: -2;
background-color: #f0f0f0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import HomepageContactSession from '../components/Home/OldSections/HomepageConta

export default function Home(): JSX.Element {
return (
<div>
<div id="landing">
<Navbar />
<main>
<Session1 />
Expand Down
26 changes: 0 additions & 26 deletions src/utils/useWindowSize.tsx

This file was deleted.

0 comments on commit 7725315

Please sign in to comment.