├── .github └── FUNDING.yml ├── .gitignore ├── .nvmrc ├── .vscode ├── extensions.json └── settings.json ├── LICENSE ├── README.md ├── astro.config.ts ├── package.json ├── prettier.config.cjs ├── public ├── fonts │ ├── CascadiaCode.woff2 │ └── Satoshi.woff2 └── images │ ├── github_readme.png │ ├── logo.png │ ├── logos │ └── planetscale.png │ ├── og_image.png │ └── pic.jpg ├── src ├── components │ ├── container.astro │ ├── copyUrl.tsx │ ├── footer.astro │ ├── formattedDate.astro │ ├── header.astro │ ├── post.astro │ ├── project.tsx │ ├── section.astro │ ├── socials.tsx │ ├── tech.tsx │ └── warning.astro ├── content │ ├── blog │ │ └── next-themes.mdx │ └── config.ts ├── data │ ├── headerLinks.ts │ ├── projects.ts │ ├── socialLinks.tsx │ └── technologies.tsx ├── env.d.ts ├── layout │ ├── blog.astro │ └── index.astro ├── pages │ ├── blog │ │ ├── [...slug].astro │ │ └── index.astro │ ├── index.astro │ └── rss.xml.js ├── styles │ └── globals.css ├── types │ ├── header.ts │ ├── post.ts │ ├── project.ts │ ├── socials.ts │ └── technologies.ts └── ui │ ├── button.tsx │ └── popover.tsx ├── tailwind.config.cjs ├── tsconfig.json └── vercel.json /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: pheralb 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # build output: 2 | dist/ 3 | 4 | # dependencies: 5 | node_modules/ 6 | package-lock.json 7 | yarn.lock 8 | pnpm-lock.yaml 9 | 10 | # logs: 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # environment variables: 17 | .env 18 | .env.production 19 | 20 | # vercel output folder: 21 | .vercel 22 | 23 | # macOS-specific files: 24 | .DS_Store 25 | 26 | # generated types 27 | .astro/ -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | v18 -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "astro-build.astro-vscode", 4 | "bradlc.vscode-tailwindcss", 5 | "csstools.postcss" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "*.mdx": "markdown" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | Screenshot 5 | 6 | 7 |

8 | 9 |
10 | 11 | Website 12 | 13 |  ⁘  14 | 15 | Getting Started 16 | 17 |  ⁘  18 | 19 | Stack 20 | 21 |  ⁘  22 | 23 | License 24 | 25 |  ⁘  26 | 27 | Twitter 28 | 29 |
30 | 31 |

32 | 33 | ![GitHub stars](https://img.shields.io/github/stars/pheralb/website) 34 | ![GitHub issues](https://img.shields.io/github/issues/pheralb/project-hackathon) 35 | ![GitHub forks](https://img.shields.io/github/forks/pheralb/website) 36 | ![GitHub license](https://img.shields.io/github/license/pheralb/website) 37 | [![Required Node.JS >=16.0.0](https://img.shields.io/static/v1?label=node&message=%20%3E=16.0.0&logo=node.js&color=3f893e)](https://nodejs.org/about/releases) 38 | 39 |
40 | 41 | ## ⚙ Stack 42 | 43 | - [**Astro** + Typescript](https://astro.build/) - Build the web 44 | you want. 45 | - [**React 18**](https://react.dev/) - The library for web and native user interfaces. 46 | - [**Tailwind CSS**](https://tailwindcss.com/) - A utility-first CSS framework for rapidly building custom designs. 47 | - [**Prettier** + prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) - A Prettier plugin for Tailwind CSS that automatically sorts classes. 48 | - [**Iconoir**](https://iconoir.com/) with [**React-Symbols**](https://react-symbols.vercel.app/) - Beautifully crafted SVG icons & logos. 49 | 50 | ## 🚀 Getting Started 51 | 52 | We recommend using the following extensions for Visual Studio Code: 53 | 54 | - [**Astro for VSCode**](https://marketplace.visualstudio.com/items?itemName=astro-build.astro-vscode). 55 | - [**Tailwind CSS IntelliSense**](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss). 56 | - [**PostCSS Language Support**](https://marketplace.visualstudio.com/items?itemName=csstools.postcss). 57 | - [**Prettier - Code formatter**](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode). 58 | 59 | 1. Clone the repository: 60 | 61 | ```bash 62 | git@github.com:pheralb/website.git 63 | ``` 64 | 65 | 2. Install dependencies: 66 | 67 | ```bash 68 | npm install 69 | # or 70 | yarn install 71 | # or 72 | pnpm install 73 | # or 74 | ultra install 75 | ``` 76 | 77 | 3. Run the development server: 78 | 79 | ```bash 80 | npm run dev 81 | # or 82 | yarn dev 83 | # or 84 | pnpm dev 85 | # or 86 | ultra dev 87 | ``` 88 | 89 | Open up [http://localhost:3000](http://localhost:3000) to view the website 🚀. 90 | 91 | 📁 Folder structure: 92 | 93 | ``` 94 | [] .github - Funding file. 95 | [] .vscode - Extensions, config & launch options for VSCode. 96 | [] public - Static files. 97 | [] src - Astro source code. 98 | ``` 99 | 100 | ⚙ Commands: 101 | 102 | | Command | Action | 103 | | :------------- | :------------------------------------------------------ | 104 | | `dev` | Starts local dev server at `localhost:3000`. | 105 | | `build` | Build site to `./dist/`. | 106 | | `preview` | Preview your build locally, before deploying. | 107 | | `astro ...` | Run Astro CLI commands like `astro add`, `astro check`. | 108 | | `astro --help` | Get help using the Astro CLI. | 109 | | `format` | Format code with Prettier. | 110 | 111 | ## 🌱 Shortcuts 112 | 113 | - pheralb.dev[**/tw**](https://pheralb.dev/tw) - Twitter. 114 | - pheralb.dev[**/tv**](https://pheralb.dev/tv) - Twitch. 115 | - pheralb.dev[**/ln**](https://pheralb.dev/ln) - LinkedIn. 116 | - pheralb.dev[**/gh**](https://pheralb.dev/gh) - Github profile. 117 | - pheralb.dev[**/git**](https://pheralb.dev/git) - Github website repository. 118 | 119 | ## ☁ Deploy 120 | 121 | I am using [**Vercel**](https://vercel.com/) for deployment: 122 | 123 | - [**pheralb.dev**](https://pheralb.dev). 124 | - [**pheralb.vercel.app**](https://pheralb.vercel.app). 125 | 126 | ## 📝 License 127 | 128 | - [Apache-2.0 license](https://github.com/pheralb/web/blob/main/LICENSE). 129 | -------------------------------------------------------------------------------- /astro.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "astro/config"; 2 | 3 | // Astro integrations: 4 | import tailwind from "@astrojs/tailwind"; 5 | import react from "@astrojs/react"; 6 | import mdx from "@astrojs/mdx"; 7 | import sitemap from "@astrojs/sitemap"; 8 | 9 | // MDX plugins: 10 | import remarkGfm from "remark-gfm"; 11 | 12 | export default defineConfig({ 13 | site: "https://www.pheralb.dev/", 14 | integrations: [ 15 | react(), 16 | tailwind({ 17 | config: { 18 | applyBaseStyles: false, 19 | }, 20 | }), 21 | mdx({ 22 | rehypePlugins: [], 23 | remarkPlugins: [remarkGfm], 24 | shikiConfig: { 25 | theme: "one-dark-pro", 26 | wrap: true, 27 | }, 28 | gfm: true, 29 | }), 30 | sitemap(), 31 | ], 32 | }); 33 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pheralb.dev", 3 | "author": "@pheralb_", 4 | "description": "My personal website.", 5 | "license": "Apache-Version2.0", 6 | "version": "1.0.0", 7 | "type": "module", 8 | "private": true, 9 | "scripts": { 10 | "dev": "astro dev", 11 | "start": "astro dev", 12 | "build": "astro build", 13 | "preview": "astro preview", 14 | "astro": "astro", 15 | "format": "prettier --write ." 16 | }, 17 | "dependencies": { 18 | "@astrojs/mdx": "0.19.5", 19 | "@astrojs/react": "2.2.1", 20 | "@astrojs/rss": "2.4.3", 21 | "@astrojs/sitemap": "1.3.2", 22 | "@astrojs/tailwind": "3.1.3", 23 | "@astrojs/vercel": "3.4.1", 24 | "@radix-ui/react-popover": "1.0.6", 25 | "@react-symbols/icons": "1.1.8", 26 | "astro": "2.5.6", 27 | "clsx": "1.2.1", 28 | "iconoir-react": "6.8.0", 29 | "mdast-util-to-string": "3.2.0", 30 | "react": "18.2.0", 31 | "react-dom": "18.2.0", 32 | "reading-time": "1.5.0", 33 | "remark-gfm": "3.0.1", 34 | "sonner": "0.4.0" 35 | }, 36 | "devDependencies": { 37 | "@tailwindcss/typography": "0.5.9", 38 | "@types/react": "18.2.7", 39 | "@types/react-dom": "18.2.4", 40 | "prettier": "2.8.8", 41 | "prettier-plugin-tailwindcss": "0.3.0", 42 | "tailwindcss": "3.3.2", 43 | "tailwindcss-animate": "1.0.6" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /prettier.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [require("prettier-plugin-tailwindcss")], 3 | }; 4 | -------------------------------------------------------------------------------- /public/fonts/CascadiaCode.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/website/f8bc3a0fa221bc03e009edae8e1814b18076dc56/public/fonts/CascadiaCode.woff2 -------------------------------------------------------------------------------- /public/fonts/Satoshi.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/website/f8bc3a0fa221bc03e009edae8e1814b18076dc56/public/fonts/Satoshi.woff2 -------------------------------------------------------------------------------- /public/images/github_readme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/website/f8bc3a0fa221bc03e009edae8e1814b18076dc56/public/images/github_readme.png -------------------------------------------------------------------------------- /public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/website/f8bc3a0fa221bc03e009edae8e1814b18076dc56/public/images/logo.png -------------------------------------------------------------------------------- /public/images/logos/planetscale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/website/f8bc3a0fa221bc03e009edae8e1814b18076dc56/public/images/logos/planetscale.png -------------------------------------------------------------------------------- /public/images/og_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/website/f8bc3a0fa221bc03e009edae8e1814b18076dc56/public/images/og_image.png -------------------------------------------------------------------------------- /public/images/pic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pheralb/website/f8bc3a0fa221bc03e009edae8e1814b18076dc56/public/images/pic.jpg -------------------------------------------------------------------------------- /src/components/container.astro: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /src/components/copyUrl.tsx: -------------------------------------------------------------------------------- 1 | import { ShareAndroid } from "iconoir-react"; 2 | 3 | import Button from "../ui/button"; 4 | import { toast, Toaster } from "sonner"; 5 | 6 | interface iCopyUrl { 7 | url: string; 8 | } 9 | 10 | const CopyUrl = (props: iCopyUrl) => { 11 | const copyToClipboard = async (txt: string) => { 12 | try { 13 | const clipboardItem = new ClipboardItem({ 14 | "text/plain": new Blob([txt], { type: "text/plain" }), 15 | }); 16 | await navigator.clipboard.write([clipboardItem]); 17 | toast.success("Copied to clipboard", { 18 | style: { 19 | background: "#121212", 20 | }, 21 | }); 22 | } catch (error) { 23 | toast("Error: Could not copy to clipboard", { 24 | duration: 2000, 25 | }); 26 | } 27 | }; 28 | 29 | return ( 30 | <> 31 | 37 | 38 | 39 | ); 40 | }; 41 | 42 | export default CopyUrl; 43 | -------------------------------------------------------------------------------- /src/components/footer.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import Container from "./container.astro"; 3 | --- 4 | 5 | 6 |
9 |

Pablo Hernández

10 | - 11 |

2023

12 |
13 |
14 | -------------------------------------------------------------------------------- /src/components/formattedDate.astro: -------------------------------------------------------------------------------- 1 | --- 2 | export interface Props { 3 | date: Date; 4 | } 5 | const { date } = Astro.props; 6 | --- 7 | 8 | 17 | -------------------------------------------------------------------------------- /src/components/header.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import CustomContainer from "../components/container.astro"; 3 | 4 | import { headerLinks } from "../data/headerLinks"; 5 | import Socials from "./socials"; 6 | --- 7 | 8 |
11 | 12 |
13 | 14 |
17 | Logo 24 |
25 |
26 |
29 |
30 | { 31 | headerLinks.map((link) => ( 32 | 36 | {link.url} 37 | 38 | )) 39 | } 40 |
41 |
42 | 43 |
44 |
45 |
46 |
47 |
48 | -------------------------------------------------------------------------------- /src/components/post.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import FormattedDate from "./formattedDate.astro"; 3 | export interface PostProps { 4 | title: string; 5 | description: string; 6 | date: string; 7 | url?: string; 8 | } 9 | 10 | const { title, description, date, url } = Astro.props; 11 | --- 12 | 13 | 14 |
17 |
18 |

{title}

19 |
20 |

{description}

21 | 22 |
23 |
24 | -------------------------------------------------------------------------------- /src/components/project.tsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | import type { iProject } from "@/types/project"; 3 | import { Popover, PopoverContent, PopoverTrigger } from "@/ui/popover"; 4 | import { ArrowTr, Flash, GitHub } from "iconoir-react"; 5 | import clsx from "clsx"; 6 | 7 | const Project = (props: iProject) => { 8 | const [open, setOpen] = useState(false); 9 | return ( 10 |
11 |
12 | {props.url ? ( 13 | 18 |
19 |

{props.title}

20 | 27 |
28 |
29 | ) : ( 30 |

{props.title}

31 | )} 32 |
33 | {props.team.length > 1 && ( 34 | 35 | 36 | 43 | 44 | 45 |
46 |

Team

47 | {props.team.sort((a, b) => a.localeCompare(b)).map((member: string) => ( 48 |
49 | {member} 50 | 57 |
58 | ))} 59 |
60 |
61 |
62 | )} 63 | 64 | 70 | 71 |
72 |
73 |

{props.description}

74 |
75 |
76 | {props.tags?.map((tag: string) => ( 77 |
81 | {tag} 82 |
83 | ))} 84 |
85 |
86 |
87 | ); 88 | }; 89 | 90 | export default Project; 91 | -------------------------------------------------------------------------------- /src/components/section.astro: -------------------------------------------------------------------------------- 1 | --- 2 | export interface Props { 3 | title: string; 4 | } 5 | 6 | const { title } = Astro.props; 7 | --- 8 | 9 |
10 |
11 |

{title}

12 |
13 | 14 |
15 | -------------------------------------------------------------------------------- /src/components/socials.tsx: -------------------------------------------------------------------------------- 1 | import { iSocials, socialsLinks } from "../data/socialLinks"; 2 | 3 | const Socials = () => { 4 | return ( 5 |
6 | {socialsLinks.map((link: iSocials) => ( 7 | 8 | {link.icon} 9 | 10 | ))} 11 |
12 | ); 13 | }; 14 | 15 | export default Socials; 16 | -------------------------------------------------------------------------------- /src/components/tech.tsx: -------------------------------------------------------------------------------- 1 | import clsx from "clsx"; 2 | import type { iTechnology } from "../data/technologies"; 3 | 4 | const Tech = (props: iTechnology) => { 5 | return ( 6 |
12 |
{props.icon}
13 |

{props.name}

14 |
15 | ); 16 | }; 17 | 18 | export default Tech; 19 | -------------------------------------------------------------------------------- /src/components/warning.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import CustomContainer from "./container.astro"; 3 | --- 4 | 5 |
6 | 7 |

🚧 Website under construction.

8 |
9 |
10 | -------------------------------------------------------------------------------- /src/content/blog/next-themes.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: "How to add light/dark mode in Next.js 13" 3 | description: "Learn how to add light/dark mode in your Next.js 13 app with next-themes. Including /app & /pages directory + Tailwind CSS." 4 | pubDate: "May 31 2023" 5 | heroImage: "/placeholder-hero.jpg" 6 | --- 7 | 8 | ## Introduction 9 | 10 | [Next-Themes](https://github.com/pacocoursey/next-themes) is a Next.js plugin created by [@pacocoursey](https://paco.me/) that allows you to add light/dark mode to your Next.js app. It's super easy to use and works great with HTML/CSS and Tailwind CSS. 11 | 12 | ## Install Next-Themes 13 | 14 | - Install next-themes with your favorite package manager: 15 | 16 | ```bash 17 | # with npm: 18 | npm install next-themes 19 | 20 | # with yarn: 21 | yarn add next-themes 22 | 23 | # with pnpm: 24 | pnpm add next-themes 25 | ``` 26 | 27 | ## Add ThemeProvider 28 | 29 | - 📂 **/app directory**: 30 | 31 | 1. Create a new file called `themeProvider.js` or `themeProvider.tsx` inside of your `/src/app` directory and add the following code: 32 | 33 | ```jsx 34 | // JavaScript 35 | // /src/components/themeProvider.js 36 | 37 | "use client"; 38 | 39 | import { ThemeProvider } from "next-themes"; 40 | 41 | export function ThemeProvider({ children }) { 42 | return ( 43 | 44 | {children} 45 | 46 | ); 47 | } 48 | ``` 49 | 50 | ```tsx 51 | // Typescript 52 | // /src/components/themeProvider.tsx 53 | 54 | "use client"; 55 | 56 | import * as React from "react"; 57 | import { ThemeProvider as NextThemesProvider } from "next-themes"; 58 | import type { ThemeProviderProps } from "next-themes/dist/types"; 59 | 60 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) { 61 | return {children}; 62 | } 63 | ``` 64 | 65 | 2. Import the `themeProvider` component into your `layout.js` or `layout.tsx` file and wrap it around your body page: 66 | 67 | ```jsx 68 | // JavaScript 69 | // /src/app/layout.js 70 | 71 | import { ThemeProvider } from "@/themeProvider"; 72 | 73 | export default function RootLayout({ children }) { 74 | return ( 75 | 76 | 77 | {children} 78 | 79 | 80 | ); 81 | } 82 | ``` 83 | 84 | ```tsx 85 | // Typescript 86 | // /src/app/layout.tsx 87 | 88 | import { ThemeProvider } from "@/themeProvider"; 89 | 90 | export default function RootLayout({ children }) { 91 | return ( 92 | 93 | 94 | 95 | {children} 96 | 97 | 98 | 99 | ); 100 | } 101 | ``` 102 | 103 | - 📂 **/pages directory**: 104 | 105 | Add the `themeProvider` provider from next-themes to your `_app.js` or `_app.tsx` file: 106 | 107 | ```jsx 108 | // JavaScript or Typescript 109 | // /src/pages/_app.js or /src/pages/_app.tsx 110 | 111 | import { ThemeProvider } from "next-themes"; 112 | 113 | function MyApp({ Component, pageProps }) { 114 | return ( 115 | 116 | 117 | 118 | ); 119 | } 120 | 121 | export default MyApp; 122 | ``` 123 | 124 | ## With Tailwind CSS 125 | 126 | 1. Add `darkMode: "class"` to your `tailwind.config.js` file: 127 | 128 | ```js 129 | // /tailwind.config.js 130 | 131 | /** @type {import('tailwindcss').Config} */ 132 | module.exports = { 133 | darkMode: "class", 134 | content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"], 135 | ... 136 | }; 137 | ``` 138 | 139 | 2. To apply the light/dark mode: 140 | 141 | ```html 142 | 145 | ``` 146 | 147 | ## Switching themes 148 | 149 | 1. Add the `useTheme` hook from next-themes: 150 | 151 | 152 | 153 | ```jsx -------------------------------------------------------------------------------- /src/content/config.ts: -------------------------------------------------------------------------------- 1 | import { defineCollection, z } from "astro:content"; 2 | 3 | const blog = defineCollection({ 4 | // Type-check frontmatter using a schema 5 | schema: z.object({ 6 | title: z.string(), 7 | description: z.string(), 8 | // Transform string to Date object 9 | pubDate: z 10 | .string() 11 | .or(z.date()) 12 | .transform((val) => new Date(val)), 13 | updatedDate: z 14 | .string() 15 | .optional() 16 | .transform((str) => (str ? new Date(str) : undefined)), 17 | heroImage: z.string().optional(), 18 | }), 19 | }); 20 | 21 | export const collections = { blog }; 22 | -------------------------------------------------------------------------------- /src/data/headerLinks.ts: -------------------------------------------------------------------------------- 1 | import type { iHeader } from "@/types/header"; 2 | 3 | export const headerLinks: iHeader[] = [ 4 | { 5 | title: "Blog", 6 | url: "/blog", 7 | }, 8 | ]; 9 | -------------------------------------------------------------------------------- /src/data/projects.ts: -------------------------------------------------------------------------------- 1 | import type { iProject } from "@/types/project"; 2 | 3 | export const projects: iProject[] = [ 4 | { 5 | title: "frame", 6 | description: "🎨 Generate images with beautiful gradients.", 7 | type: "App", 8 | url: "https://myframe.vercel.app/", 9 | gh: "https://github.com/pheralb/frame", 10 | tags: ["Next.js", "Typescript", "Tailwind CSS", "Zustand"], 11 | team: ["pheralb"], 12 | }, 13 | { 14 | title: "slug", 15 | description: "🌱 A URL shortener built with T3 Stack.", 16 | type: "App", 17 | url: "https://slug.vercel.app/", 18 | gh: "https://github.com/pheralb/slug", 19 | tags: ["Next.js", "Typescript", "Tailwind CSS", "tRPC"], 20 | team: ["pheralb"], 21 | }, 22 | { 23 | title: "react-symbols", 24 | description: "✨ Symbols by Miguel Solorio, for React.", 25 | type: "Library", 26 | url: "https://react-symbols.vercel.app/", 27 | gh: "https://github.com/pheralb/react-symbols", 28 | tags: ["Turborepo", "Remix", "Typescript", "Tailwind CSS"], 29 | team: ["pheralb"], 30 | }, 31 | { 32 | title: "svgl", 33 | description: "🧩 A beautiful library with SVG logos.", 34 | type: "App", 35 | gh: "https://github.com/pheralb/svgl", 36 | url: "https://svgl.vercel.app", 37 | tags: ["Sveltekit", "Typescript", "Tailwind CSS"], 38 | team: ["pheralb"], 39 | }, 40 | { 41 | title: "project-hackathon", 42 | description: "🌻 An open-source hackathon management.", 43 | type: "App", 44 | gh: "https://github.com/pheralb/project-hackathon", 45 | url: "https://phck.vercel.app/", 46 | tags: ["Next.js", "Typescript", "Tailwind CSS", "tRPC"], 47 | team: ["pheralb", "tmchein"], 48 | }, 49 | { 50 | title: "lyra AI", 51 | description: "✌ An open-source app using Next.js 13 & Cohere API.", 52 | type: "App", 53 | gh: "https://github.com/miduteam/lyra-ai", 54 | url: "https://lyrai.fly.dev/", 55 | tags: ["Turborepo", "Next.js", "Typescript", "Co:here"], 56 | team: ["pheralb", "aforina", "ikurotime", "nachoaldamav", "tmchein"], 57 | }, 58 | { 59 | title: "superkey", 60 | description: "❄️ A stylized command menu for React.", 61 | type: "Library", 62 | gh: "https://github.com/pheralb/superkey", 63 | url: "https://superkey.vercel.app", 64 | tags: ["Turborepo", "Next.js", "Typescript", "Tailwind CSS"], 65 | team: ["pheralb"], 66 | }, 67 | { 68 | title: "SuperUI", 69 | description: "🚀 A Tailwind CSS component library.", 70 | type: "Library", 71 | gh: "https://github.com/pheralb/superui", 72 | url: "https://superui.vercel.app/", 73 | tags: ["Turborepo", "Next.js", "Typescript", "Tailwind CSS"], 74 | team: ["pheralb", "nachoaldamav", "ikurotime", "tmchein"], 75 | }, 76 | { 77 | title: "weathr", 78 | description: "☀️ A simple weather web app.", 79 | type: "App", 80 | gh: "https://github.com/pheralb/weathr", 81 | url: "https://weathr.pages.dev/", 82 | tags: ["Next.js", "Typescript", "Chakra UI"], 83 | team: ["pheralb"], 84 | }, 85 | { 86 | title: "gifit", 87 | description: "🕹️ Discover amazing gifs, using Giphy.", 88 | type: "App", 89 | gh: "https://github.com/pheralb/gifit", 90 | url: "https://gifit.pages.dev", 91 | tags: ["React", "Typescript", "Chakra UI", "Giphy"], 92 | team: ["pheralb"], 93 | }, 94 | ]; 95 | -------------------------------------------------------------------------------- /src/data/socialLinks.tsx: -------------------------------------------------------------------------------- 1 | import type { iSocials } from "@/types/socials"; 2 | import clsx from "clsx"; 3 | import { GitHub, Twitter, Heart, LinkedIn } from "iconoir-react"; 4 | 5 | const iconSize = 20; 6 | const stroke = 2; 7 | const className = "text-gray-400 transition-all duration-150"; 8 | 9 | export const socialsLinks: iSocials[] = [ 10 | { 11 | url: "https://twitter.com/pheralb_", 12 | icon: ( 13 | 20 | ), 21 | }, 22 | { 23 | url: "https://www.linkedin.com/in/pheralb/", 24 | icon: ( 25 | 32 | ), 33 | }, 34 | { 35 | url: "https://github.com/pheralb", 36 | icon: ( 37 | 44 | ), 45 | }, 46 | { 47 | url: "https://github.com/sponsors/pheralb", 48 | icon: ( 49 | 56 | ), 57 | }, 58 | ]; 59 | -------------------------------------------------------------------------------- /src/data/technologies.tsx: -------------------------------------------------------------------------------- 1 | import type { iTechnology } from "@/types/technologies"; 2 | 3 | import { 4 | Reactts, 5 | Js, 6 | TypeScript, 7 | Svelte, 8 | Node, 9 | Database, 10 | Git, 11 | Next, 12 | Prisma, 13 | Tailwind, 14 | Firebase, 15 | Supabase, 16 | Astro, 17 | Sass, 18 | Docker, 19 | } from "@react-symbols/icons"; 20 | 21 | const width = 50; 22 | const height = 50; 23 | const hover = "hover:-rotate-0.5 transition-all duration-200"; 24 | 25 | export const technologies: iTechnology[] = [ 26 | { 27 | name: "React", 28 | icon: ( 29 | 30 | ), 31 | color: "#2563eb", 32 | }, 33 | { 34 | name: "Svelte", 35 | icon: ( 36 | 37 | ), 38 | color: "#EA580C", 39 | }, 40 | { 41 | name: "Astro", 42 | icon: ( 43 | 44 | ), 45 | color: "#EA580C", 46 | }, 47 | { 48 | name: "Next.js", 49 | icon: ( 50 | 51 | ), 52 | color: "#64748B", 53 | }, 54 | { 55 | name: "JavaScript", 56 | icon: ( 57 | 58 | ), 59 | color: "#F59E0B", 60 | }, 61 | { 62 | name: "TypeScript", 63 | icon: ( 64 | 70 | ), 71 | color: "#2563EB", 72 | }, 73 | { 74 | name: "Prisma", 75 | icon: ( 76 | 77 | ), 78 | color: "#14B8A6", 79 | }, 80 | { 81 | name: "Node.js", 82 | icon: ( 83 | 84 | ), 85 | color: "#2DD4BF", 86 | }, 87 | { 88 | name: "mySQL", 89 | icon: ( 90 | 91 | ), 92 | color: "#F472B6", 93 | }, 94 | { 95 | name: "Firebase", 96 | icon: ( 97 | 103 | ), 104 | color: "#FFA000", 105 | }, 106 | { 107 | name: "Supabase", 108 | icon: ( 109 | 115 | ), 116 | color: "#249361", 117 | }, 118 | { 119 | name: "Git", 120 | icon: , 121 | color: "#F87171", 122 | }, 123 | { 124 | name: "Tailwind CSS", 125 | icon: ( 126 | 132 | ), 133 | color: "#0EA5E9", 134 | }, 135 | { 136 | name: "Sass", 137 | icon: ( 138 | 144 | ), 145 | color: "#F472B6", 146 | }, 147 | { 148 | name: "Docker", 149 | icon: ( 150 | 156 | ), 157 | }, 158 | ]; 159 | -------------------------------------------------------------------------------- /src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /src/layout/blog.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import CustomContainer from "../components/container.astro"; 3 | import CopyUrl from "../components/copyUrl"; 4 | import Layout from "./index.astro"; 5 | 6 | const { frontmatter } = Astro.props; 7 | --- 8 | 9 | 10 |
13 | 14 |
15 |
16 | Blog 19 |
20 |
21 | 22 |
23 |
24 |
25 |
26 | 27 |
28 |
29 |

{frontmatter.title}

30 |

31 | {frontmatter.description} 32 |

33 |
34 |
37 | 38 |
39 |
40 |
41 | -------------------------------------------------------------------------------- /src/layout/index.astro: -------------------------------------------------------------------------------- 1 | --- 2 | // Global styles: 3 | import "../styles/globals.css"; 4 | 5 | // Components: 6 | import Header from "../components/header.astro"; 7 | import Footer from "../components/footer.astro"; 8 | 9 | // Page props: 10 | interface Props { 11 | pageTitle: string; 12 | description: string; 13 | } 14 | const { pageTitle, description } = Astro.props; 15 | --- 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | {pageTitle} - Pablo Hdez 54 | 55 | 56 |
57 | 58 |