Skip to content

Commit

Permalink
Merge pull request #21 from plastic-labs/dm/final-tweaks
Browse files Browse the repository at this point in the history
Final Content Tweaks
  • Loading branch information
mckelvey authored Dec 3, 2024
2 parents ecb254d + febb58b commit 7225fa0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 29 deletions.
6 changes: 5 additions & 1 deletion components/composed/about-us/about-us.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ export const AboutUs: React.FC<AboutUsProps> = props => {
<StyledAboutUs {...props}>
<TextContent
title="About Us"
ctas={<ButtonLink href="https://blog.plasticlabs.ai/">Blog</ButtonLink>}
ctas={
<ButtonLink href="https://blog.plasticlabs.ai/">
Learn more
</ButtonLink>
}
>
<Text variant="Body2">
Plastic Labs is a research-driven company building at the intersection
Expand Down
4 changes: 2 additions & 2 deletions components/composed/contact/contact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ export const Contact: React.FC<ContactProps> = props => {
inverse
prompt="To connect with Plastic Labs"
text="Join Discord"
title="Plastic Labs"
title="Contact"
/>
<Divider />
<LinkGiant
href="mailto:[email protected]"
inverse
prompt="For other inquiries"
text="[email protected]"
title="Questions"
title="Inquire"
/>
</StyledContact>
)
Expand Down
7 changes: 6 additions & 1 deletion components/core/title/title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@ const StyledTitleArea = styled.div<{ $delay: number }>`
text-transform: lowercase;
white-space: nowrap;
&::before {
&:first-child:before {
content: '>';
padding-right: 0.34em;
}
&:not(:first-child):before {
content: '-';
padding-right: 0.34em;
}
}
*:first-child::after {
Expand Down
26 changes: 2 additions & 24 deletions components/layout/header/navigation.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
'use client'

import { useRouter } from 'next/navigation'
import { MouseEvent } from 'react'
import styled from 'styled-components'
import { ButtonLink } from '@/components/interactive/buttons/button-link'
import { WIDE_BREAKPOINT } from '@/styles/breakpoints'
import { NavigationProps } from './header.types'

const HEADER_HEIGHT = 4.375 * 16 - 1

const StyledNavigationWrapper = styled.div`
justify-self: end;
display: grid;
Expand All @@ -35,32 +31,14 @@ const StyledNavigation = styled.nav`
`

export const Navigation: React.FC<NavigationProps> = props => {
const router = useRouter()

const handleContactScroll = (event: MouseEvent<HTMLAnchorElement>) => {
const contactEl = document.getElementById('contact')
if (contactEl) {
const { top } = contactEl.getBoundingClientRect()
if (top > HEADER_HEIGHT) {
event.preventDefault()
window.scrollTo({ top: top - HEADER_HEIGHT, behavior: 'smooth' })
router.push('#contact', { scroll: false })
}
}
}

return (
<StyledNavigationWrapper {...props} id="main-navigation">
<StyledNavigation aria-label="Main">
<ButtonLink href="https://blog.plasticlabs.ai/" variant="navigation">
Blog
</ButtonLink>
<ButtonLink
href="/#contact"
onClick={handleContactScroll}
variant="navigation"
>
Contact us
<ButtonLink href="https://discord.gg/plasticlabs" variant="navigation">
Community
</ButtonLink>
</StyledNavigation>
</StyledNavigationWrapper>
Expand Down
2 changes: 1 addition & 1 deletion components/sections/hero/hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Section } from '@/components/layout/section'
import { WIDE_BREAKPOINT } from '@/styles/breakpoints'
import { IconPlus } from './icon-plus'

const DEFAULT_MAIN_NAVIGATION_WIDTH = 305 // pixels
const DEFAULT_MAIN_NAVIGATION_WIDTH = 291 // pixels

const StyledHeroSection = styled(Section)`
--main-navigation-width: ${DEFAULT_MAIN_NAVIGATION_WIDTH};
Expand Down

0 comments on commit 7225fa0

Please sign in to comment.