diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..04b47a7 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,114 @@ +module.exports = { + extends: [ + 'plugin:astro/recommended', + 'plugin:tailwindcss/recommended', + 'plugin:prettier/recommended', + ], + parser: '@typescript-eslint/parser', + parserOptions: { + project: './tsconfig.json', + extraFileExtensions: ['.astro'], // This is a required setting in `@typescript-eslint/parser` v5. + }, + plugins: ['@typescript-eslint', 'import', 'tailwindcss'], + env: { + browser: true, + node: true, + jest: true, + }, + parserOptions: { + sourceType: 'module', + ecmaVersion: 'latest', + }, + globals: { + ga: 'readonly', + }, + ignorePatterns: ['/dist/', '/node_modules/'], + settings: { + 'import/resolver': { + node: { + paths: ['./'], + }, + }, + }, + rules: { + 'import/prefer-default-export': 'off', + }, + overrides: [ + { + files: ['./**/*.ts', './**/*.tsx'], + extends: ['plugin:tailwindcss/recommended', 'plugin:prettier/recommended'], + parser: '@typescript-eslint/parser', + parserOptions: { + project: 'tsconfig.json', + sourceType: 'module', + }, + settings: { + 'import/resolver': { + node: { + paths: ['./'], + extensions: ['.ts', '.tsx'], + }, + }, + }, + rules: { + 'no-multi-spaces': 'error', + 'import/extensions': 'off', + 'no-continue': 'off', + 'no-shadow': 'off', + 'import/prefer-default-export': 'off', + '@typescript-eslint/no-unused-vars': 'error', + '@typescript-eslint/no-shadow': ['error'], + }, + }, + { + files: ['./cli/**/*.js'], + rules: { + 'import/no-extraneous-dependencies': 'off', + 'no-console': 'off', + }, + }, + { + // Define the configuration for `.astro` file. + files: ['*.astro'], + plugins: ['astro'], + + // Enable this plugin + env: { + // Enables global variables available in Astro components. + node: true, + 'astro/astro': true, + es2020: true, + }, + settings: { + 'import/parsers': { + '@typescript-eslint/parser': ['.ts', '.astro'], + }, + 'import/resolver': { + typescript: { + alwaysTryTypes: true, + project: './', + }, + }, + }, + // Allows Astro components to be parsed. + parser: 'astro-eslint-parser', + // Parse the script in `.astro` as TypeScript by adding the following configuration. + // It's the setting you need when using TypeScript. + parserOptions: { + parser: '@typescript-eslint/parser', + project: 'tsconfig.json', + extraFileExtensions: ['.astro'], + // The script of Astro components uses ESM. + sourceType: 'module', + }, + rules: { + // Enable recommended rules + 'astro/no-conflict-set-directives': 'error', + 'astro/no-unused-define-vars-in-style': 'error', + 'import/no-unresolved': [2, { ignore: ['astro-icon'] }], + // override/add rules settings here, such as: + // "astro/no-set-html-directive": "error" + }, + }, + ], +}; diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 36045e6..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,95 +0,0 @@ -module.exports = { - extends: [ - 'airbnb', - 'plugin:react/jsx-runtime', - 'plugin:@next/next/recommended', - 'plugin:tailwindcss/recommended', - 'plugin:prettier/recommended', - ], - plugins: ['react', '@typescript-eslint', 'import', 'jsx-a11y', 'tailwindcss'], - env: { - browser: true, - node: true, - jest: true, - }, - parserOptions: { - sourceType: 'module', - ecmaVersion: 'latest', - ecmaFeatures: { - jsx: true, - }, - }, - globals: { - ga: 'readonly', - }, - ignorePatterns: ['/out/', '/node_modules/', '/.next/'], - settings: { - 'import/resolver': { - node: { - paths: ['./'], - }, - }, - }, - rules: { - 'import/prefer-default-export': 'off', - }, - overrides: [ - { - extends: [ - 'airbnb', - 'airbnb-typescript', - 'plugin:react/jsx-runtime', - 'plugin:@next/next/recommended', - 'plugin:tailwindcss/recommended', - 'plugin:prettier/recommended', - ], - files: ['./**/*.ts', './**/*.tsx'], - parser: '@typescript-eslint/parser', - parserOptions: { - project: 'tsconfig.json', - sourceType: 'module', - }, - settings: { - 'import/resolver': { - node: { - paths: ['./'], - extensions: ['.ts', '.tsx'], - }, - }, - }, - rules: { - 'react/require-default-props': 'off', - 'react/react-in-jsx-scope': 'off', - 'react/function-component-definition': [2, { namedComponents: 'arrow-function' }], - 'no-multi-spaces': 'error', - '@next/next/no-html-link-for-pages': 'off', - 'import/extensions': 'off', - 'no-continue': 'off', - 'no-shadow': 'off', - 'react/jsx-indent': ['error', 2, { checkAttributes: true, indentLogicalExpressions: true }], - 'react/jsx-wrap-multilines': [ - 'error', - { - declaration: 'parens-new-line', - assignment: 'parens-new-line', - return: 'parens-new-line', - arrow: 'parens-new-line', - condition: 'ignore', - logical: 'parens-new-line', - prop: 'parens-new-line', - }, - ], - 'import/prefer-default-export': 'off', - '@typescript-eslint/no-unused-vars': 'error', - '@typescript-eslint/no-shadow': ['error'], - }, - }, - { - files: ['./cli/**/*.js'], - rules: { - 'import/no-extraneous-dependencies': 'off', - 'no-console': 'off', - }, - }, - ], -}; diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6912dc0..d45f8f9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,8 +25,8 @@ jobs: - name: Lint run: yarn lint - - name: Test Resume Export - run: yarn resume - - - name: Ensure it can be built without errors + - name: Build project run: yarn build + + - name: Test Resume Export + run: yarn resume:generate diff --git a/.gitignore b/.gitignore index 556640e..6b7cdd1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,44 +1,3 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Typescript v1 declaration files -typings/ - # Package Managers .npm .pnp.* @@ -52,23 +11,24 @@ typings/ # Optional eslint cache .eslintcache -# Optional REPL history -.node_repl_history +# build output +dist/ -# Output of 'npm pack' -*.tgz +# generated types +.astro/ -# dotenv environment variables file -.env +# dependencies +node_modules/ -# Next.js files -.cache/ -.next/ -out/ +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* -# Mac files -.DS_Store +# environment variables +.env +.env.production -# IDEs -.idea -.history +# macOS-specific files +.DS_Store diff --git a/.prettierignore b/.prettierignore index e69de29..c2658d7 100644 --- a/.prettierignore +++ b/.prettierignore @@ -0,0 +1 @@ +node_modules/ diff --git a/.prettierrc b/.prettierrc index 5ac85e2..5e2863a 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1,5 @@ { "printWidth": 100, - "singleQuote": true + "singleQuote": true, + "trailingComma": "all" } diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index 61fc74d..0000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,17 +0,0 @@ -checks: - javascript: true - -build: - nodes: - analysis: - tests: - override: - - js-scrutinizer-run - - - command: eslint-run - use_website_config: false - tests: true - - environment: - node: - version: v14.16.0 diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 22e71c1..02d6ee9 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,5 +1,6 @@ { "recommendations": [ + "astro-build.astro-vscode", "dbaeumer.vscode-eslint", "stylelint.vscode-stylelint", "zignd.html-css-class-completion", @@ -7,5 +8,6 @@ "redhat.vscode-yaml", "mrmlnc.vscode-scss", "tomoki1207.pdf" - ] + ], + "unwantedRecommendations": [] } diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..d642209 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,11 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "command": "./node_modules/.bin/astro dev", + "name": "Development server", + "request": "launch", + "type": "node-terminal" + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index f0b48ed..64f66f9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,5 +13,14 @@ "**/.yarn": true }, "stylelint.enable": true, - "stylelint.validate": ["css", "scss"] + "stylelint.validate": ["css", "scss"], + "prettier.documentSelectors": ["**/*.astro", "**/*.ts"], + "[astro]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "eslint.validate": [ + "javascript", + "astro", // Enable .astro + "typescript" // Enable .ts + ] } diff --git a/.yarnrc.yml b/.yarnrc.yml index 7475063..edf5b78 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -1,11 +1,3 @@ nodeLinker: node-modules -plugins: - - path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs - spec: "@yarnpkg/plugin-interactive-tools" - - path: .yarn/plugins/@yarnpkg/plugin-engines.cjs - spec: "https://raw.githubusercontent.com/devoto13/yarn-plugin-engines/main/bundles/%40yarnpkg/plugin-engines.js" - - path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs - spec: "https://mskelton.dev/yarn-outdated/v2" - yarnPath: .yarn/releases/yarn-3.6.1.cjs diff --git a/LICENSE b/LICENSE deleted file mode 100644 index f56f78a..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -# The MIT License (MIT) - -Copyright (c) 2021 Vitor Mello - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index a2892c1..ec0bc9c 100644 --- a/README.md +++ b/README.md @@ -1,52 +1,21 @@ -[![Build Status](https://travis-ci.org/vitormv/vmello-website.svg?branch=master)](https://travis-ci.org/vitormv/vmello-website) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/vitormv/vmello-website/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/vitormv/vmello-website/?branch=master) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +![Vercel](https://vercelbadge.vercel.app/api/vitormv/vmello-website) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/vitormv/vmello-website/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/vitormv/vmello-website/?branch=master) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Vitor Mello's Website

-This is the source code for my website. It is a statically generated using **Next.js** (React). +This is the source code for my website. It is a statically generated using **Astro**. -## 🚀 Get Up and Running +### Why Astro and not (\_\_YOUR_FAVORITE_FRAMEWORK\_\_)? -Want to take a look at the code for yourself? Go ahead! +Well, this is a very simple website that can be statically generated and barely need any client-side +Javascript at all. While Next.js, Remix, etc can do static site generation, they still do +ship, parse, rehydrate and process a metric ton of javascript after the page has been downloaded. +They still rerender everything on the client side, just to realize that nothing changed. -```bash -git clone git@github.com:vitormv/vmello-website.git vmello-website -cd vmello-website -yarn install && yarn start -``` - -Then open the `http://0.0.0.0:8091` on your favorite browser. - -## 🧐 What's inside? - -A quick look at the structure for this project: - -```plain - . - ├── cli/ - ├── src/ - ├──── components/ - ├──── data/ - ├──── pages/ - ├──── providers/ - ├──── styles/ - ├── static/ -``` - -1. **`/cli/`**: This directory contains some useful scripts, like for example export my resume as pdf directly and saving a local copy. - -2. **`/src/components/`**: Home of all the React components used in the website, useful reusable pieces of code. - -3. **`/src/content/`**: Here likes all the content of the website, as yml files. This is useful to keep the content layer separated from the components themselves. These files will be read by graphql at build time. - -4. **`/src/pages/`**: This folder is where Next.js expects to find all the website pages. - -5. **`/src/providers/`**: Here all the static graphql queries used in the website are used. This allow for great reuse of common functionality, in case they are needed in more than one place. They use React `Hooks` to define the queries. - -6. **`/src/styles/`**: Place for all the global stylesheets used in the website. - -7. **`/static/`**: Place for all the static assets of the website, like favicons, my pdf resume and so on. +For a simple static website like this, Astro does provite the best experience, since barely any JS +is shipped to the client, which means less js, less code, less bandwidth, less complexity. ## 💫 Deploy @@ -57,7 +26,7 @@ Deploy is automated by using Github Actions + [Vercel](https://vercel.com/). It After spending countless hours trying to create a greatly aligned resume in Google Docs, I finally decided to recreate it in html format (https://vmello.com/resume), and export it as `.pdf` using Puppeteer. It heavily uses CSS media @print queries. ```bash -npm run resume +yarn resume ``` I love to automate things! 😁 diff --git a/astro.config.mjs b/astro.config.mjs new file mode 100644 index 0000000..2780e7b --- /dev/null +++ b/astro.config.mjs @@ -0,0 +1,16 @@ +/* eslint-disable import/no-extraneous-dependencies */ +import { defineConfig } from 'astro/config'; +import yaml from '@rollup/plugin-yaml'; + +import tailwind from '@astrojs/tailwind'; + +/** + * @see https://astro.build/config + */ +export default defineConfig({ + output: 'static', + integrations: [tailwind()], + vite: { + plugins: [yaml()], + }, +}); diff --git a/cli/export-pdf-resume.js b/cli/export-pdf-resume.mjs similarity index 63% rename from cli/export-pdf-resume.js rename to cli/export-pdf-resume.mjs index baed67e..930ea87 100644 --- a/cli/export-pdf-resume.js +++ b/cli/export-pdf-resume.mjs @@ -1,10 +1,25 @@ +/* eslint-disable import/no-extraneous-dependencies */ import path from 'path'; import puppeteer from 'puppeteer'; import tasuku from 'tasuku'; -const sourceUrl = 'http://localhost:8092/resume'; +const resumeUrl = 'http://localhost:8081/resume'; const targetPdfPath = path.join('public', 'vitor-mello-resume.pdf'); +const retry = async (promiseFactory, retryCount, delayMs = 500) => { + try { + return await promiseFactory(); + } catch (error) { + if (retryCount <= 0) { + throw error; + } + await delay(delayMs); + return await retry(promiseFactory, retryCount - 1); + } +}; + +const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + async function exportResumeAsPdf(task) { let browser; let page; @@ -14,9 +29,13 @@ async function exportResumeAsPdf(task) { page = await browser.newPage(); }); - await task(`Opening "${sourceUrl}"...`, async () => { - await page.goto(sourceUrl, { waitUntil: 'networkidle0' }); - }); + await retry( + () => + task(`Opening "${resumeUrl}"...`, async () => { + await page.goto(resumeUrl, { waitUntil: 'networkidle0' }); + }), + 5, + ); await task('Generate PDF file', async () => { // generate .pdf file @@ -29,7 +48,7 @@ async function exportResumeAsPdf(task) { footerTemplate: `
- Vitor Mello; page of . + Vitor Mello - Senior Full Stack Engineer - page of .
`, diff --git a/next-env.d.ts b/next-env.d.ts deleted file mode 100644 index 4f11a03..0000000 --- a/next-env.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -/// - -// NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/next.config.js b/next.config.js deleted file mode 100644 index 4ab6da6..0000000 --- a/next.config.js +++ /dev/null @@ -1,37 +0,0 @@ -const nextConfig = { - swcMinify: true, - trailingSlash: false, - eslint: { - // Warning: This allows production builds to successfully complete even if - // your project has ESLint errors. - ignoreDuringBuilds: true, - }, - sassOptions: { - /* - In every loaded SCSS file, append this to the top of the file by default. - This allows using variables from other files without having to manually import the file manually each time. - - !!! IMPORTANT !!!: only import files that contain ONLY SASS variables (they are discarded when compiling to css). - */ - prependData: ` - // ONLY IMPORT FILES THAT CONTAIN SCSS VARIABLES ONLY, and nothing else. - @import "src/styles/config.scss"; - `, - }, - webpack(config) { - // allow .y(a)ml files to be imported within JS - config.module.rules.push({ - test: /\.ya?ml$/, - use: 'js-yaml-loader', - }); - - config.module.rules.push({ - test: /\.svg$/, - use: ['@svgr/webpack'], - }); - - return config; - }, -}; - -module.exports = nextConfig; diff --git a/package.json b/package.json index 51b5453..de66ee7 100644 --- a/package.json +++ b/package.json @@ -1,77 +1,57 @@ { - "name": "vmello-website", - "description": "Source code for Vitor Mello's personal website, built with Next.js and React", - "author": "Vitor Mello", - "private": true, + "name": "astro", + "type": "module", "version": "1.0.0", "engines": { "node": "^18.0.0" }, "scripts": { - "build": "next build", + "dev": "astro dev", + "start": "astro dev", + "build": "astro build", + "preview": "astro preview --port 8081", "lint": "yarn lint:js && yarn lint:css", "lint:js": "eslint --cache --cache-location node_modules/.cache/eslint/ .", - "lint:css": "stylelint \"src/**/*.scss\"", - "lint:css:fix": "stylelint --fix \"src/**/*.scss\"", - "export": "yarn build && next export", - "resume": "yarn export && concurrently --raw --kill-others --success first npm:serve npm:resume:export", - "resume:export": "node --trace-warnings -r esm cli/export-pdf-resume.js", - "start": "next dev -p 8091", - "start:prod": "next start -p 8091", - "serve": "node -r esm static.server.js" + "lint:css": "stylelint \"src/**/*.{css,scss,sass}\"", + "lint:css:fix": "stylelint --fix \"src/**/*.{css,scss,sass}\"", + "resume": "yarn build && yarn resume:generate", + "resume:generate": "concurrently --raw --kill-others --success first npm:preview npm:resume:save-pdf", + "resume:save-pdf": "node --trace-warnings cli/export-pdf-resume.mjs" }, "dependencies": { - "@fortawesome/fontawesome-free": "^6.4.2", - "@fortawesome/fontawesome-svg-core": "^6.4.2", - "@fortawesome/free-brands-svg-icons": "^6.4.2", - "@fortawesome/free-solid-svg-icons": "^6.4.2", - "@fortawesome/react-fontawesome": "^0.2.0", - "express": "^4.18.2", - "js-yaml-loader": "^1.2.2", + "@astrojs/tailwind": "^4.0.0", + "astro": "^2.10.3", + "astro-icon": "^0.8.1", "lodash": "^4.17.21", - "next": "^13.4.12", - "puppeteer": "^14.1.0", - "react": "^18.1.0", - "react-dom": "^18.1.0", "remark": "^14.0.3", - "remark-html": "^15.0.1", - "tailwindcss": "^3.0.18", - "tasuku": "^2.0.0", - "web-vitals": "^3.4.0" + "remark-html": "^15.0.2", + "tailwindcss": "^3.0.24" }, "devDependencies": { - "@next/eslint-plugin-next": "^13.4.12", - "@svgr/webpack": "^8.0.1", - "@types/google.analytics": "0.0.42", + "@rollup/plugin-yaml": "^4.1.1", "@types/lodash": "^4.14.196", - "@types/node": "^17.0.13", - "@types/react": "^18.2.18", - "@typescript-eslint/eslint-plugin": "^6.2.1", - "@typescript-eslint/parser": "^6.2.1", - "autoprefixer": "^10.4.14", + "@types/node": "^20.4.8", + "@typescript-eslint/eslint-plugin": "^6.3.0", + "@typescript-eslint/parser": "^6.3.0", "concurrently": "^8.2.0", "eslint": "^8.46.0", - "eslint-config-airbnb": "^19.0.4", - "eslint-config-airbnb-typescript": "^17.1.0", - "eslint-config-next": "^13.4.12", "eslint-config-prettier": "^9.0.0", + "eslint-import-resolver-typescript": "^3.5.5", + "eslint-plugin-astro": "^0.28.0", "eslint-plugin-import": "^2.28.0", - "eslint-plugin-jsx-a11y": "^6.7.1", - "eslint-plugin-prettier": "^5.0.0", - "eslint-plugin-react": "^7.33.1", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-tailwindcss": "^3.3.6", - "esm": "^3.2.25", - "postcss": "^8.4.13", - "prettier": "^3.0.1", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-tailwindcss": "^3.13.0", + "prettier": "2.8.8", + "prettier-plugin-astro": "0.10.0", + "puppeteer": "^14.1.0", "sass": "^1.64.2", "stylelint": "^15.10.2", "stylelint-config-sass-guidelines": "^10.0.0", - "typescript": "^5.1.6", - "typescript-plugin-css-modules": "^5.0.1" + "tasuku": "^2.0.1", + "vite-remark-html": "^1.1.1" }, "resolutions": { - "sass": "1.33.0" + "prettier": "2.8.8" }, "license": "MIT", "repository": { diff --git a/postcss.config.js b/postcss.config.js deleted file mode 100644 index 12a703d..0000000 --- a/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -}; diff --git a/public/assets/icons/github.svg b/public/assets/icons/github.svg deleted file mode 100644 index 1527089..0000000 --- a/public/assets/icons/github.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/public/assets/icons/linkedin.svg b/public/assets/icons/linkedin.svg deleted file mode 100644 index adc242d..0000000 --- a/public/assets/icons/linkedin.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/public/assets/icons/white.svg b/public/assets/icons/white.svg deleted file mode 100644 index 82149d2..0000000 --- a/public/assets/icons/white.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/public/vitor-mello-resume.pdf b/public/vitor-mello-resume.pdf index 9ab02c0..efb3746 100644 Binary files a/public/vitor-mello-resume.pdf and b/public/vitor-mello-resume.pdf differ diff --git a/src/components/AboutSection.astro b/src/components/AboutSection.astro new file mode 100644 index 0000000..1e2e322 --- /dev/null +++ b/src/components/AboutSection.astro @@ -0,0 +1,33 @@ +--- +import Section from 'src/components/Section.astro'; +import type { AboutSectionType } from 'src/content/homepage.yml'; + +const yearToday = new Date().getFullYear(); +const firstJobYear = 2008; + +const yearsExperience = String(yearToday - firstJobYear); + +interface Props { + data: AboutSectionType; +} + +const { data } = Astro.props; +--- + + + +
+
+
diff --git a/src/components/Footer.astro b/src/components/Footer.astro new file mode 100644 index 0000000..74e6760 --- /dev/null +++ b/src/components/Footer.astro @@ -0,0 +1,51 @@ +--- +import { Sprite } from 'astro-icon'; +--- + +
+
+ Loosely designed in Figma and coded in Visual Studio Code by yours truly. Built with Astro (why?) and Tailwind CSS, deployed with Vercel. +
+ + + +
diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx deleted file mode 100644 index 4505286..0000000 --- a/src/components/Footer/Footer.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { goToAnchorSmoothly } from 'src/functions/goToAnchorSmoothly'; - -const Footer = () => ( -
-
- Loosely designed in Figma and coded in Visual Studio Code by yours truly. Built with Next.js - and Tailwind CSS, deployed with Vercel. -
- -
- - - - - - -
-
- - Top ↑ - -
-
-); - -export { Footer }; diff --git a/src/components/Hero.astro b/src/components/Hero.astro new file mode 100644 index 0000000..113b7fa --- /dev/null +++ b/src/components/Hero.astro @@ -0,0 +1,56 @@ +--- +import { Sprite } from 'astro-icon'; +--- + +
+
+

Hi, my name is

+

+ Vitor Mello, +

+

+ I build things for the web. +

+

+ I'm a full-stack software engineer specializing in building digital experiences. + Previously, I was focused on building a global, connected and sustainable food system at{' '} + + Choco + + . +

+ + +
+
diff --git a/src/components/Layout/Layout.module.scss b/src/components/Layout/Layout.module.scss deleted file mode 100644 index 1e5f9c2..0000000 --- a/src/components/Layout/Layout.module.scss +++ /dev/null @@ -1,123 +0,0 @@ -.main { - color: $text-color; - background-color: $background-color; - font-family: Biotif, 'Helvetica Neue', Helvetica, Arial, sans-serif; - font-weight: 400; - font-size: 1rem; - line-height: 1.75; - - h1, - h2, - h3, - h4, - h5, - h6, - p, - ul, - ol, - dl, - address, - hr, - table { - margin-bottom: 0.55rem; - } - - h1 { - font-size: 2em; - } - - a, - button { - transition: all 0.15s linear; - } - - a { - color: $text-color-highlight; - text-decoration: none; - - &:hover { - color: $text-color-hover; - } - } - - p { - font-size: 0.91rem; - font-weight: 300; - margin: 0 0 1.375rem; - line-height: 1.7rem; - - &:last-child { - margin-bottom: 0; - } - } - - hr { - background-color: #404242; - height: 2px; - font-size: 0; - border: 0 solid #404242; - margin: 1.75rem 0; - } - - h1, - h2, - h3, - h4, - h5, - h6, - p, - ul, - ol, - dl, - address, - hr, - table { - margin-bottom: 0.55rem; - } - - h1 { - font-size: 2em; - } - - a, - button { - transition: all 0.15s linear; - } - - a { - color: $text-color-highlight; - text-decoration: none; - - &:hover { - color: $text-color-hover; - } - } - - body { - color: $text-color; - background-color: $shade2; - font-family: Lato, 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif; - font-weight: 400; - font-size: 1rem; - line-height: 1.75; - } - - p { - font-size: 0.91rem; - font-weight: 300; - margin: 0 0 1.375rem; - line-height: 1.7rem; - - &:last-child { - margin-bottom: 0; - } - } - - hr { - background-color: #404242; - height: 2px; - font-size: 0; - border: 0 solid #404242; - margin: 1.75rem 0; - } -} diff --git a/src/components/Layout/Layout.tsx b/src/components/Layout/Layout.tsx deleted file mode 100644 index cdcf6b0..0000000 --- a/src/components/Layout/Layout.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { ReactNode } from 'react'; -import { Menu } from 'src/components/Menu/Menu'; - -type LayoutProps = { - children: ReactNode; -}; - -const Layout = ({ children }: LayoutProps) => ( -
- - {children} -
-); - -export { Layout }; diff --git a/src/components/Layout/index.ts b/src/components/Layout/index.ts deleted file mode 100644 index 9877e7f..0000000 --- a/src/components/Layout/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './Layout'; diff --git a/src/components/Menu.astro b/src/components/Menu.astro new file mode 100644 index 0000000..eef9067 --- /dev/null +++ b/src/components/Menu.astro @@ -0,0 +1,83 @@ +--- +import { Sprite } from 'astro-icon'; +import TrackingEye from 'src/components/TrackingEye.astro'; + +const route = '/'; +--- + + + diff --git a/src/components/Menu/Menu.module.scss b/src/components/Menu/Menu.module.scss deleted file mode 100644 index 39b4852..0000000 --- a/src/components/Menu/Menu.module.scss +++ /dev/null @@ -1,32 +0,0 @@ -.link { - cursor: pointer; - text-decoration: none; - transition: none; - position: relative; - display: inline-block; - padding: 0.5rem 1rem; - - &::before { - z-index: 5; - content: ''; - width: 100%; - transition: transform 150ms ease-out; - position: absolute; - bottom: -6px; - height: 4px; - left: 0; - display: block; - background-color: transparent; - transform: rotate(0deg) scaleX(0); - background: $color-primary; - transform-origin: 0% 0%; - } - - &.active, - &:hover { - &::before { - bottom: -5px; - transform: rotate(-2deg) scaleX(100%); - } - } -} diff --git a/src/components/Menu/Menu.tsx b/src/components/Menu/Menu.tsx deleted file mode 100644 index 81f2722..0000000 --- a/src/components/Menu/Menu.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { useRouter } from 'next/router'; -import { TrackingEye } from 'src/components/TrackingEye/TrackingEye'; - -import { goToAnchorSmoothly } from 'src/functions/goToAnchorSmoothly'; -import styles from './Menu.module.scss'; - -const Menu = () => { - const { route } = useRouter(); - return ( -