Skip to content

Commit

Permalink
Changed website to not only showcase blocks, but also so you can copy…
Browse files Browse the repository at this point in the history
…/paste and view code directly on the site
  • Loading branch information
tommyjepsen committed Apr 9, 2024
1 parent df843dc commit e9c4e34
Show file tree
Hide file tree
Showing 80 changed files with 5,537 additions and 181 deletions.
54 changes: 27 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,184 +28,184 @@ Here is a list of available blocks:

## Headers

### [Header1](https://github.com/tommyjepsen/twblocks/blob/main/components/header/header1.tsx)
### [Header1](https://github.com/tommyjepsen/twblocks/blob/main/blocks/header/header1.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/header1.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-header1.png?raw=true)

## Heros

### [Hero1](https://github.com/tommyjepsen/twblocks/blob/main/components/hero/hero1.tsx)
### [Hero1](https://github.com/tommyjepsen/twblocks/blob/main/blocks/hero/hero1.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/hero1.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-hero1.png?raw=true)

### [Hero2](https://github.com/tommyjepsen/twblocks/blob/main/components/hero/hero2.tsx)
### [Hero2](https://github.com/tommyjepsen/twblocks/blob/main/blocks/hero/hero2.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/hero2.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-hero2.png?raw=true)

### [Hero3](https://github.com/tommyjepsen/twblocks/blob/main/components/hero/hero3.tsx)
### [Hero3](https://github.com/tommyjepsen/twblocks/blob/main/blocks/hero/hero3.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/hero3.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-hero3.png?raw=true)

### [Hero4](https://github.com/tommyjepsen/twblocks/blob/main/components/hero/hero4.tsx)
### [Hero4](https://github.com/tommyjepsen/twblocks/blob/main/blocks/hero/hero4.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/hero4.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-hero4.png?raw=true)

## Cases

### [Case1](https://github.com/tommyjepsen/twblocks/blob/main/components/case/case1.tsx)
### [Case1](https://github.com/tommyjepsen/twblocks/blob/main/blocks/case/case1.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/case1.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-case1.png?raw=true)

### [Case2](https://github.com/tommyjepsen/twblocks/blob/main/components/case/case2.tsx)
### [Case2](https://github.com/tommyjepsen/twblocks/blob/main/blocks/case/case2.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/case2.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-case2.png?raw=true)

## Features

### [Feature1](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/feature1.tsx)
### [Feature1](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/feature1.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/feature1.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-feature1.png?raw=true)

### [Feature2](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/feature2.tsx)
### [Feature2](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/feature2.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/feature2.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-feature2.png?raw=true)

### [Feature3](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/feature3.tsx)
### [Feature3](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/feature3.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/feature3.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-feature3.png?raw=true)

### [Feature4](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/feature4.tsx)
### [Feature4](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/feature4.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/feature4.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-feature4.png?raw=true)

### [Feature5](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/feature5.tsx)
### [Feature5](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/feature5.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/feature5.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-feature5.png?raw=true)

### [Feature6](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/feature6.tsx)
### [Feature6](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/feature6.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/feature6.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-feature6.png?raw=true)

### [Feature7](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/feature7.tsx)
### [Feature7](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/feature7.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/feature7.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-feature7.png?raw=true)

### [Feature8](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/feature8.tsx)
### [Feature8](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/feature8.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/feature8.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-feature8.png?raw=true)

## CTAs

### [CTA1](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/cta1.tsx)
### [CTA1](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/cta1.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/cta1.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-cta1.png?raw=true)

### [CTA2](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/cta2.tsx)
### [CTA2](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/cta2.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/cta2.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-cta2.png?raw=true)

## Stats

### [Stats1](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/stats1.tsx)
### [Stats1](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/stats1.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/stats1.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-stats1.png?raw=true)


### [Stats2](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/stats2.tsx)
### [Stats2](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/stats2.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/stats2.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-stats2.png?raw=true)

## Pricing

### [Pricing1](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/pricing1.tsx)
### [Pricing1](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/pricing1.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/pricing1.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-pricing1.png?raw=true)

### [Pricing2](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/pricing2.tsx)
### [Pricing2](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/pricing2.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/pricing2.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-pricing2.png?raw=true)

## FAQs

### [FAQ1](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/faq1.tsx)
### [FAQ1](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/faq1.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/faq1.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-faq1.png?raw=true)

### [FAQ2](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/faq2.tsx)
### [FAQ2](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/faq2.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/faq2.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-faq2.png?raw=true)

## Blogs

### [Blog1](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/blog1.tsx)
### [Blog1](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/blog1.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/blog1.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-blog1.png?raw=true)

### [Blog2](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/blog2.tsx)
### [Blog2](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/blog2.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/blog2.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-blog2.png?raw=true)

## Contacts

### [Contact1](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/contact1.tsx)
### [Contact1](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/contact1.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/contact1.png?raw=true)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/darkmode-contact1.png?raw=true)

## Footers

### [Footer1](https://github.com/tommyjepsen/twblocks/blob/main/components/feature/footer1.tsx)
### [Footer1](https://github.com/tommyjepsen/twblocks/blob/main/blocks/feature/footer1.tsx)

![](https://github.com/tommyjepsen/twblocks/blob/main/public/footer1.png?raw=true)

Expand Down
127 changes: 127 additions & 0 deletions app/blocks/blogs/blog1/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
"use client";

import { Blog1 } from "@/blocks/blog/blog1";
import { CopyCodeButton } from "@/components/copy-code-button";
import {
Breadcrumb,
BreadcrumbItem,
BreadcrumbLink,
BreadcrumbList,
BreadcrumbPage,
BreadcrumbSeparator,
} from "@/components/ui/breadcrumb";
import { Button } from "@/components/ui/button";
import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog";
import { Terminal } from "lucide-react";
import Link from "next/link";
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
import { vscDarkPlus } from "react-syntax-highlighter/dist/esm/styles/prism";

export default function Block() {
const code = `import { MoveRight } from "lucide-react";
import { Button } from "@/components/ui/button";
export const Blog1 = () => (
<div className="w-full py-20 lg:py-40">
<div className="container mx-auto flex flex-col gap-14">
<div className="flex w-full flex-col sm:flex-row sm:justify-between sm:items-center gap-8">
<h4 className="text-5xl tracking-tighter max-w-xl font-regular">
Latest articles
</h4>
<Button className="gap-4">
View all articles <MoveRight className="w-4 h-4" />
</Button>
</div>
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8">
<div className="flex flex-col gap-2 hover:opacity-75 cursor-pointer">
<div className="bg-muted rounded-md aspect-video mb-4"></div>
<h3 className="text-xl tracking-tight">Pay supplier invoices</h3>
<p className="text-muted-foreground text-base">
Our goal is to streamline SMB trade, making it easier and faster
than ever.
</p>
</div>
<div className="flex flex-col gap-2 hover:opacity-75 cursor-pointer">
<div className="bg-muted rounded-md aspect-video mb-4"></div>
<h3 className="text-xl tracking-tight">Pay supplier invoices</h3>
<p className="text-muted-foreground text-base">
Our goal is to streamline SMB trade, making it easier and faster
than ever.
</p>
</div>
<div className="flex flex-col gap-2 hover:opacity-75 cursor-pointer">
<div className="bg-muted rounded-md aspect-video mb-4"></div>
<h3 className="text-xl tracking-tight">Pay supplier invoices</h3>
<p className="text-muted-foreground text-base">
Our goal is to streamline SMB trade, making it easier and faster
than ever.
</p>
</div>
<div className="flex flex-col gap-2 hover:opacity-75 cursor-pointer">
<div className="bg-muted rounded-md aspect-video mb-4"></div>
<h3 className="text-xl tracking-tight">Pay supplier invoices</h3>
<p className="text-muted-foreground text-base">
Our goal is to streamline SMB trade, making it easier and faster
than ever.
</p>
</div>
</div>
</div>
</div>
);`;

return (
<div className="min-h-screen w-full flex flex-col">
<div className="bg-secondary mt-20 w-full">
<div className="container items-center text-secondary-foreground text-sm text-center py-4 flex flex-row justify-between">
<Breadcrumb>
<BreadcrumbList>
<BreadcrumbItem>
<BreadcrumbLink asChild>
<Link href="/">Blocks</Link>
</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbLink asChild>
<Link href="/#blogs">Blogs</Link>
</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbPage>Blog1</BreadcrumbPage>
</BreadcrumbItem>
</BreadcrumbList>
</Breadcrumb>
</div>
</div>
<div className="flex bg-background justify-center items-start flex-1">
<div className="w-full max-w-8xl relative">
<div className="absolute top-8 left-1/2 transform -translate-x-1/2 -translate-y-1/2 flex flex-row gap-2">
<CopyCodeButton code={code} />
<Dialog>
<DialogTrigger asChild>
<Button variant="outline" className="gap-2">
<Terminal className="w-4 h-4" />
Show code
</Button>
</DialogTrigger>
<DialogContent className="max-w-[800px]">
<SyntaxHighlighter
language="javascript"
className="rounded-md max-h-[70vh]"
style={vscDarkPlus}
>
{code}
</SyntaxHighlighter>
</DialogContent>
</Dialog>
</div>
<div className="rounded-md bg-background">
<Blog1 />
</div>
</div>
</div>
</div>
);
}
Loading

0 comments on commit e9c4e34

Please sign in to comment.