Skip to content

Commit

Permalink
✨(front) add a grist paris summit landing page
Browse files Browse the repository at this point in the history
new page to explain what's the Grist Paris Summit is
and allow people to register

currently with some unfinished wording and a (so) secret way to toggle
between page versions as a previewing tool
  • Loading branch information
manuhabitela committed Nov 7, 2024
1 parent 298a279 commit 5c083f8
Show file tree
Hide file tree
Showing 7 changed files with 404 additions and 7 deletions.
Binary file added src/assets/grist-summit/grist-and-dinum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/assets/grist-summit/gristgouv-hex.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: 11 additions & 5 deletions src/components/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import Link from 'next/link'
import React from 'react'
import classNames from 'classnames'

interface ButtonProps {
children: React.ReactNode
href?: string
'aria-label'?: string
variant?: 'outline'
size?: 'large'
}

const transition = 'transition ease-in-out delay-50 duration-300'
Expand All @@ -15,25 +17,29 @@ const core =
export const buttonStyles = {
default: `${core} ${transition} font-medium text-white bg-blue-1 hover:bg-dsfr-blue-2`,
outline: `${core} ${transition} bg-transparent border border-2 font-bold border-blue-1 text-blue-1 hover:backdrop-brightness-95 hover:bg-transparent`,
largeSize: '!text-xl md:!text-2xl md:!py-4 md:!px-8',
}

export const Button: React.FC<ButtonProps> = ({
children,
href,
variant,
size,
'aria-label': ariaLabel,
}) => {
const classNames =
variant === 'outline' ? buttonStyles.outline : buttonStyles.default

const classes = classNames({
[buttonStyles.default]: !variant,
[buttonStyles.outline]: variant === 'outline',
[buttonStyles.largeSize]: size === 'large',
})
return (
<>
{href ? (
<Link href={href} className={classNames} aria-label={ariaLabel}>
<Link href={href} className={classes} aria-label={ariaLabel}>
{children}
</Link>
) : (
<button className={classNames}>{children}</button>
<button className={classes}>{children}</button>
)}
</>
)
Expand Down
4 changes: 3 additions & 1 deletion src/components/ContentSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ interface ContentSectionProps
padding?: boolean
horizontalPadding?: boolean
verticalPadding?: boolean
center?: boolean
gap?: string
}

Expand All @@ -16,6 +17,7 @@ export const ContentSection: React.FC<ContentSectionProps> = ({
padding = true,
horizontalPadding = true,
verticalPadding = true,
center = true,
gap = 'gap-[50px]',
...props
}) => {
Expand All @@ -24,7 +26,7 @@ export const ContentSection: React.FC<ContentSectionProps> = ({
className={`justify-center overflow-hidden flex ${background === 'gray' && 'bg-white-1'} ${padding && verticalPadding && 'py-[50px] md:py-20'}`}
>
<div
className={`flex flex-col items-center w-full lg:w-[70em] ${gap} ${padding && horizontalPadding && 'px-4'}`}
className={`flex flex-col ${center ? 'items-center' : 'items-start'} w-full lg:w-[70em] ${gap} ${padding && horizontalPadding && 'px-4'}`}
{...props}
>
{children}
Expand Down
Loading

0 comments on commit 5c083f8

Please sign in to comment.