Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
FranciscoMoretti committed Oct 6, 2024
1 parent 6289520 commit caea4f1
Show file tree
Hide file tree
Showing 9 changed files with 357 additions and 20 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

A powerful suite of tools for downloading, caching, and converting Notion content to Markdown.

![Download Notion content](apps/www/app/opengraph-image.png)

## Documentation

[Documentation](https://downloader.franciscomoretti.com/docs/)
Visit [https://downloader.franciscomoretti.com/docs](https://downloader.franciscomoretti.com/docs/) to view the documentation.

## Contributing

Expand Down
15 changes: 12 additions & 3 deletions apps/www/app/(app)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import Image from "next/image"
import Link from "next/link"

import { siteConfig } from "@/config/site"
import { AnimatedBeam } from "@/components/ui/animated-beam"
import { Button } from "@/components/ui/button"
import { Announcement } from "@/components/announcement"
import { DownloadFlow } from "@/components/download-flow"
import {
PageActions,
PageHeader,
Expand All @@ -13,7 +15,7 @@ import {

export default function IndexPage() {
return (
<div className="container relative">
<div className="container relative ">
<PageHeader>
<Announcement />
<PageHeaderHeading>
Expand All @@ -39,16 +41,23 @@ export default function IndexPage() {
</PageActions>
</PageHeader>

<section className="block">
<section className="py-10 flex flex-col gap-4">
<h2 className="text-2xl font-bold">Features</h2>
<ul className="list-disc pl-6 space-y-2">
<li>Download Notion pages and databases to Markdown files</li>
<li>Download images, files, and other assets</li>
<li>Download images, videos, pdfs, audio, and files</li>
<li>Customize the output directory structure and file naming</li>
<li>Automatically sync changes from Notion</li>
<li>Flexible caching options to optimize performance</li>
</ul>
</section>

<section className="py-10 flex flex-col gap-4">
<h2 className="text-2xl font-bold">
Download and convert all your Notion content
</h2>
<DownloadFlow />
</section>
</div>
)
}
Binary file added apps/www/app/opengraph-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
117 changes: 117 additions & 0 deletions apps/www/components/download-flow.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
"use client"

import React, { forwardRef, useRef } from "react"
import { AudioLines, FileText, Image, Text, Video } from "lucide-react"

import { cn } from "@/lib/utils"
import { AnimatedBeam } from "@/components/ui/animated-beam"

import { Icons } from "./icons"

const Circle = forwardRef<
HTMLDivElement,
{ className?: string; children?: React.ReactNode }
>(({ className, children }, ref) => {
return (
<div
ref={ref}
className={cn(
"z-10 flex size-12 items-center justify-center rounded-full border-2 bg-white p-3 shadow-[0_0_20px_-12px_rgba(0,0,0,0.8)]",
className
)}
>
{children}
</div>
)
})

Circle.displayName = "Circle"

export function DownloadFlow({ className }: { className?: string }) {
const containerRef = useRef<HTMLDivElement>(null)
const div1Ref = useRef<HTMLDivElement>(null)
const div2Ref = useRef<HTMLDivElement>(null)
const div3Ref = useRef<HTMLDivElement>(null)
const div4Ref = useRef<HTMLDivElement>(null)
const div5Ref = useRef<HTMLDivElement>(null)
const div6Ref = useRef<HTMLDivElement>(null)
const div7Ref = useRef<HTMLDivElement>(null)

return (
<div
className={cn(
"relative flex w-full items-center justify-center overflow-hidden rounded-lg border bg-background p-10 md:shadow-xl",
className
)}
ref={containerRef}
>
<div className="flex size-full max-w-lg flex-row items-stretch justify-between gap-10">
<div className="flex flex-col justify-center">
<Circle ref={div7Ref}>
<Icons.notion />
</Circle>
</div>
<div className="flex flex-col justify-center">
<Circle ref={div6Ref} className="size-16">
<Icons.logo />
</Circle>
</div>
<div className="flex flex-col justify-center gap-2">
<Circle ref={div1Ref}>
<Text className="text-black" />
</Circle>
<Circle ref={div2Ref}>
<Image className="text-black" />
</Circle>
<Circle ref={div3Ref}>
<Video className="text-black" />
</Circle>
<Circle ref={div4Ref}>
<AudioLines className="text-black" />
</Circle>
<Circle ref={div5Ref}>
<FileText className="text-black" />
</Circle>
</div>
</div>

{/* AnimatedBeams */}
<AnimatedBeam
containerRef={containerRef}
fromRef={div1Ref}
toRef={div6Ref}
duration={3}
/>
<AnimatedBeam
containerRef={containerRef}
fromRef={div2Ref}
toRef={div6Ref}
duration={3}
/>
<AnimatedBeam
containerRef={containerRef}
fromRef={div3Ref}
toRef={div6Ref}
duration={3}
/>
<AnimatedBeam
containerRef={containerRef}
fromRef={div4Ref}
toRef={div6Ref}
duration={3}
/>
<AnimatedBeam
containerRef={containerRef}
fromRef={div5Ref}
toRef={div6Ref}
duration={3}
/>
<AnimatedBeam
containerRef={containerRef}
fromRef={div6Ref}
toRef={div7Ref}
duration={3}
/>
</div>
)
}
23 changes: 22 additions & 1 deletion apps/www/components/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type IconProps = React.HTMLAttributes<SVGElement>

export const Icons = {
logo: (props: IconProps) => (
<FolderDown {...props} className="text-primary-foreground" />
<FolderDown {...props} className="text-primary" />
),
twitter: (props: IconProps) => (
<svg
Expand Down Expand Up @@ -43,6 +43,27 @@ export const Icons = {
<path d="M13.966 22.624l-1.69-4.281H8.122l3.892-9.144 5.662 13.425zM8.884 1.376H0v21.248zm15.116 0h-8.884L24 22.624Z" />
</svg>
),
notion: (props: IconProps) => (
<svg
width="100"
height="100"
viewBox="0 0 100 100"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
d="M6.017 4.313l55.333 -4.087c6.797 -0.583 8.543 -0.19 12.817 2.917l17.663 12.443c2.913 2.14 3.883 2.723 3.883 5.053v68.243c0 4.277 -1.553 6.807 -6.99 7.193L24.467 99.967c-4.08 0.193 -6.023 -0.39 -8.16 -3.113L3.3 79.94c-2.333 -3.113 -3.3 -5.443 -3.3 -8.167V11.113c0 -3.497 1.553 -6.413 6.017 -6.8z"
fill="#ffffff"
/>
<path
d="M61.35 0.227l-55.333 4.087C1.553 4.7 0 7.617 0 11.113v60.66c0 2.723 0.967 5.053 3.3 8.167l13.007 16.913c2.137 2.723 4.08 3.307 8.16 3.113l64.257 -3.89c5.433 -0.387 6.99 -2.917 6.99 -7.193V20.64c0 -2.21 -0.873 -2.847 -3.443 -4.733L74.167 3.143c-4.273 -3.107 -6.02 -3.5 -12.817 -2.917zM25.92 19.523c-5.247 0.353 -6.437 0.433 -9.417 -1.99L8.927 11.507c-0.77 -0.78 -0.383 -1.753 1.557 -1.947l53.193 -3.887c4.467 -0.39 6.793 1.167 8.54 2.527l9.123 6.61c0.39 0.197 1.36 1.36 0.193 1.36l-54.933 3.307 -0.68 0.047zM19.803 88.3V30.367c0 -2.53 0.777 -3.697 3.103 -3.893L86 22.78c2.14 -0.193 3.107 1.167 3.107 3.693v57.547c0 2.53 -0.39 4.67 -3.883 4.863l-60.377 3.5c-3.493 0.193 -5.043 -0.97 -5.043 -4.083zm59.6 -54.827c0.387 1.75 0 3.5 -1.75 3.7l-2.91 0.577v42.773c-2.527 1.36 -4.853 2.137 -6.797 2.137 -3.107 0 -3.883 -0.973 -6.21 -3.887l-19.03 -29.94v28.967l6.02 1.363s0 3.5 -4.857 3.5l-13.39 0.777c-0.39 -0.78 0 -2.723 1.357 -3.11l3.497 -0.97v-38.3L30.48 40.667c-0.39 -1.75 0.58 -4.277 3.3 -4.473l14.367 -0.967 19.8 30.327v-26.83l-5.047 -0.58c-0.39 -2.143 1.163 -3.7 3.103 -3.89l13.4 -0.78z"
fill="#000000"
fillRule="evenodd"
clipRule="evenodd"
/>
</svg>
),
npm: (props: IconProps) => (
<svg viewBox="0 0 24 24" {...props}>
<path
Expand Down
Loading

0 comments on commit caea4f1

Please sign in to comment.