Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
MFarabi619 committed Aug 17, 2024
1 parent aae555e commit f294627
Show file tree
Hide file tree
Showing 15 changed files with 270 additions and 51 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
"chromatic": "^11.5.5",
"commitizen": "^4.3.0",
"commitlint": "^19.3.0",
"concurrently": "^8.2.2",
"eslint": "8.57.0",
"eslint-plugin-format": "^0.1.2",
"eslint-plugin-react-hooks": "^4.6.2",
Expand All @@ -118,8 +119,10 @@
"playwright": "^1.45.1",
"postcss": "^8.4.38",
"prettier": "^3.3.3",
"react-icons": "^5.2.1",
"react-syntax-highlighter": "^15.5.0",
"semantic-release": "^24.0.0",
"sharp": "^0.33.4",
"storybook": "^8.2.2",
"storybook-dark-mode": "^4.0.2",
"tailwindcss": "^3.4.4",
Expand Down
63 changes: 55 additions & 8 deletions pnpm-lock.yaml

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

File renamed without changes.
20 changes: 20 additions & 0 deletions src/collections/features.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import * as lucideIcons from 'react-icons/lu'

Check failure on line 1 in src/collections/features.ts

View workflow job for this annotation

GitHub Actions / release (20)

'lucideIcons' is defined but never used
import type { CollectionConfig } from 'payload'

export const Features: CollectionConfig = {
slug: 'features',
fields: [
{
name: 'title',
type: 'text',
label: 'Title',
required: true,
},
{
name: 'description',
type: 'text',
label: 'Description',
required: true,
},
],
}
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/components/sections/home-page/features.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Meta, StoryObj } from '@storybook/react'
import { Features } from '@/components/sections/home-page/features'
import { FEATURES_CONTENT } from '@/content/web/features'
import { FEATURES_CONTENT } from '@/content/home-page/features'

const meta = {
title: 'Stack Builder Website/Features Section',
Expand Down
10 changes: 6 additions & 4 deletions src/components/sections/home-page/features.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { cn } from '@/lib/utils'
import { FEATURES_CONTENT } from '@/content/web/features'
import { FEATURES_CONTENT } from '@/content/home-page/features'

export function Features() {
return (
<section className="md:h-screen flex justify-center items-center">
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 relative z-10 py-10 max-w-7xl mx-auto">
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 relative z-10 py-10 max-w-7xl mx-auto">
{FEATURES_CONTENT.map((feature: { title: string, description: string, icon: React.ReactNode }, index: number) => (
<Feature key={feature.title} {...feature} index={index} />
))}
Expand Down Expand Up @@ -38,8 +38,10 @@ function Feature({
{index >= 4 && (
<div className="opacity-0 group-hover/feature:opacity-100 transition duration-200 absolute inset-0 h-full w-full bg-gradient-to-b from-neutral-100 dark:from-neutral-800 to-transparent pointer-events-none" />
)}
<div className="mb-4 relative z-10 px-10 text-neutral-600 dark:text-neutral-400">
{icon}
<div className="mb-4 relative flex z-10 px-10 text-neutral-600 dark:text-neutral-400">
<div className="scale-150">
{icon}
</div>
</div>
<div className="text-lg font-bold mb-2 relative z-10 px-10">
<div className="absolute left-0 inset-y-0 h-6 group-hover/feature:h-8 w-1 rounded-tr-full rounded-br-full bg-neutral-300 dark:bg-neutral-700 group-hover/feature:bg-violet-700 transition-all duration-200 origin-center" />
Expand Down
6 changes: 3 additions & 3 deletions src/components/sections/home-page/hero.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FlipWords } from '@/components/ui/flip-words'
import { HomePageButton } from '@/components/ui/home-button'
import { buttons } from '@/content/web/buttons'
import { hero_section_buttons_content } from '@/content/home-page/hero-section-buttons-content'
import { Boxes } from '@/components/ui/background-boxes'

const words = ['vision', 'ideas', 'stack', 'way']
Expand All @@ -15,11 +15,11 @@ export function Hero() {
Your
<FlipWords words={words} />
</span>
{buttons.slice(0, 1).map(button => (
{hero_section_buttons_content.slice(0, 1).map(button => (
<HomePageButton key={button.href} {...(button)} />
))}
<section className="flex flex-col space-y-3 sm:flex-row sm:space-x-2 sm:space-y-0 w-2/3 sm:w-fit">
{buttons.slice(1).map(button => (
{hero_section_buttons_content.slice(1).map(button => (
<HomePageButton key={button.href} {...(button)} />
))}
</section>
Expand Down
14 changes: 7 additions & 7 deletions src/components/ui/home-button.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Meta, StoryObj } from '@storybook/react'
import { HomePageButton } from '@/components/ui/home-button'
import { buttons } from '@/content/web/buttons'
import { hero_section_buttons_content } from '@/content/home-page/hero-section-buttons-content'

const meta = {
title: 'Zenith Design System/Home Page Buttons',
Expand All @@ -27,7 +27,7 @@ type Story = StoryObj<typeof meta>

export const StackBuilder: Story = {
args: {
...buttons[0],
...hero_section_buttons_content[0],
},
parameters: {
design: {
Expand All @@ -38,7 +38,7 @@ export const StackBuilder: Story = {

export const Figma: Story = {
args: {
...buttons[1],
...hero_section_buttons_content[1],
},
parameters: {
design: {
Expand All @@ -49,7 +49,7 @@ export const Figma: Story = {

export const Storybook: Story = {
args: {
...buttons[2],
...hero_section_buttons_content[2],
},
parameters: {
design: {
Expand All @@ -60,7 +60,7 @@ export const Storybook: Story = {

export const EslintConfigInspector: Story = {
args: {
...buttons[3],
...hero_section_buttons_content[3],
},
parameters: {
design: {
Expand All @@ -71,7 +71,7 @@ export const EslintConfigInspector: Story = {

export const Github: Story = {
args: {
...buttons[4],
...hero_section_buttons_content[4],
},
parameters: {
design: {
Expand All @@ -82,7 +82,7 @@ export const Github: Story = {

export const Fumadocs: Story = {
args: {
...buttons[5],
...hero_section_buttons_content[5],
},
parameters: {
design: {
Expand Down
8 changes: 6 additions & 2 deletions src/content/docs/development/manual-setup/storybook.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,12 @@ For convenience, the following code is in sync based on the current Storybook co

```bash
pnpm i -D \
@storybook/{addon-a11y,addon-actions,addon-backgrounds,addon-controls,addon-designs,addon-docs,addon-interactions,addon-links,addon-measure,addon-onboarding,addon-outline,addon-storysource,addon-themes,addon-toolbars,addon-viewport,blocks,components,icons,manager-api,nextjs,react,source-loader,test,test-runner,theming,types} \
@storybook/{addon-a11y,addon-actions,addon-backgrounds,addon-controls,addon-designs,addon-docs,addon-interactions,addon-links,addon-measure,addon-onboarding,addon-outline,addon-storysource,addon-themes,addon-toolbars,addon-viewport,blocks,components,icons,manager-api,source-loader,test,test-runner,theming,types} \
@chromatic-com/storybook \
storybook \
storybook-dark-mode
storybook-dark-mode \
@whitespace/storybook-addon-html \
next-themes \
```

<Files>
Expand Down Expand Up @@ -200,6 +202,8 @@ Extend the range of viewports with more options.
</Tab>
</Tabs>

You will also need have the dark class applied to the layout body in (home)/layout.tsx.

### Inspiration

[Fin UI](https://ui.fin.africa/?path=/docs/foundations-installation--docs)
Loading

0 comments on commit f294627

Please sign in to comment.