Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/landing #23

Merged
merged 9 commits into from
Jun 14, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(web): implement the subscription to the newsletter
  • Loading branch information
tericcabrel committed Jun 11, 2022
commit a3ebd4c7faa7948b3f68f8f0540764aacb0b8643
3 changes: 3 additions & 0 deletions apps/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import http from 'http';

import { dbClient } from '@sharingan/database';
import express from 'express';

import { env } from './configs/env';
Expand All @@ -19,6 +20,8 @@ export const startServer = async () => {

httpServer
.listen(env.PORT, async () => {
await dbClient.$connect();

await loadData();

logger.info(`🚀 Server ready at ${env.HOST}:${env.PORT}${graphqlServer.graphqlPath}`);
Expand Down
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
},
"dependencies": {
"@apollo/client": "^3.5.10",
"@headlessui/react": "^1.6.4",
"classnames": "^2.3.1",
"graphql": "^16.3.0",
"next": "12.1.5",
Expand Down
206 changes: 55 additions & 151 deletions apps/web/src/components/home/feature-section.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
import CollectionIcon from '@/components/icons/collection';
import DocumentSearchIcon from '@/components/icons/document-search';
import EmbedIcon from '@/components/icons/embed';
import ExtensionIcon from '@/components/icons/extension';
import ImportIcon from '@/components/icons/import';
import ShareIcon from '@/components/icons/share';

const features = [
{
description: 'Organize your similar code snippets into folder the same way you manage your file on the computer.',
icon: <CollectionIcon />,
id: 'organize-snippets',
title: 'Organize your snippets',
},
{
description: 'Quickly find a code snippet in your whole directory and access it.',
icon: <DocumentSearchIcon />,
id: 'find-snippets',
title: 'Find your snippets',
},
{
description: 'You can easily import all your code snippets from GitHub Gist to keep them all in one place.',
icon: <ImportIcon />,
id: 'import-snippets',
title: 'Import from GitHub Gist',
},
{
description: 'Share your code snippets with others developers. Give them ability to interact and improve.',
icon: <ShareIcon />,
id: 'share-snippets',
title: 'Share your snippets',
},
{
description: 'For content creators, you can embed your snippet on a blog post or a post on social network.',
icon: <EmbedIcon />,
id: 'embed-snippets',
title: 'Embed your snippets',
},
{
description: 'Easily capture and save code snippets while you are browsing on the web.',
icon: <ExtensionIcon />,
id: 'browser-extensions',
title: 'Browser extensions',
},
];

const FeatureSection = () => {
return (
<div className="relative from-gray-50 to-gray-100">
Expand All @@ -10,161 +56,19 @@ const FeatureSection = () => {
bring your experience into a new level.
</p>
<div className="grid grid-cols-1 mt-12 gap-x-6 gap-y-12 sm:grid-cols-2 lg:mt-16 lg:grid-cols-3 lg:gap-x-8 lg:gap-y-12">
<div className="p-10 bg-white shadow-lg rounded-xl dark:bg-opacity-5 ">
<div>
<svg
xmlns="http:https://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
aria-hidden="true"
className="h-8 w-8 dark:text-white rounded-full p-1.5 dark:bg-white dark:bg-opacity-10 bg-black bg-opacity-5 text-black"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"
/>
</svg>
</div>
<div className="mt-4">
<h3 className="text-lg font-medium dark:text-white">Organize Snippets</h3>
<p className="mt-2 text-base font-medium text-gray-500 dark:text-gray-400">
Organize your similar code snippets into folder the same way you manage your file on the computer.
</p>
</div>
</div>
<div className="p-10 bg-white shadow-lg rounded-xl dark:bg-opacity-5 ">
<div>
<svg
xmlns="http:https://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
aria-hidden="true"
className="h-8 w-8 dark:text-white rounded-full p-1.5 dark:bg-white dark:bg-opacity-10 bg-black bg-opacity-5 text-black"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
d="M12 11c0 3.517-1.009 6.799-2.753 9.571m-3.44-2.04l.054-.09A13.916 13.916 0 008 11a4 4 0 118 0c0 1.017-.07 2.019-.203 3m-2.118 6.844A21.88 21.88 0 0015.171 17m3.839 1.132c.645-2.266.99-4.659.99-7.132A8 8 0 008 4.07M3 15.364c.64-1.319 1-2.8 1-4.364 0-1.457.39-2.823 1.07-4"
/>
</svg>
</div>
<div className="mt-4">
<h3 className="text-lg font-medium dark:text-white">Find your snippets</h3>
<p className="mt-2 text-base font-medium text-gray-500 dark:text-gray-400">
Quickly find a code snippet in your whole directory and access it.
</p>
</div>
</div>
<div className="p-10 bg-white shadow-lg rounded-xl dark:bg-opacity-5 ">
<div>
<svg
xmlns="http:https://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
aria-hidden="true"
className="h-8 w-8 dark:text-white rounded-full p-1.5 dark:bg-white dark:bg-opacity-10 bg-black bg-opacity-5 text-black"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"
/>
</svg>
</div>
<div className="mt-4">
<h3 className="text-lg font-medium dark:text-white">Import from GitHub Gist</h3>
<p className="mt-2 text-base font-medium text-gray-500 dark:text-gray-400">
You can easily import all your code snippets from GitHub Gist to keep them all in one place.
</p>
</div>
</div>
<div className="p-10 bg-white shadow-lg rounded-xl dark:bg-opacity-5 ">
<div>
<svg
xmlns="http:https://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
aria-hidden="true"
className="h-8 w-8 dark:text-white rounded-full p-1.5 dark:bg-white dark:bg-opacity-10 bg-black bg-opacity-5 text-black"
>
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M13 10V3L4 14h7v7l9-11h-7z" />
</svg>
</div>
<div className="mt-4">
<h3 className="text-lg font-medium dark:text-white">Share your snippets</h3>
<p className="mt-2 text-base font-medium text-gray-500 dark:text-gray-400">
Share your code snippets with others developers. Give them ability to interact and improve.
</p>
</div>
</div>
<div className="p-10 bg-white shadow-lg rounded-xl dark:bg-opacity-5 ">
<div>
<svg
xmlns="http:https://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
aria-hidden="true"
className="h-8 w-8 dark:text-white rounded-full p-1.5 dark:bg-white dark:bg-opacity-10 bg-black bg-opacity-5 text-black"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"
/>
</svg>
</div>
<div className="mt-4">
<h3 className="text-lg font-medium dark:text-white">Embed your snippets</h3>
<p className="mt-2 text-base font-medium text-gray-500 dark:text-gray-400">
For content creators, you can embed your snippet on a blog post or a post on social network.
</p>
</div>
</div>
<div className="p-10 bg-white shadow-lg rounded-xl dark:bg-opacity-5 ">
<div>
<svg
xmlns="http:https://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
aria-hidden="true"
className="h-8 w-8 dark:text-white rounded-full p-1.5 dark:bg-white dark:bg-opacity-10 bg-black bg-opacity-5 text-black"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
d="M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z"
/>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z"
/>
</svg>
</div>
<div className="mt-4">
<h3 className="text-lg font-medium dark:text-white">Browser extensions</h3>
<p className="mt-2 text-base font-medium text-gray-500 dark:text-gray-400">
Easily capture and save code snippets while you are browsing on the web.
</p>
{features.map((feature) => (
<div className="p-10 bg-white shadow-lg rounded-xl dark:bg-opacity-5" key={feature.id}>
<div>{feature.icon}</div>
<div className="mt-4">
<h3 className="text-lg font-medium dark:text-white">{feature.title}</h3>
<p className="mt-2 text-base font-medium text-gray-500 dark:text-gray-400">{feature.description}</p>
</div>
</div>
</div>
))}
</div>
</div>
</div>
);
};

export { FeatureSection };
export default FeatureSection;
2 changes: 1 addition & 1 deletion apps/web/src/components/home/hero-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ const HeroSection = () => {
);
};

export { HeroSection };
export default HeroSection;
52 changes: 0 additions & 52 deletions apps/web/src/components/home/newsletter-section.tsx

This file was deleted.

Loading