Openstatus www.openstatus.dev

๐Ÿ‘จโ€โš–๏ธ Some boring legal info (#176)

* ๐Ÿ‘จโ€โš–๏ธ

* ๐Ÿ›

* โœ๏ธ

* ๐Ÿ’… add layout

authored by

Thibault Le Ouay and committed by
GitHub
3009b055 c3671b1f

+228 -1
+2 -1
apps/web/contentlayer.config.ts
··· 2 2 import rehypeSlug from "rehype-slug"; 3 3 import remarkGfm from "remark-gfm"; 4 4 5 + import { LegalPost } from "./src/contentlayer/documents/legal"; 5 6 import { Post } from "./src/contentlayer/documents/post"; 6 7 import autolinkHeadings from "./src/contentlayer/plugins/autolink-headings"; 7 8 import prettyCode from "./src/contentlayer/plugins/pretty-code"; 8 9 9 10 export default makeSource({ 10 11 contentDirPath: "src/content/", 11 - documentTypes: [Post], 12 + documentTypes: [Post, LegalPost], 12 13 mdx: { 13 14 remarkPlugins: [remarkGfm], 14 15 rehypePlugins: [rehypeSlug, prettyCode, autolinkHeadings],
+11
apps/web/src/app/legal/[slug]/layout.tsx
··· 1 + import * as React from "react"; 2 + 3 + import { MarketingLayout } from "@/components/layout/marketing-layout"; 4 + 5 + export default function BlogLayout({ 6 + children, 7 + }: { 8 + children: React.ReactNode; 9 + }) { 10 + return <MarketingLayout>{children}</MarketingLayout>; 11 + }
+40
apps/web/src/app/legal/[slug]/page.tsx
··· 1 + import type { Metadata } from "next"; 2 + import { notFound } from "next/navigation"; 3 + import { allLegalPosts } from "contentlayer/generated"; 4 + 5 + import { Mdx } from "@/components/content/mdx"; 6 + import { Shell } from "@/components/dashboard/shell"; 7 + import { BackButton } from "@/components/layout/back-button"; 8 + 9 + export const dynamic = "force-static"; 10 + 11 + export async function generateStaticParams() { 12 + return allLegalPosts.map((post) => ({ 13 + slug: post.slug, 14 + })); 15 + } 16 + 17 + export default function PostPage({ params }: { params: { slug: string } }) { 18 + const post = allLegalPosts.find((post) => post.slug === params.slug); 19 + 20 + if (!post) { 21 + notFound(); 22 + } 23 + 24 + // TODO: add author.avatar and author.url 25 + return ( 26 + <> 27 + <BackButton href="/" /> 28 + <Shell className="sm:py-8 md:py-12"> 29 + <article className="grid gap-8"> 30 + <div className="mx-auto grid w-full max-w-prose gap-3"> 31 + <h1 className="font-cal mb-5 text-3xl">{post.title}</h1> 32 + </div> 33 + <div className="mx-auto max-w-prose"> 34 + <Mdx code={post.body.code} /> 35 + </div> 36 + </article> 37 + </Shell> 38 + </> 39 + ); 40 + }
+11
apps/web/src/components/layout/footer.tsx
··· 1 + import Link from "next/link"; 2 + 1 3 export function Footer() { 2 4 return ( 3 5 <footer className="text-muted-foreground mx-auto grid gap-4 text-sm"> ··· 31 33 GitHub 32 34 </a> 33 35 </p> 36 + <div className="flex items-center justify-center space-x-2"> 37 + <Link href="/legal/terms" className="text-xs"> 38 + Terms 39 + </Link>{" "} 40 + <span>{"/"}</span> 41 + <Link href="/legal/tos" className="text-xs"> 42 + Privacy 43 + </Link> 44 + </div> 34 45 </footer> 35 46 ); 36 47 }
+41
apps/web/src/content/legal/privacy.mdx
··· 1 + --- 2 + title: Privacy Policy 3 + updatedAt: 2023-05-29 4 + --- 5 + 6 + Welcome to [openstatus.dev](/) (the "Site"), hosted by OpenStatus ("OpenStatus", 7 + "we", "us", and/or "our"). OpenStatus provides a platform for creating and 8 + managing short links (the "Services")โ€‹1โ€‹. We value your privacy and are 9 + dedicated to protecting your personal data. This Privacy Policy covers how we 10 + collect, handle, and disclose personal data on our Platform. 11 + 12 + If you have any questions, comments, or concerns regarding this Privacy Policy, 13 + our data practices, or would like to exercise your rights, do not hesitate to 14 + contact us. 15 + 16 + ## To Whom Does This Policy Apply 17 + 18 + This Privacy Policy applies to customers and site visitors. Each customer is 19 + responsible for posting its own terms, conditions, and privacy policies, and 20 + ensuring compliance with all applicable laws and regulations. 21 + 22 + ## Changes To This Privacy Policy 23 + 24 + This Privacy Policy may change from time to time, as our Platform and our 25 + business may change. Your continued use of the Platform after any changes to 26 + this Privacy Policy indicates your agreement with the terms of the revised 27 + Privacy Policy. 28 + 29 + ## What Information Do We Collect 30 + 31 + We collect information directly from you when you provide it to us explicitly on 32 + our Site. We do not use third-party cookies on our Site. 33 + 34 + ## What We Use Your Information For 35 + 36 + We use your information to provide our Services, to improve our Platform, to 37 + understand how you use our Platform, and to communicate with you. 38 + 39 + ## How To Contact Us 40 + 41 + For privacy-related questions, please contact us at privacy@openstatus.dev.
+99
apps/web/src/content/legal/terms.mdx
··· 1 + --- 2 + title: Terms of Service 3 + updatedAt: 2023-05-29 4 + --- 5 + 6 + Subject to these Terms of Service (this "Agreement"), [openstatus.dev](/) 7 + ("OpenStatus", "we", "us" and/or "our") provides access to OpenStatus's cloud 8 + platform as a service (collectively, the "Services"). By using or accessing the 9 + Services, you acknowledge that you have read, understand, and agree to be bound 10 + by this Agreement. 11 + 12 + If you are entering into this Agreement on behalf of a company, business or 13 + other legal entity, you represent that you have the authority to bind such 14 + entity to this Agreement, in which case the term "you" shall refer to such 15 + entity. If you do not have such authority, or if you do not agree with this 16 + Agreement, you must not accept this Agreement and may not use the Services. 17 + 18 + ## 1. Acceptance of Terms 19 + 20 + By signing up and using the services provided by OpenStatus (referred to as the 21 + "Service"), you are agreeing to be bound by the following terms and conditions 22 + ("Terms of Service"). The Service is owned and operated by OpenStatus ("Us", 23 + "We", or "Our"). 24 + 25 + ## 2. Description of Service 26 + 27 + OpenStatus provides an open source monitoring and status page tool. ("the 28 + Product"). The Product is accessible at openstatus.dev and other domains and 29 + subdomains controlled by Us (collectively, "the Website"). 30 + 31 + ## 3. Fair Use 32 + 33 + You are responsible for your use of the Service and for any content that you 34 + post or transmit through the Service. You may not use the Service for any 35 + purpose that is illegal or infringes upon the rights of others. 36 + 37 + We reserve the right to suspend or terminate your access to the Service if we 38 + determine, in our sole discretion, that you have violated these Terms of 39 + Service, including but not limited to, adding phishing links, spam links, scam 40 + links, or other inappropriate or illegal content. 41 + 42 + ## 4. Intellectual Property Rights 43 + 44 + You acknowledge and agree that the Service and its entire contents, features, 45 + and functionality, including but not limited to all information, software, code, 46 + text, displays, graphics, photographs, video, audio, design, presentation, 47 + selection, and arrangement, are owned by Us, our licensors, or other providers 48 + of such material and are protected by United States and international copyright, 49 + trademark, patent, trade secret, and other intellectual property or proprietary 50 + rights laws. 51 + 52 + ## 5. Changes to these Terms 53 + 54 + We reserve the right to revise and update these Terms of Service from time to 55 + time in our sole discretion. All changes are effective immediately when we post 56 + them, and apply to all access to and use of the Website thereafter. Your 57 + continued use of the Website following the posting of revised Terms of Service 58 + means that you accept and agree to the changes. 59 + 60 + ## 6. Contact Information 61 + 62 + Questions or comments about the Website or these Terms of Service may be 63 + directed to our support team at support@openstatus.dev. 64 + 65 + ## 7. Disclaimer of Warranties 66 + 67 + THE SERVICE AND ITS CONTENT ARE PROVIDED ON AN "AS IS" AND "AS AVAILABLE" BASIS 68 + WITHOUT ANY WARRANTIES OF ANY KIND. WE DISCLAIM ALL WARRANTIES, INCLUDING, BUT 69 + NOT LIMITED TO, THE WARRANTY OF TITLE, MERCHANTABILITY, NON-INFRINGEMENT OF 70 + THIRD PARTIESโ€™ RIGHTS, AND FITNESS FOR PARTICULAR PURPOSE. 71 + 72 + ## 8. Limitation of Liability 73 + 74 + IN NO EVENT WILL WE, OUR AFFILIATES OR THEIR LICENSORS, SERVICE PROVIDERS, 75 + EMPLOYEES, AGENTS, OFFICERS OR DIRECTORS BE LIABLE FOR DAMAGES OF ANY KIND, 76 + UNDER ANY LEGAL THEORY, ARISING OUT OF OR IN CONNECTION WITH YOUR USE, OR 77 + INABILITY TO USE, THE WEBSITE, THE SERVICE, ANY WEBSITES LINKED TO IT, ANY 78 + CONTENT ON THE WEBSITE OR SUCH OTHER WEBSITES, INCLUDING ANY DIRECT, INDIRECT, 79 + SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES. 80 + 81 + ## 9. Governing Law and Jurisdiction 82 + 83 + These Terms of Service and any dispute or claim arising out of or related to 84 + them, their subject matter or their formation (in each case, including 85 + non-contractual disputes or claims) shall be governed by and construed in 86 + accordance with the internal laws of France without giving effect to any choice 87 + or conflict of law provision or rule. Any legal suit, action, or proceeding 88 + arising out of, or related to, these Terms of Service or the Website shall be 89 + instituted exclusively in the federal courts of France. 90 + 91 + --- 92 + 93 + By using OpenStatus , you acknowledge that you have read these Terms of Service, 94 + understood them, and agree to be bound by them. If you do not agree to these 95 + Terms of Service, you are not authorized to use the Service. We reserve the 96 + right to change these Terms of Service at any time, so please review them 97 + frequently. 98 + 99 + Thank you for using OpenStatus!
+23
apps/web/src/contentlayer/documents/legal.ts
··· 1 + import { defineDocumentType } from "contentlayer/source-files"; 2 + 3 + export const LegalPost = defineDocumentType(() => ({ 4 + name: "LegalPost", 5 + filePathPattern: `legal/*.mdx`, 6 + contentType: "mdx", 7 + fields: { 8 + title: { 9 + type: "string", 10 + required: true, 11 + }, 12 + updatedAt: { 13 + type: "string", 14 + required: true, 15 + }, 16 + }, 17 + computedFields: { 18 + slug: { 19 + type: "string", 20 + resolve: (post) => post._raw.sourceFileName.replace(/\.mdx$/, ""), 21 + }, 22 + }, 23 + }));
+1
apps/web/src/middleware.ts
··· 55 55 "/api/checker/cron/10m", 56 56 "/blog", 57 57 "/blog/(.*)", 58 + "/legal/(.*)", 58 59 "/discord", 59 60 "/github", 60 61 ],