├── .eslintrc.json ├── .gitignore ├── README.md ├── app ├── (general) │ ├── about │ │ └── page.tsx │ ├── contact │ │ └── page.tsx │ ├── layout.tsx │ └── pricing │ │ └── page.tsx ├── favicon.ico ├── globals.css ├── layout.tsx └── page.tsx ├── components ├── active-link │ ├── ActiveLink.module.css │ └── ActiveLink.tsx ├── index.ts └── navbar │ └── Navbar.tsx ├── next.config.js ├── package-lock.json ├── package.json ├── postcss.config.js ├── public ├── next.svg └── vercel.svg ├── tailwind.config.js └── tsconfig.json /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env*.local 29 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). 2 | 3 | ## Getting Started 4 | 5 | First, run the development server: 6 | 7 | ```bash 8 | npm run dev 9 | # or 10 | yarn dev 11 | # or 12 | pnpm dev 13 | ``` 14 | 15 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 16 | 17 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. 18 | 19 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. 20 | 21 | ## Learn More 22 | 23 | To learn more about Next.js, take a look at the following resources: 24 | 25 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 26 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. 27 | 28 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 29 | 30 | ## Deploy on Vercel 31 | 32 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. 33 | 34 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 35 | -------------------------------------------------------------------------------- /app/(general)/about/page.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | 3 | 4 | export const metadata: Metadata = { 5 | title: 'SEO Title', 6 | description: 'SEO Description', 7 | keywords: ['About Page','Fernando','información','...'], 8 | }; 9 | 10 | 11 | export default function AboutPage() { 12 | return ( 13 | About Page 14 | ) 15 | } 16 | -------------------------------------------------------------------------------- /app/(general)/contact/page.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | 3 | export const metadata: Metadata = { 4 | title: 'Contact Page', 5 | description: 'Esta es la página de contacto de la empresa', 6 | }; 7 | 8 | 9 | export default function ContactPage() { 10 | return ( 11 | <> 12 | Contact Page 13 | 14 | ) 15 | } 16 | -------------------------------------------------------------------------------- /app/(general)/layout.tsx: -------------------------------------------------------------------------------- 1 | import { Navbar } from "@/components"; 2 | 3 | 4 | 5 | export default function GeneralLayout({ 6 | children 7 | }: { 8 | children: React.ReactNode; 9 | }) { 10 | return ( 11 | <> 12 | 13 |
14 | Hola Mundo 15 | { children } 16 |
17 | 18 | ); 19 | } -------------------------------------------------------------------------------- /app/(general)/pricing/page.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | 3 | 4 | 5 | export const metadata: Metadata = { 6 | title: 'Pricing Page', 7 | description: 'Esta es la página de precios de mi servicio', 8 | }; 9 | 10 | export default function PricingPage() { 11 | return ( 12 | <> 13 | Pricing Page 14 | 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Klerith/next-first-steps-dev/aba9a260f3379fd8a0552b7a54c500ba9f783673/app/favicon.ico -------------------------------------------------------------------------------- /app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | --foreground-rgb: 0, 0, 0; 7 | --background-start-rgb: 214, 219, 220; 8 | --background-end-rgb: 255, 255, 255; 9 | } 10 | 11 | @media (prefers-color-scheme: dark) { 12 | :root { 13 | --foreground-rgb: 255, 255, 255; 14 | --background-start-rgb: 0, 0, 0; 15 | --background-end-rgb: 0, 0, 0; 16 | } 17 | } 18 | 19 | body { 20 | color: rgb(var(--foreground-rgb)); 21 | background: linear-gradient( 22 | to bottom, 23 | transparent, 24 | rgb(var(--background-end-rgb)) 25 | ) 26 | rgb(var(--background-start-rgb)); 27 | } 28 | -------------------------------------------------------------------------------- /app/layout.tsx: -------------------------------------------------------------------------------- 1 | import './globals.css' 2 | import { Inter } from 'next/font/google' 3 | 4 | const inter = Inter({ subsets: ['latin'] }) 5 | 6 | export const metadata = { 7 | title: "Fernando's Home Page", 8 | description: 'Generated with love by Vercel', 9 | } 10 | 11 | export default function RootLayout({ children }: { children: React.ReactNode }) { 12 | return ( 13 | 14 | 15 | {children} 16 | 17 | 18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /app/page.tsx: -------------------------------------------------------------------------------- 1 | import Link from 'next/link'; 2 | 3 | export default function HomePage() { 4 | return ( 5 |
6 | 7 | Hola Mundo 8 | 9 | 10 | About Page 11 |
12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /components/active-link/ActiveLink.module.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | .link { 4 | @apply hover:underline hover:text-blue-400 mr-2 transition-all; 5 | } 6 | 7 | .active-link { 8 | @apply text-blue-500; 9 | } -------------------------------------------------------------------------------- /components/active-link/ActiveLink.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | 4 | import Link from 'next/link'; 5 | import { usePathname } from 'next/navigation'; 6 | 7 | import style from './ActiveLink.module.css'; 8 | 9 | interface Props { 10 | path: string; 11 | text: string; 12 | } 13 | 14 | 15 | export const ActiveLink = ({ path, text }: Props ) => { 16 | 17 | const pathName = usePathname(); 18 | 19 | return ( 20 | 23 | { text } 24 | 25 | ) 26 | } 27 | -------------------------------------------------------------------------------- /components/index.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | export * from './navbar/Navbar'; 4 | 5 | // Client components 6 | export { ActiveLink } from './active-link/ActiveLink'; -------------------------------------------------------------------------------- /components/navbar/Navbar.tsx: -------------------------------------------------------------------------------- 1 | import Link from 'next/link'; 2 | import { HomeIcon } from '@primer/octicons-react'; 3 | import { ActiveLink } from '../active-link/ActiveLink'; 4 | 5 | 6 | const navItems = [ 7 | { path: '/about', text: 'About' }, 8 | { path: '/pricing', text: 'Pricing' }, 9 | { path: '/contact', text: 'Contact' }, 10 | ] 11 | 12 | 13 | 14 | export const Navbar = () => { 15 | 16 | 17 | 18 | return ( 19 | 36 | ) 37 | } 38 | -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {} 3 | 4 | module.exports = nextConfig 5 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "first-steps", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev --turbo", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@primer/octicons-react": "^19.1.0", 13 | "@types/node": "20.2.5", 14 | "@types/react": "18.2.8", 15 | "@types/react-dom": "18.2.4", 16 | "autoprefixer": "10.4.14", 17 | "eslint": "8.42.0", 18 | "eslint-config-next": "13.4.4", 19 | "next": "13.4.4", 20 | "postcss": "8.4.24", 21 | "react": "18.2.0", 22 | "react-dom": "18.2.0", 23 | "tailwindcss": "3.3.2", 24 | "typescript": "5.1.3" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /public/next.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: [ 4 | './pages/**/*.{js,ts,jsx,tsx,mdx}', 5 | './components/**/*.{js,ts,jsx,tsx,mdx}', 6 | './app/**/*.{js,ts,jsx,tsx,mdx}', 7 | ], 8 | theme: { 9 | extend: { 10 | backgroundImage: { 11 | 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', 12 | 'gradient-conic': 13 | 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', 14 | }, 15 | }, 16 | }, 17 | plugins: [], 18 | } 19 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "noEmit": true, 10 | "esModuleInterop": true, 11 | "module": "esnext", 12 | "moduleResolution": "node", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "jsx": "preserve", 16 | "incremental": true, 17 | "plugins": [ 18 | { 19 | "name": "next" 20 | } 21 | ], 22 | "paths": { 23 | "@/*": ["./*"] 24 | } 25 | }, 26 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 27 | "exclude": ["node_modules"] 28 | } 29 | --------------------------------------------------------------------------------