diff --git a/.commitlintrc.json b/.commitlintrc.json new file mode 100644 index 0000000..c30e5a9 --- /dev/null +++ b/.commitlintrc.json @@ -0,0 +1,3 @@ +{ + "extends": ["@commitlint/config-conventional"] +} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..ac998cb --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +charset = utf-8 +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 +end_of_line = lf diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..dd1b004 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,9 @@ +{ + "extends": ["next", "next/core-web-vitals", "plugin:prettier/recommended"], + "plugins": ["prettier", "simple-import-sort"], + "rules": { + "prettier/prettier": "error", + "simple-import-sort/imports": "error", + "simple-import-sort/exports": "error" + } +} diff --git a/.gitignore b/.gitignore index ac0ee3e..88b6f0d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,28 +1,37 @@ -# Logs -logs -*.log +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* yarn-debug.log* yarn-error.log* -# Dependency directories -node_modules +# local env files +.env.local +.env.development.local +.env.test.local +.env.production.local -# Dotenv environment variable files -.env +# vercel +.vercel -# Gatsby files -.cache -public - -# Mac files -.DS_Store - -# Yarn -yarn-error.log -.yarn-integrity - -# Local Netlify folder -.netlify - -# Dev metadata file -*.temp.json +# typescript +*.tsbuildinfo diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 0000000..d71a03b --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..baec99a --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,5 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn lint-staged +yarn pretty-quick --staged diff --git a/.lintstagedrc.json b/.lintstagedrc.json new file mode 100644 index 0000000..e80e8be --- /dev/null +++ b/.lintstagedrc.json @@ -0,0 +1,3 @@ +{ + "*.{js,jsx,ts,tsx}": "eslint --fix" +} diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..b009dfb --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +lts/* diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..7264ee4 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,8 @@ +{ + "trailingComma": "none", + "tabWidth": 2, + "semi": false, + "singleQuote": true, + "arrowParens": "avoid", + "printWidth": 100 +} diff --git a/.renovaterc.json b/.renovaterc.json new file mode 100644 index 0000000..119fa38 --- /dev/null +++ b/.renovaterc.json @@ -0,0 +1,23 @@ +{ + "extends": ["config:base", ":disableDependencyDashboard"], + "labels": ["dependencies"], + "semanticCommits": "enabled", + "rangeStrategy": "replace", + "rebaseLabel": "rebase", + "rebaseWhen": "auto", + "packageRules": [ + { + "updateTypes": ["minor", "patch", "pin", "digest"], + "automerge": true + }, + { + "depTypeList": ["devDependencies"], + "automerge": true + } + ], + "lockFileMaintenance": { + "enabled": true, + "automerge": true + }, + "schedule": ["before 10am on the first day of the month"] +} diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 7c0e614..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,95 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [0.2.4](https://github.com/marscollective/gatsby-themes/compare/@marscollective/gatsby-starter-link-free@0.2.1...@marscollective/gatsby-starter-link-free@0.2.4) (2020-12-15) - -**Note:** Version bump only for package @marscollective/gatsby-starter-link-free - - - - - -## [0.2.3](https://github.com/marscollective/gatsby-themes/compare/@marscollective/gatsby-starter-link-free@0.2.1...@marscollective/gatsby-starter-link-free@0.2.3) (2020-12-15) - -**Note:** Version bump only for package @marscollective/gatsby-starter-link-free - - - - - -## [0.2.2](https://github.com/marscollective/gatsby-themes/compare/@marscollective/gatsby-starter-link-free@0.2.1...@marscollective/gatsby-starter-link-free@0.2.2) (2020-12-15) - -**Note:** Version bump only for package @marscollective/gatsby-starter-link-free - - - - - -## [0.2.1](https://github.com/marscollective/gatsby-theme-jdoe/compare/@marscollective/gatsby-starter-link-free@0.2.0...@marscollective/gatsby-starter-link-free@0.2.1) (2020-12-15) - -**Note:** Version bump only for package @marscollective/gatsby-starter-link-free - - - - - -# [0.2.0](https://github.com/marscollective/gatsby-theme-jdoe/compare/@marscollective/gatsby-starter-link-free@0.1.0...@marscollective/gatsby-starter-link-free@0.2.0) (2020-12-14) - - -### Bug Fixes - -* 🐛 Data import ([#34](https://github.com/marscollective/gatsby-theme-jdoe/issues/34)) ([5b3c7ed](https://github.com/marscollective/gatsby-theme-jdoe/commit/5b3c7eda09079aa827642d01594c280b7225bb3e)) - - - - - -# [0.1.0](https://github.com/marscollective/gatsby-theme-jdoe/compare/@marscollective/gatsby-starter-link-free@0.0.7...@marscollective/gatsby-starter-link-free@0.1.0) (2020-12-14) - -**Note:** Version bump only for package @marscollective/gatsby-starter-link-free - - - - - -## [0.0.7](https://github.com/marscollective/gatsby-theme-jdoe/compare/@marscollective/gatsby-starter-link-free@0.0.6...@marscollective/gatsby-starter-link-free@0.0.7) (2020-12-13) - - -### Bug Fixes - -* **deps:** pin dependencies ([#27](https://github.com/marscollective/gatsby-theme-jdoe/issues/27)) ([d640f09](https://github.com/marscollective/gatsby-theme-jdoe/commit/d640f097df149d53a1f8254cff7b7593836bbd03)) -* **deps:** update react monorepo to v17 ([#28](https://github.com/marscollective/gatsby-theme-jdoe/issues/28)) ([ffa7173](https://github.com/marscollective/gatsby-theme-jdoe/commit/ffa71730f668b79d9f0d9edb559ab1619ee22af0)) - - - - - -## [0.0.5](https://github.com/marscollective/gatsby-theme-jdoe/compare/@marscollective/gatsby-starter-link-free@0.0.4...@marscollective/gatsby-starter-link-free@0.0.5) (2020-12-12) - -**Note:** Version bump only for package @marscollective/gatsby-starter-link-free - - - - - -## [0.0.4](https://github.com/marscollective/gatsby-theme-jdoe/compare/@marscollective/gatsby-starter-link-free@0.0.3...@marscollective/gatsby-starter-link-free@0.0.4) (2020-12-12) - -**Note:** Version bump only for package @marscollective/gatsby-starter-link-free - - - - - -## [0.0.3](https://github.com/marscollective/gatsby-theme-jdoe/compare/@marscollective/gatsby-starter-link-free@0.0.2...@marscollective/gatsby-starter-link-free@0.0.3) (2020-12-12) - -**Note:** Version bump only for package @marscollective/gatsby-starter-link-free - - - - - -## 0.0.2 (2020-12-12) - -**Note:** Version bump only for package @marscollective/gatsby-starter-link-free diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2578328 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Daniel Soares + +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 deleted file mode 100644 index 7571b25..0000000 --- a/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# Gatsby Theme Link Free - -[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/marscollective/link-free&stack=cms) - -Link Free is an open-source alternative to paid, limited tools like [Linktree](https://linktr.ee/). - -![Link Free interface](content/link-free.png) - -It is developed by [Mars](https://marscollective.co/) using the Jamstack architecture, combining the power of Gatsby (React and GraphQL) with Tailwind CSS and Netlify CMS to provide a fast, reliable, and fully customizable tool, _served_ by the Netlify CDN. 🚀 - -You can see it in action by visiting [our Link Free page](https://links.marscollective.co/) 🌎, and while you're at it, go have a look at our social networks. 😉 - -## Why use it? - -Social networks like Instagram and TikTok do not provide support for clickable links on post captions. To circumvent this limitation, tools like Linktree appeared, providing users the ability to use their profile URL field to direct viewers to multiple destinations. - -While these tools are simple by design, we consider them to be more expensive and less customizable than they should. Using Linktree as an example, the free version doesn't even provide a proper color customization option, and even the paid version doesn't allow you to serve your page using a custom domain. - -## Available features - -Other than creating a link list, currently, you can: - -- Add a custom logo; -- Add a custom favicon; -- Integrate Google Analytics or Google Tag Manager with just an ID; -- Freely customize buttons, background, and font colors; -- Customize the button's border-radius (make it square or rounder). - -You can also live preview all your changes while you work on them. - -## Deploying your Link Free - -Just click the "Netlify" button at the top of this README. Yup, that's it. 😄 - -You just have to follow the instructions and you'll have a copy of our repository, with even our links so you can get used to the admin panel. - -## License and contributions - -This project is open source and you're free to fork and remix it to fit your needs. - -If there's any feature you'd like to see implemented, we'd love to see your feedback on our [issues page](https://github.com/marscollective/link-free/issues). While we can't promise to develop every request, we're happy to accept community contributions. diff --git a/content/404.md b/content/404.md deleted file mode 100644 index 56d10e5..0000000 --- a/content/404.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -key: '404' -title: '404:' -message: It looks like you're lost... -buttonLabel: Go back home 🏠 ---- diff --git a/content/favicon.png b/content/favicon.png deleted file mode 100644 index 7693997..0000000 Binary files a/content/favicon.png and /dev/null differ diff --git a/content/link-free.png b/content/link-free.png deleted file mode 100644 index 2773932..0000000 Binary files a/content/link-free.png and /dev/null differ diff --git a/content/links.md b/content/links.md deleted file mode 100644 index ffe3d7a..0000000 --- a/content/links.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -key: links -data: - - label: Chat with us on WhatsApp 💬 - url: https://wa.me/5545991328593 - - label: Follow us on Instagram 📸 - url: https://instagram.com/mars.collective - - label: See our portfolio on Behance 🎨 - url: https://www.behance.net/marscollective - - label: See what we're coding on Github 🧑‍💻 - url: https://github.com/marscollective - - label: Like us on Facebook 👍 - url: https://www.facebook.com/marscollective.co ---- diff --git a/content/logo.png b/content/logo.png deleted file mode 100644 index dde2a1f..0000000 Binary files a/content/logo.png and /dev/null differ diff --git a/content/metadata.yaml b/content/metadata.yaml deleted file mode 100644 index 8d7033c..0000000 --- a/content/metadata.yaml +++ /dev/null @@ -1,16 +0,0 @@ -title: Link free -shortTitle: Link free -siteUrl: https://themes.marscollective.co/link-free -description: '' -lang: en -logo: logo.png -favicon: favicon.png -rounded: '16' -colors: - DEFAULT: '#FAFAFA' - highlight: '#00d1b7' - accent: '#262626' - background: '#262626' -tracking: - which: none - id: '' diff --git a/gatsby-config.js b/gatsby-config.js deleted file mode 100644 index c5a63b9..0000000 --- a/gatsby-config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { plugins: [`@marscollective/gatsby-theme-link-free`] } diff --git a/netlify.toml b/netlify.toml deleted file mode 100644 index 276c4dc..0000000 --- a/netlify.toml +++ /dev/null @@ -1,6 +0,0 @@ -[build] - publish = "public" - command = "yarn build" - -[[plugins]] - package = "netlify-plugin-gatsby-cache" diff --git a/next-env.d.ts b/next-env.d.ts new file mode 100644 index 0000000..4f11a03 --- /dev/null +++ b/next-env.d.ts @@ -0,0 +1,5 @@ +/// +/// + +// 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 new file mode 100644 index 0000000..3b1c0fa --- /dev/null +++ b/next.config.js @@ -0,0 +1,7 @@ +/** @type {import('next').NextConfig} */ +module.exports = { + reactStrictMode: true, + eslint: { + dirs: ['./src/**/*'] + } +} diff --git a/package.json b/package.json index 53664d7..6662ae8 100644 --- a/package.json +++ b/package.json @@ -1,29 +1,38 @@ { - "name": "@marscollective/gatsby-starter-link-free", - "version": "0.2.4", + "name": "link-free", + "author": "Daniel Soares ", + "version": "1.0.0", "private": true, + "license": "MIT", "scripts": { - "build": "GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true gatsby build --log-pages", - "dev": "gatsby develop", - "serve": "gatsby serve", - "clean": "gatsby clean", - "deploy": "yarn build && netlify deploy -p", - "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md,mdx,yaml,yml}\"" + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint --fix", + "prepare": "husky install", + "clean": "rm -rf node_modules .next data public", + "type-check": "tsc" }, "dependencies": { - "@marscollective/gatsby-theme-link-free": "^0.2.7", - "gatsby": "2.32.11", + "@stitches/react": "^1.2.6", + "next": "12.0.7", "react": "17.0.2", "react-dom": "17.0.2" }, "devDependencies": { - "prettier": "2.2.1" - }, - "prettier": { - "trailingComma": "none", - "tabWidth": 2, - "semi": false, - "singleQuote": true, - "arrowParens": "avoid" + "@commitlint/cli": "15.0.0", + "@commitlint/config-conventional": "15.0.0", + "@types/node": "16.11.12", + "@types/react": "17.0.37", + "eslint": "8.4.1", + "eslint-config-next": "12.0.7", + "eslint-config-prettier": "8.3.0", + "eslint-plugin-prettier": "4.0.0", + "eslint-plugin-simple-import-sort": "7.0.0", + "husky": "7.0.4", + "lint-staged": "12.1.2", + "prettier": "2.5.0", + "pretty-quick": "3.1.2", + "typescript": "4.5.3" } -} \ No newline at end of file +} diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx new file mode 100644 index 0000000..93928c3 --- /dev/null +++ b/src/pages/_app.tsx @@ -0,0 +1,5 @@ +import type { AppProps } from 'next/app' + +export default function App({ Component, pageProps }: AppProps) { + return +} diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx new file mode 100644 index 0000000..9c73de3 --- /dev/null +++ b/src/pages/_document.tsx @@ -0,0 +1,19 @@ +import NextDocument, { Head, Html, Main, NextScript } from 'next/document' + +import { getCssText } from '../styles/stitches.config' + +export default class Document extends NextDocument { + render() { + return ( + + +