-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from motionly-video/dev
Dev
- Loading branch information
Showing
155 changed files
with
2,048 additions
and
2,215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,11 @@ | |
"^build" | ||
] | ||
}, | ||
"turbo": { | ||
"dependsOn": [ | ||
"^build" | ||
] | ||
}, | ||
"start": { | ||
"dependsOn": [ | ||
"build" | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Page } from "../layout"; | ||
|
||
export const blog: Page = { | ||
id: "blog", | ||
title: "Blog", | ||
pages: [ | ||
{ | ||
id: "first", | ||
title: "First post", | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Hello world | ||
|
||
This is the first blog post. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Page } from "../layout"; | ||
|
||
export const docs: Page = { | ||
id: "docs", | ||
title: "Docs", | ||
pages: [ | ||
{ | ||
id: "player", | ||
title: "Player", | ||
pages: [ | ||
{ | ||
id: "usage", | ||
title: "Usage", | ||
}, | ||
], | ||
}, | ||
], | ||
}; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
"use client"; | ||
|
||
import Link from "next/link"; | ||
import { usePathname } from "next/navigation"; | ||
import { ReactNode } from "react"; | ||
import Error from "next/error"; | ||
import { blog } from "./blog"; | ||
import { docs } from "./docs"; | ||
import { legal } from "./legal"; | ||
import { MdOutlineArrowForwardIos } from "react-icons/md"; | ||
import { useState } from "react"; | ||
|
||
export type Page = { | ||
id: string; | ||
title: string; | ||
pages?: Page[]; | ||
}; | ||
|
||
const collections: Page[] = [blog, docs, legal]; | ||
|
||
export default function MDXLayout({ children }: { children: ReactNode }) { | ||
const pathname = usePathname(); | ||
const paths = pathname?.split("/").filter((x) => x); | ||
const collection = collections.find((c) => c.id === paths?.[0]); | ||
if (!collection || !paths) return <Error statusCode={404} />; | ||
|
||
return ( | ||
<div className="grid grid-cols-4 md:grid-cols-5 gap-4 px-2"> | ||
<div className="hidden md:flex flex-col w-full space-y-1"> | ||
{collection.pages?.map((page) => ( | ||
<MenuItem key={page.id} {...page} parents={`/${collection.id}`} /> | ||
))} | ||
</div> | ||
<div className="col-span-4 space-y-3"> | ||
<div className="text-sm breadcrumbs"> | ||
<ul> | ||
<BreadCrumb page={collection} paths={paths} /> | ||
</ul> | ||
</div> | ||
<div className="prose md:prose-lg mb-10">{children}</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
const BreadCrumb = ({ | ||
paths, | ||
page, | ||
i = 0, | ||
}: { | ||
page: Page; | ||
paths: string[]; | ||
i?: number; | ||
}) => { | ||
const next = page.pages?.find((p) => p.id === paths[i + 1]); | ||
return ( | ||
<> | ||
<li> | ||
{i !== paths.length - 1 ? ( | ||
<Link href={`/${paths.slice(0, i + 1).join("/")}`} className=""> | ||
{page.title} | ||
</Link> | ||
) : ( | ||
<p className="text-primary">{page.title}</p> | ||
)} | ||
</li> | ||
{next && <BreadCrumb page={next} paths={paths} i={i + 1} />} | ||
</> | ||
); | ||
}; | ||
|
||
const MenuItem = ({ | ||
id, | ||
title, | ||
pages, | ||
parents, | ||
}: Page & { parents: string }) => { | ||
const url = `${parents}/${id}`; | ||
const pathname = usePathname(); | ||
const isSelected = pathname === url; | ||
const [open, setOpen] = useState(true); | ||
return ( | ||
<div className="flex flex-col space-y-1"> | ||
<div | ||
className={`w-full bg-opacity-10 rounded-md duration-150 flex justify-between items-center px-2 ${ | ||
isSelected | ||
? "bg-primary text-primary" | ||
: "hover:bg-base-content hover:bg-opacity-10" | ||
}`} | ||
> | ||
<Link | ||
className="h-full w-full py-1 opacity-90" | ||
href={url} | ||
onClick={() => isSelected && setOpen(!open)} | ||
> | ||
{title} | ||
</Link> | ||
{pages && ( | ||
<MdOutlineArrowForwardIos | ||
onClick={() => setOpen(!open)} | ||
className={`text-sm duration-200 cursor-pointer ${ | ||
open ? "rotate-90" : "" | ||
}`} | ||
/> | ||
)} | ||
</div> | ||
{open && pages && ( | ||
<div className="flex"> | ||
<div className="w-6 flex justify-center"> | ||
<div className="bg-base-content bg-opacity-20 w-[1px] h-full " /> | ||
</div> | ||
<div className="w-full"> | ||
{pages?.map((page) => ( | ||
<MenuItem key={page.id} {...page} parents={url} /> | ||
))} | ||
</div> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
}; |
5 changes: 5 additions & 0 deletions
5
websites/client/pages/legal/cookie.mdx → .../app/(layout)/(mdx)/legal/cookie/page.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Page } from "../layout"; | ||
|
||
export const legal: Page = { | ||
id: "legal", | ||
title: "Legal", | ||
pages: [ | ||
{ | ||
id: "terms", | ||
title: "Terms and Conditions", | ||
}, | ||
{ | ||
id: "privacy", | ||
title: "Privacy Policy", | ||
}, | ||
{ | ||
id: "refund", | ||
title: "Refund Policy", | ||
}, | ||
{ | ||
id: "cookie", | ||
title: "Cookie Policy", | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Legal |
5 changes: 5 additions & 0 deletions
5
websites/client/pages/legal/privacy.mdx → ...app/(layout)/(mdx)/legal/privacy/page.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
websites/client/pages/legal/refund.mdx → .../app/(layout)/(mdx)/legal/refund/page.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
websites/client/pages/legal/terms.mdx → ...t/app/(layout)/(mdx)/legal/terms/page.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
return children; | ||
} |
Oops, something went wrong.
384e8d0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
motionly – ./
asius.vercel.app
motionly.video
www.motionly.video
www.asius.ee
app.asius.dev
www.asius.dev
app.asius.vercel.app
app.asius.ee
asius.ee
asius.dev
karolinossip.vercel.app
motionly-motionly.vercel.app
motionly-git-main-motionly.vercel.app