Skip to content

Commit

Permalink
fix(SignIn): remove unexpected padding y
Browse files Browse the repository at this point in the history
  • Loading branch information
devrsi0n committed Aug 15, 2023
1 parent c8a26fe commit 114a5a4
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 148 deletions.
3 changes: 2 additions & 1 deletion apps/main/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"types": ["jest", "node"],
"paths": {
"$/*": ["src/*"]
}
},
"jsx": "preserve"
},
"exclude": ["node_modules", ".next"],
"include": ["typings/**/*.d.ts", "src/**/*.ts", "src/**/*.tsx"]
Expand Down
1 change: 0 additions & 1 deletion packages/ui/src/blocks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export * from './faqs';
export * from './features';
export * from './footer';
export * from './header';
export * from './integrate-guide';
export * from './layout';
export * from './like-action';
export * from './mdx-components';
Expand Down

This file was deleted.

72 changes: 0 additions & 72 deletions packages/ui/src/blocks/integrate-guide/get-started.tsx

This file was deleted.

1 change: 0 additions & 1 deletion packages/ui/src/blocks/integrate-guide/index.ts

This file was deleted.

36 changes: 0 additions & 36 deletions packages/ui/src/blocks/integrate-guide/integrate-guide.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions packages/ui/src/pages/auth/sign-in.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';

import { SiteLayout, SignInForm } from '../../blocks';
import { SignInForm, SiteLayout } from '../../blocks';

export function SignInPage(): JSX.Element {
const [allowAnonymous, setAllowAnonymous] = React.useState(false);
Expand All @@ -13,7 +13,7 @@ export function SignInPage(): JSX.Element {
<SiteLayout
title="Sign in"
styles={{
container: `mx-2 md:mx-0 py-0`,
container: `mx-2 md:mx-0 !py-0`,
}}
hideFooter
hideHeader
Expand Down
78 changes: 72 additions & 6 deletions packages/ui/src/pages/dashboard/project/get-started.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,76 @@
import { getAppURL } from '@chirpy-dev/utils';
import * as React from 'react';

import { SiteLayout } from '../../../blocks';
import {
GetStartedBody,
GetStarttedTitle,
} from '../../../blocks/integrate-guide/get-started';
import { PageTitle, SiteLayout } from '../../../blocks';
import { Code } from '../../../components/code';
import { Heading } from '../../../components/heading';
import { Text } from '../../../components/text';

export function GetStarttedTitle(): React.ReactNode {
return (
<div>
<Heading as="h2" className="mb-3 font-bold !leading-none">
Get Started
</Heading>
<Text variant="secondary" className="font-normal">
Integrate the widget into your website to start engaging with your
users.
</Text>
</div>
);
}

export function GetStartedBody({ domain }: { domain: string }) {
return (
<div className="flex flex-col gap-4">
<Heading as="h3">Usage on any website</Heading>
<div className="flex flex-col gap-2">
<Text variant="secondary">
{`Chirpy is not just your average comment system - it's a feature-packed tool with powerful `}
<strong>built-in analytics</strong>
{`. With Chirpy, you can seamlessly integrate the analytics service and save time and effort.`}
</Text>
<Text variant="secondary">
{`Getting started is a breeze. Simply follow these steps:`}
</Text>
</div>
<ol className="flex list-outside list-decimal flex-col gap-6 ps-4">
<li>
<div className="space-y-2">
<Text variant="secondary">
{`Copy the script provided below and paste it into the body of your HTML, make sure it will be loaded on every page.`}
</Text>
<Code language="html">
{`<script defer src="${getAppURL()}/bootstrapper.js" data-chirpy-domain="${domain}"></script>`}
</Code>
</div>
</li>
<li>
<div className="space-y-2">
<Text variant="secondary">
{`Then, paste this html element to any page that should render the comment widget:`}
</Text>
<Code language="html">{`<!--
The widget follows "system" settings for light/dark mode
by default, but you can manually select "light" or "dark"
mode for a consistent display
-->
<div
data-chirpy-theme="system"
data-chirpy-comment="true"
id="chirpy-comment"
></div>`}</Code>
</div>
</li>
<li>
<Text variant="secondary">
{`🎉 Congratulations! The comment widget is ready to go live.`}
</Text>
</li>
</ol>
</div>
);
}

export type GetStartedProps = {
domain: string;
Expand All @@ -14,7 +80,7 @@ export function GetStarted(props: GetStartedProps): JSX.Element {
return (
<SiteLayout title="Get Started">
<div className="flex flex-col gap-6">
<GetStarttedTitle />
<PageTitle>Get started</PageTitle>
<GetStartedBody domain={props.domain} />
</div>
</SiteLayout>
Expand Down

1 comment on commit 114a5a4

@vercel
Copy link

@vercel vercel bot commented on 114a5a4 Aug 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.