>;
3 | export default content;
4 | }
5 |
--------------------------------------------------------------------------------
/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": ".",
4 | "paths": {
5 | "~/*": ["./*"]
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/components/layout/styles/index.module.css:
--------------------------------------------------------------------------------
1 | .main {
2 | @apply min-h-screen;
3 | @media (min-width: 1000px) {
4 | width: 990px;
5 | }
6 | width: 600px;
7 | max-width: calc(100vw - 97px);
8 | }
9 |
--------------------------------------------------------------------------------
/components/shared/input/input.module.css:
--------------------------------------------------------------------------------
1 | .input {
2 | @apply bg-dark-lighter border-b-2 rounded-sm text-left;
3 | &:focus-within {
4 | label {
5 | @apply text-primary;
6 | }
7 | @apply border-primary;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/components/home-page/styles/tweet-box.module.css:
--------------------------------------------------------------------------------
1 | .actionbtn {
2 | @apply text-primary p-2 rounded-full;
3 | &:hover {
4 | @apply bg-primary bg-opacity-25;
5 | }
6 | &:focus {
7 | @apply outline-none bg-opacity-50;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "trailingComma": "es5",
3 | "useTabs": true,
4 | "semi": true,
5 | "singleQuote": true,
6 | "printWidth": 100,
7 | "bracketSpacing": true,
8 | "tabWidth": 1,
9 | "arrowParens": "avoid",
10 | "jsxBracketSameLine": true
11 | }
12 |
--------------------------------------------------------------------------------
/components/layout/styles/nav.module.css:
--------------------------------------------------------------------------------
1 | .link {
2 | @apply inline-block mb-4 cursor-pointer;
3 | @screen xl {
4 | @apply mb-3;
5 | }
6 | &:hover {
7 | > div {
8 | @apply bg-primary text-primary bg-opacity-25;
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/pages/404.tsx:
--------------------------------------------------------------------------------
1 | import { NextPage } from 'next';
2 | const PageNotFound: NextPage = () => {
3 | return 404 | This page could not be found.
;
4 | };
5 |
6 | export default PageNotFound;
7 |
--------------------------------------------------------------------------------
/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | webpack(config) {
3 | config.module.rules.push({
4 | test: /\.svg$/,
5 | issuer: {
6 | test: /\.(js|ts)x?$/,
7 | },
8 | use: ["@svgr/webpack"],
9 | });
10 |
11 | return config;
12 | },
13 | };
14 |
--------------------------------------------------------------------------------
/svgs/arrow-down.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Twitter Clone With NextJS, Tailwindcss and Typescript
2 |
3 | Well, so far only the landing page is cloned, but will add more pages when I get the time
4 |
5 | > If anything isn't written as good as it should be, please notify me, am still new to tailwindcss
6 |
7 | [Next.js](https://nextjs.org/)
8 | [Tailwindcss](https://tailwindcss.com/)
9 |
--------------------------------------------------------------------------------
/components/shared/center-content.tsx:
--------------------------------------------------------------------------------
1 | const CenterContent: React.FC = ({ children }) => {
2 | return (
3 |
4 |
9 | {children}
10 |
11 | );
12 | };
13 |
14 | export default CenterContent;
15 |
--------------------------------------------------------------------------------
/components/signup-page/singup-modal.module.css:
--------------------------------------------------------------------------------
1 | .modal {
2 | z-index: 51;
3 | @apply bg-dark max-h-screen w-screen h-screen pt-8;
4 | &:focus {
5 | @apply outline-none;
6 | }
7 | @screen sm {
8 | min-height: 600px;
9 | max-height: 600px;
10 | max-width: 600px;
11 | @apply rounded-xl pt-0;
12 | }
13 | }
14 | .overlay {
15 | @apply bg-white bg-opacity-15 fixed top-0 left-0 right-0 bottom-0 z-50;
16 | }
17 |
--------------------------------------------------------------------------------
/svgs/tweet.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/_app.tsx:
--------------------------------------------------------------------------------
1 | import Layout from '~/components/layout';
2 | import '~/css/tailwind.css';
3 | import '~/css/main.css';
4 | import Head from 'next/head';
5 |
6 | export default function MyApp({ pageProps, Component }: any) {
7 | const { hideLayout } = Component;
8 | return (
9 |
10 |
11 |
12 | Twitter
13 |
14 |
15 |
16 |
17 | );
18 | }
19 |
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | const purgecss = [
2 | "@fullhuman/postcss-purgecss",
3 | {
4 | content: ["./components/**/*.{js,ts,tsx}", "./pages/**/*.{js,ts,tsx}"],
5 | defaultExtractor: (content) => content.match(/[\w-/:]+(?
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |