[
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\nko_fi: piyush\n"
  },
  {
    "path": ".github/workflows/update_authorsmd.yml",
    "content": "name: Update AUTHORS.md\n\non:\n  push:\n    branches: [ main, master ]\n\npermissions:\n  contents: write\n\njobs:\n  update-authors:\n    runs-on: ubuntu-latest\n\n    steps:\n    - uses: actions/checkout@v4.2.2\n      with:\n        fetch-depth: 0\n\n    - name: Make the script file executable\n      run: chmod +x ./scripts/update-authors.sh\n\n    - name: Run script to update authors data\n      run: ./scripts/update-authors.sh\n\n    - name: Commit and push changes\n      run: |\n        git config --local user.email \"github-actions[bot]@users.noreply.github.com\"\n        git config --local user.name \"github-actions[bot]\"\n        git add .\n        git diff --quiet && git diff --staged --quiet || git commit -m \"Autoupdate AUTHORS.md\"\n        git push"
  },
  {
    "path": ".gitignore",
    "content": "# Node modules.\nnode_modules\npackage-lock.json\n\n# Environmental variables.\n.env\n\n# Vercel.\n.vercel\n\n#package-lock\npackage-lock.json\n"
  },
  {
    "path": ".prettierrc",
    "content": "{\n  \"trailingComma\": \"none\",\n  \"arrowParens\": \"avoid\",\n  \"singleQuote\": true,\n  \"printWidth\": 80,\n  \"useTabs\": false,\n  \"tabWidth\": 2,\n  \"semi\": true\n}\n"
  },
  {
    "path": "AUTHORS.md",
    "content": "# Authors\n\n#### Ordered by first contribution.\n\n- Piyush Suthar (<32237558+PiyushSuthar@users.noreply.github.com>)\n- Ishaan Shaikh (<35690029+FlyingPhantom@users.noreply.github.com>)\n- Mini Ware (<codauknow@gmail.com>)\n- janaSunrise (<warriordefenderz@gmail.com>)\n- Abdullah Omar (<aljumaili2005@gmail.com>)\n- Samuel Corsi-House (<chouse.samuel@gmail.com>)\n- Reski Mulud Muchamad (<63949402+reskimulud@users.noreply.github.com>)\n- MagicLike (<contact.magiclike@protonmail.com>)\n- CodeWhiteWeb (<79645854+CodeWhiteWeb@users.noreply.github.com>)\n- Ehan (<ehanahamed@ehan.dev>)\n- Mohamed Bechir Mejri (<76930306+MohamedBechirMejri@users.noreply.github.com>)\n- Sunrit Jana (<warriordefenderz@gmail.com>)\n- AN ❦ (<108299225+krakxn@users.noreply.github.com>)\n- Lucas Alexander (<lucasalexander13@hotmail.com>)\n- PiyushSuthar (<piyushsuthar100@gmail.com>)\n- Adam Ross (<14985050+R055A@users.noreply.github.com>)\n- Ananth Krishnaswamy (<75056416+ANANTH-SWAMY@users.noreply.github.com>)\n- U-L-M-S (<96896184+U-L-M-S@users.noreply.github.com>)\n- Glitched Panda (<82221876+GlitchedPanda@users.noreply.github.com>)\n- Gabriel Mitelman Tkacz (<gmtkacz@proton.me>)\n- github-actions[bot] (<github-actions[bot]@users.noreply.github.com>)\n- Cole Morgan (<114717561+colemmorgan@users.noreply.github.com>)\n- Piyush Suthar (<piyushsuthar100@gmail.com>)\n\n#### Generated by scripts/update-authors.sh.\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2020 Piyush Suthar\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "<p align=\"center\">\n  <img align=\"center\" width=\"100\" src=\"assets/logo.png\" />\n\n  <h1 align=\"center\">Github Readme Quotes</h1>\n  <h3 align=\"center\">Developer Quotes for your Github Readme.</h3>\n</p>\n\n<!-- Badges -->\n<p align=\"center\">\n  <a href=\"https://github.com/PiyushSuthar/github-readme-quotes/issues\">\n    <img src=\"https://img.shields.io/github/issues/PiyushSuthar/github-readme-quotes?style=flat-square\">\n  </a>\n\n  <a href=\"https://github.com/PiyushSuthar/github-readme-quotes/pulls\">\n    <img src=\"https://img.shields.io/github/issues-pr/PiyushSuthar/github-readme-quotes?style=flat-square\">\n  </a>\n  \n  <a href=\"https://twitter.com/piyushsthr\" target=\"_blank\">\n    <img alt=\"Twitter: piyushsthr\" src=\"https://img.shields.io/twitter/follow/piyushsthr.svg?style=social\" />\n  </a>\n</p>\n\n<!-- Links -->\n<p align=\"center\">\n  <a href=\"https://quotes-github-readme.vercel.app/api\" target=\"_blank\">View Demo</a>\n  <span· </span>\n  <a href=\"https://github.com/piyushsuthar/github-readme-quotes/issues\" target=\"_blank\">Report Bug</a>\n</p>\n\n## Features ✨\n\n- [Dynamic quotes in your GitHub README](#Usage)\n- [Customize your own quote](#Custom)\n\n## Usage ⚡️\n\nCopy the markdown below and paste it in your Github Readme.\n\n```md\n[![Readme Quotes](https://quotes-github-readme.vercel.app/api?type=horizontal&theme=dark)](https://github.com/piyushsuthar/github-readme-quotes)\n```\n\n### Options\n\n| Options | Default  | Description                                                                                 |\n| ------- | -------- | ------------------------------------------------------------------------------------------- |\n| type    | vertical | Available: horizontal, vertical                                                             |\n| theme   | light    | [Available themes](#themes)                                                                 |\n| quote   | -        | Customize your quote                                                                        |\n| author  | -        | The name of the quote's author                                                              |\n| border  | false    | Available: true, false                                                                      |\n\n<details id=\"themes\">\n<summary>Themes</summary>\n\n- light\n- dark\n- algolia\n- catppuccin\n- catppuccin_frappe\n- catppuccin_latte\n- catppuccin_macchiato\n- catppuccin_mocha\n- chartreuse-dark\n- dracula\n- github\n- github_dark\n- github_blue\n- graywhite\n- gruvbox\n- hackerman\n- merko\n- monokai\n- moonlight\n- nord\n- radical\n- shadow_blue\n- shadow_green\n- shadow_red\n- tokyonight\n\n</details>\n\n## Installation and Development 🚀\n\nTo get started with developing this app locally, here are the steps:\n\nInstall the dependencies for the app using,\n\n```sh\npnpm install\n```\n\nAnd then run the app using:\n\n```sh\nnpx vercel dev\n```\n\n## Customization\n\n### Horizontal\n\nAdd the **?type=horizontal** parameter.\n\n[![readme Quotes](https://quotes-github-readme.vercel.app/api?type=horizontal)](https://github.com/piyushsuthar/github-readme-quotes)\n\n### Border\n\nAdd the **?border=true** parameter.\n\n[![readme Quotes](https://quotes-github-readme.vercel.app/api?border=true)](https://github.com/piyushsuthar/github-readme-quotes)\n\n### Theme\n\n> The default theme will be light if a user is using light mode and dark themed if they are using dark mode.\n\n### Light\n\n> You need to add **?theme=light** parameter.\n\ndark\n\n[![readme Quotes](https://quotes-github-readme.vercel.app/api?type=horizontal&theme=dark)](https://github.com/piyushsuthar/github-readme-quotes)\n\ncatppuccin_mocha\n\n[![readme Quotes](https://quotes-github-readme.vercel.app/api?type=horizontal&theme=catppuccin_mocha)](https://github.com/piyushsuthar/github-readme-quotes)\n\ntokyonight\n\n[![readme Quotes](https://quotes-github-readme.vercel.app/api?type=horizontal&theme=tokyonight)](https://github.com/piyushsuthar/github-readme-quotes)\n\nmonokai\n\n[![readme Quotes](https://quotes-github-readme.vercel.app/api?type=horizontal&theme=monokai)](https://github.com/piyushsuthar/github-readme-quotes)\n\ngithub_dark\n\n[![readme Quotes](https://quotes-github-readme.vercel.app/api?type=horizontal&theme=github_dark)](https://github.com/piyushsuthar/github-readme-quotes)\n\n## Custom\n\n### Custom Quotes\n\nAdd the **?quote=Your Quote** parameter.\nYou must [URL encode](https://en.wikipedia.org/wiki/Percent-encoding) your quote.\n\n[![readme Quotes](https://quotes-github-readme.vercel.app/api?quote=My%20Quote&type=horizontal)](https://github.com/piyushsuthar/github-readme-quotes)\n\n### Custom Colors\n\nYou can also customize colors directly via query parameters:\n\n- `quoteColor`: Color for the quote text (hex code without #)\n- `authorColor`: Color for the author text (hex code without #)\n- `backgroundColor`: Color for the background (hex code without #)\n- `symbolColor`: Color for the quote symbols (hex code without #)\n\nExamples:\n\n1. `?quoteColor=ff0000&authorColor=00ff00&backgroundColor=0000ff&symbolColor=ffff00`\n\n[![Readme Quotes](https://quotes-github-readme.vercel.app/api?quoteColor=ff0000&authorColor=00ff00&backgroundColor=0000ff&symbolColor=ffff00&type=horizontal)](https://github.com/piyushsuthar/github-readme-quotes)\n\n\n2. `?theme=dark&quoteColor=ff0000` (This will use the dark theme but override the quote color with red.)\n\n[![Readme Quotes](https://quotes-github-readme.vercel.app/api?theme=dark&quoteColor=ff0000&type=horizontal)](https://github.com/piyushsuthar/github-readme-quotes)\n\n## Contributing 🤝\n\nContributions, issues and feature requests are welcome!\n\nFeel free to check [issues page](https://github.com/PiyushSuthar/github-readme-quotes/issues).\n\n## Special Thanks ❤\n\n- Inspired from [AnuragHazra/github-readme-stats](https://github.com/anuraghazra/github-readme-stats).\n- [skolakoda/programming-quotes-api](https://github.com/skolakoda/programming-quotes-api) for Quotes API.\n- And a huge shoutout to [Mini Ware](https://github.com/Mini-Ware) for his immense contribution to this project!\n\n## Show your support 🌈\n\nBe sure to drop a 🌟 if you like the project!\n\n## Author 🤗\n\n👤 **Piyush Suthar**\n\n- Website: https://piyushsuthar.github.io\n- Twitter: [@piyushsthr](https://twitter.com/piyushsthr)\n- Github: [@PiyushSthr](https://github.com/PiyushSthr)\n- LinkedIn: [@piyushsthr](https://linkedin.com/in/piyushsthr)\n\n<div align=\"center\">Made by Piyush with ❤ and TypeScript</div>\n"
  },
  {
    "path": "api/index.ts",
    "content": "import type { VercelRequest, VercelResponse } from '@vercel/node';\n\nimport { fetchQuotes } from '../src/fetcher/fetch-quotes';\nimport { renderSVG } from '../src/renderer/render-svg';\nimport { themes } from '../src/renderer/theme/awesome-card';\n\nimport type { CardType } from '../src/renderer/render-svg';\n\ninterface ResponseQuery {\n  type: CardType;\n  theme: keyof typeof themes;\n  quote: string;\n  author: string;\n  border: boolean;\n  // Custom color parameters\n  quoteColor?: string;\n  authorColor?: string;\n  backgroundColor?: string;\n  symbolColor?: string;\n}\n\nconst handler = async (req: VercelRequest, res: VercelResponse) => {\n  const { \n    type, \n    theme, \n    quote, \n    author, \n    border,\n    quoteColor,\n    authorColor,\n    backgroundColor,\n    symbolColor\n  } = req.query as unknown as ResponseQuery;\n\n  let data;\n\n  if (quote && author) {\n    data = {\n      quote: quote,\n      author: author\n    };\n  } else if (quote) {\n    data = {\n      quote: quote,\n      author: 'Me'\n    };\n  } else {\n    data = await fetchQuotes();\n  }\n\n  // Custom colors object\n  const customColors = {\n    quote: quoteColor,\n    author: authorColor,\n    background: backgroundColor,\n    symbol: symbolColor\n  };\n\n  // Send the quote image response.\n  res.setHeader('Content-Type', 'image/svg+xml');\n  res.setHeader('Cache-Control', `public, max-age=600`);\n  res.send(renderSVG(data, type, theme, border, customColors));\n};\n\nexport default handler;\n"
  },
  {
    "path": "data/themes.json",
    "content": "{\n  \"default\": {\n    \"quote\": \"333\",\n    \"author\": \"2f80ed\",\n    \"background\": \"fffefe\",\n    \"symbol\": \"4c71f2\"\n  },\n  \"defaultDarkModeSupport\": {\n    \"quote\": \"9f9f9f\",\n    \"author\": \"fff\",\n    \"background\": \"151515\",\n    \"symbol\": \"79ff97\"\n  },\n  \"chartreuse-dark\": {\n    \"quote\": \"fff\",\n    \"author\": \"7fff00\",\n    \"background\": \"000\",\n    \"symbol\": \"00AEFF\"\n  },\n  \"radical\": {\n    \"quote\": \"a9fef7\",\n    \"author\": \"fe428e\",\n    \"background\": \"141321\",\n    \"symbol\": \"f8d847\"\n  },\n  \"merko\": {\n    \"quote\": \"68b587\",\n    \"author\": \"abd200\",\n    \"background\": \"0a0f0b\",\n    \"symbol\": \"b7d364\"\n  },\n  \"gruvbox\": {\n    \"quote\": \"8ec07c\",\n    \"author\": \"fabd2f\",\n    \"background\": \"282828\",\n    \"symbol\": \"fe8019\"\n  },\n  \"tokyonight\": {\n    \"quote\": \"38bdae\",\n    \"author\": \"70a5fd\",\n    \"background\": \"1a1b27\",\n    \"symbol\": \"bf91f3\"\n  },\n  \"catppuccin\": {\n    \"quote\": \"96CDFB\",\n    \"author\": \"D9E0EE\",\n    \"background\": \"161320\",\n    \"symbol\": \"DDB6F2\"\n  },\n  \"catppuccin_latte\": {\n    \"quote\": \"179299\",\n    \"author\": \"4c4f69\",\n    \"background\": \"eff1f5\",\n    \"symbol\": \"8839ef\"\n  },\n  \"catppuccin_frappe\": {\n    \"quote\": \"81c8be\",\n    \"author\": \"c6d0f5\",\n    \"background\": \"303446\",\n    \"symbol\": \"ca9ee6\"\n  },\n  \"catppuccin_macchiato\": {\n    \"quote\": \"8bd5ca\",\n    \"author\": \"cad3f5\",\n    \"background\": \"24273a\",\n    \"symbol\": \"c6a0f6\"\n  },\n  \"catppuccin_mocha\": {\n    \"quote\": \"94e2d5\",\n    \"author\": \"cdd6f4\",\n    \"background\": \"1e1e2e\",\n    \"symbol\": \"cba6f7\"\n  },\n  \"algolia\": {\n    \"quote\": \"00ADFE\",\n    \"author\": \"FEFEFE\",\n    \"background\": \"050F2C\",\n    \"symbol\": \"26BB85\"\n  },\n  \"monokai\": {\n    \"quote\": \"EA1F6A\",\n    \"author\": \"CFCFC9\",\n    \"background\": \"272822\",\n    \"symbol\": \"E18905\"\n  },\n  \"dracula\": {\n    \"quote\": \"F8F8F2\",\n    \"author\": \"6272A4\",\n    \"background\": \"282A36\",\n    \"symbol\": \"FF79c6\"\n  },\n  \"nord\": {\n    \"quote\": \"D8DEE9\",\n    \"author\": \"4C566A\",\n    \"background\": \"2E3440\",\n    \"symbol\": \"88C0D0\"\n  },\n  \"github\": {\n    \"quote\": \"FFFFFF\",\n    \"author\": \"4C566A\",\n    \"background\": \"0D1117\",\n    \"symbol\": \"43C293\"\n  },\n  \"github_dark\": {\n    \"quote\": \"C3D1D9\",\n    \"author\": \"58A6FF\",\n    \"background\": \"0D1117\",\n    \"symbol\": \"1F6FEB\"\n  },\n  \"github_blue\": {\n    \"quote\": \"C7D5E0\",\n    \"author\": \"56A1F7\",\n    \"background\": \"0D1117\",\n    \"symbol\": \"F9826C\"\n  },\n  \"graywhite\": {\n    \"quote\": \"24292E\",\n    \"author\": \"24292E\",\n    \"background\": \"FFFFFF\",\n    \"symbol\": \"24292E\"\n  },\n  \"moonlight\": {\n    \"quote\": \"F8F8F8\",\n    \"author\": \"FF757F\",\n    \"background\": \"222436\",\n    \"symbol\": \"599DFF\"\n  },\n  \"hackerman\": {\n    \"quote\": \"00B3D6\",\n    \"author\": \"00B3D6\",\n    \"background\": \"000000\",\n    \"symbol\": \"00B3D6\"\n  },\n  \"shadow_red\": {\n    \"quote\": \"9A0000\",\n    \"author\": \"9A0000\",\n    \"background\": \"151515\",\n    \"symbol\": \"4F0000\"\n  },\n  \"shadow_green\": {\n    \"quote\": \"007A00\",\n    \"author\": \"007A00\",\n    \"background\": \"151515\",\n    \"symbol\": \"003D00\"\n  },\n  \"shadow_blue\": {\n    \"quote\": \"00779A\",\n    \"author\": \"00779A\",\n    \"background\": \"151515\",\n    \"symbol\": \"004490\"\n  }\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"random-quotes-github-readme\",\n  \"version\": \"1.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"format\": \"prettier --write \\\"./**/*.{ts,json,md}\\\"\"\n  },\n  \"dependencies\": {\n    \"axios\": \"^1.0.0\"\n  },\n  \"author\": \"Piyush Suthar\",\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"@vercel/node\": \"^2.5.22\",\n    \"prettier\": \"^2.7.1\",\n    \"typescript\": \"^4.8.4\",\n    \"vercel\": \"^28.4.8\"\n  }\n}\n"
  },
  {
    "path": "scripts/update-authors.sh",
    "content": "#!/bin/sh\n# Update AUTHORS.md based on git history.\n\ngit log --reverse --format='%aN (<%aE>)' | perl -we '\nBEGIN {\n  %seen = (), @authors = ();\n}\nwhile (<>) {\n  next if $seen{$_};\n  next if /(dependabot\\[bot\\])/;\n  $seen{$_} = push @authors, \"- \", $_;\n}\nEND {\n  print \"# Authors\\n\\n\";\n  print \"#### Ordered by first contribution.\\n\\n\";\n  print @authors, \"\\n\";\n  print \"#### Generated by scripts/update-authors.sh.\\n\";\n}\n' > AUTHORS.md"
  },
  {
    "path": "src/fetcher/fetch-quotes.ts",
    "content": "import axios from 'axios';\n\ninterface ParseDataParams {\n  text: string;\n  author: string;\n}\n\ninterface ParseDataReturn {\n  quote: string;\n  author: string;\n}\n\nconst parseData = (data: ParseDataParams): ParseDataReturn => {\n  return {\n    quote: data.text,\n    author: data.author\n  };\n};\n\n// Recursively find a random quote of correct length.\nconst randomQuote = (data: ParseDataParams[]): ParseDataParams => {\n  // Filter out invalid entries.\n  const validQuotes = data.filter(quote => quote && typeof quote.text === 'string');\n\n  // If no valid quotes exist, throw an error.\n  if (validQuotes.length === 0) {\n    throw new Error('No valid quotes found in the data.');\n  }\n\n  // Get a random quote.\n  let randQuote = validQuotes[Math.floor(Math.random() * validQuotes.length)];\n\n  // Check length and recurse if necessary.\n  return randQuote.text.length < 220 ? randQuote : randomQuote(validQuotes);\n};\n\nexport async function fetchQuotes(): Promise<ParseDataReturn> {\n  const response = await axios.get(\n    'https://github.com/mudroljub/programming-quotes-api/raw/master/data/quotes.json'\n  );\n\n  const data: ParseDataParams[] = response.data;\n\n  // Validate the fetched data.\n  if (!Array.isArray(data)) {\n    throw new Error('Fetched data is not an array.');\n  }\n\n  // Get a random quote.\n  let randQuote = randomQuote(data);\n\n  // Parse the data and return it.\n  return parseData(randQuote);\n}\n"
  },
  {
    "path": "src/renderer/constants.ts",
    "content": "export const poppinsFontSVG = `\n  <defs>\n    <style type=\"text/css\">\n      <![CDATA[\n          @font-face {\n              font-family: 'Poppins';\n              font-style: normal;\n              font-weight: 400;\n              src: url(https://fonts.gstatic.com/s/poppins/v15/pxiEyp8kv8JHgFVrJJfecg.woff2) format('woff2');\n              unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n          }\n      ]]>\n    </style>\n  </defs>\n`;\n"
  },
  {
    "path": "src/renderer/render-svg.ts",
    "content": "import { renderTheme, themes } from './theme/awesome-card';\nimport { renderHorizontal } from './type/horizontal-card';\nimport { renderVertical } from './type/vertical-card';\n\nexport type CardType = 'vertical' | 'horizontal' | undefined;\n\nexport interface CustomColors {\n  quote?: string;\n  author?: string;\n  background?: string;\n  symbol?: string;\n}\n\nexport const renderSVG = (\n  data: { quote: string; author: string },\n  type: CardType,\n  theme: keyof typeof themes,\n  border: boolean,\n  customColors?: CustomColors\n) => {\n  const { quote, author } = data;\n\n  // If the theme exists in the list of themes, render the specific theme.\n  // Else, render the default theme.\n  // Also pass custom colors for overriding theme values\n  const color = renderTheme(theme, customColors);\n\n  switch (type) {\n    case 'vertical':\n      return renderVertical({ quote, author, color, border });\n    case 'horizontal':\n      return renderHorizontal({ quote, author, color, border });\n    default:\n      return renderVertical({ quote, author, color, border });\n  }\n};\n"
  },
  {
    "path": "src/renderer/theme/awesome-card.ts",
    "content": "import themesData from '../../../data/themes.json';\n\nexport interface Theme {\n  quote: string;\n  author: string;\n  background: string;\n  symbol: string;\n}\n\nexport interface CustomColors {\n  quote?: string;\n  author?: string;\n  background?: string;\n  symbol?: string;\n}\n\nexport const themes: Record<string, Theme> = themesData;\n\nexport const renderTheme = (theme: keyof typeof themes, customColors?: CustomColors): Theme | null => {\n  let baseTheme: Theme;\n\n  // If no theme, return null\n  if (theme == null && customColors == null) {\n    return null;\n  }\n  \n  if (themes[theme] && theme !== 'light' && theme !== 'dark') {\n    baseTheme = themes[theme];\n  } else if (theme == 'dark') {\n    baseTheme = themes.defaultDarkModeSupport;\n  } else {\n    baseTheme = themes.default;\n  } \n\n  if (!customColors) {\n    return baseTheme;\n  }\n\n  return {\n    quote: customColors.quote || baseTheme.quote,\n    author: customColors.author || baseTheme.author,\n    background: customColors.background || baseTheme.background,\n    symbol: customColors.symbol || baseTheme.symbol\n  };\n};\n\n// Gets dynamic styles for the quote\nexport const getThemeStyles = (color : Theme | null, border: boolean) : string => {\n  // If there is a matching theme, use its styles\n  if (color) {\n    return `\n      .container {\n        background-color: #${color.background};\n        border: ${border ? \"3px solid #\"+color.symbol : \"1px solid rgba(0, 0, 0, 0.2)\"};\n      }\n      .container h3 {\n        color: #${color.quote};\n      }\n      .container h3::before, .container h3::after {\n        color: #${color.symbol};\n      }\n      .container p {\n        color: #${color.author};\n      }\n    `;\n  }\n  // If there is no theme explicitly provided, render dark/light mode\n  // based on user's color preferences.\n  return `\n    /* Default light theme */\n    .container {\n      background-color: #${themes.default.background};\n      border: ${border ? \"3px solid #\"+themes.default.symbol : \"1px solid rgba(0, 0, 0, 0.2)\"};\n    }\n    .container h3 {\n      color: #${themes.default.quote};\n    }\n    .container h3::before, .container h3::after {\n      color: #${themes.default.symbol};\n    }\n    .container p {\n      color: #${themes.default.author};\n    }\n    \n    /* Override for dark mode based on system settings */\n    @media (prefers-color-scheme: dark) {\n      .container {\n        background-color: #${themes.defaultDarkModeSupport.background};\n        border: ${border ? \"3px solid #\"+themes.defaultDarkModeSupport.symbol : \"1px solid rgba(0, 0, 0, 0.2)\"};\n      }\n      .container h3 {\n        color: #${themes.defaultDarkModeSupport.quote};\n      }\n      .container h3::before, .container h3::after {\n        color: #${themes.defaultDarkModeSupport.symbol};\n      }\n      .container p {\n        color: #${themes.defaultDarkModeSupport.author};\n      }\n    }\n  `;\n}\n"
  },
  {
    "path": "src/renderer/type/horizontal-card.ts",
    "content": "import { poppinsFontSVG } from '../constants';\nimport { getThemeStyles, Theme } from '../theme/awesome-card';\n\ninterface Props {\n  quote: string;\n  author: string;\n  color: Theme | null;\n  border: boolean;\n}\n\nexport const renderHorizontal = ({ quote, author, color, border }: Props) => {\n  const themeStyles = getThemeStyles(color, border); // gets css styling for specific theme\n\n  const renderedSVG = `\n  <svg width=\"600\" height=\"auto\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n    <foreignObject width=\"100%\" height=\"100%\">\n      <div xmlns=\"http://www.w3.org/1999/xhtml\">\n        ${poppinsFontSVG}\n        <style>\n          * {\n            padding: 0;\n            margin: 0;\n            box-sizing: border-box;\n          }\n          .container {\n            font-family: Poppins, Arial, Helvetica, sans-serif;\n            padding: 20px;\n            width: 600px;\n            border-radius: 10px;\n          }\n          .container h3 {\n            font-size: 19px;\n            margin-bottom: 5px;\n            font-weight: 500;\n            font-style: oblique;\n          }\n          .container h3::before {\n            content: open-quote;\n            font-size: 25px;\n          }\n          .container h3::after {\n            content: close-quote;\n            vertical-align: sub;\n            font-size: 25px;\n          }\n          .container p {\n            font-style: italic;\n            padding: 5px;\n            text-align: right;\n          }\n          ${themeStyles}\n        </style>\n        <div class=\"container\">\n          <h3>${quote}</h3>\n          <p>- ${author}</p>\n        </div>\n      </div>\n    </foreignObject>\n  </svg>\n  `;\n\n  return renderedSVG;\n};\n"
  },
  {
    "path": "src/renderer/type/vertical-card.ts",
    "content": "import { poppinsFontSVG } from '../constants';\nimport { getThemeStyles, Theme, themes } from '../theme/awesome-card';\n\ninterface Props {\n  quote: string;\n  author: string;\n  color: Theme | null ;\n  border: boolean;\n}\n\nexport const renderVertical = ({ quote, author, color, border }: Props) => {\n  const themeStyles = getThemeStyles(color, border); // gets css styling for specific theme\n  \n  const renderedSVG = `\n  <svg width=\"300\" height=\"300\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n    <foreignObject width=\"100%\" height=\"100%\">\n      <div xmlns=\"http://www.w3.org/1999/xhtml\">\n        ${poppinsFontSVG}\n        <style>\n          * {\n            margin: 0;\n            padding: 0;\n            box-sizing: border-box;\n          }\n          .container {\n            width: 300px;\n            height: 300px;\n            font-family: Poppins, Arial, Helvetica, sans-serif;\n            padding: 15px;\n            display: flex;\n            flex-direction: column;\n            align-items: center;\n            justify-content: center;\n            text-align: center;\n            border-radius: 10px;\n          }\n          .container h3::before {\n            content: open-quote;\n            font-size: 50px;\n            display: block;\n            margin-bottom: -20px;\n          }\n          .container h3::after {\n            content: close-quote;\n            font-size: 50px;\n            display: block;\n            margin-bottom: -20px;\n          }\n          .container h3 {\n            margin-bottom: 15px;\n          }\n          .container p {\n            font-style: italic;\n          }\n          ${themeStyles}\n        </style>\n        <div class=\"container\">\n          <h3>${quote}</h3>\n          <p>- ${author}</p>\n        </div>\n      </div>\n    </foreignObject>\n  </svg>\n  `;\n\n\n  return renderedSVG;\n};\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"include\": [\"src\", \"api\"],\n  \"compilerOptions\": {\n    /* Visit https://aka.ms/tsconfig to read more about this file */\n\n    /* Projects */\n    // \"incremental\": true,                              /* Save .tsbuildinfo files to allow for incremental compilation of projects. */\n    // \"composite\": true,                                /* Enable constraints that allow a TypeScript project to be used with project references. */\n    // \"tsBuildInfoFile\": \"./.tsbuildinfo\",              /* Specify the path to .tsbuildinfo incremental compilation file. */\n    // \"disableSourceOfProjectReferenceRedirect\": true,  /* Disable preferring source files instead of declaration files when referencing composite projects. */\n    // \"disableSolutionSearching\": true,                 /* Opt a project out of multi-project reference checking when editing. */\n    // \"disableReferencedProjectLoad\": true,             /* Reduce the number of projects loaded automatically by TypeScript. */\n\n    /* Language and Environment */\n    \"target\": \"es2016\" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,\n    // \"lib\": [],                                        /* Specify a set of bundled library declaration files that describe the target runtime environment. */\n    // \"jsx\": \"preserve\",                                /* Specify what JSX code is generated. */\n    // \"experimentalDecorators\": true,                   /* Enable experimental support for TC39 stage 2 draft decorators. */\n    // \"emitDecoratorMetadata\": true,                    /* Emit design-type metadata for decorated declarations in source files. */\n    // \"jsxFactory\": \"\",                                 /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */\n    // \"jsxFragmentFactory\": \"\",                         /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */\n    // \"jsxImportSource\": \"\",                            /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */\n    // \"reactNamespace\": \"\",                             /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */\n    // \"noLib\": true,                                    /* Disable including any library files, including the default lib.d.ts. */\n    // \"useDefineForClassFields\": true,                  /* Emit ECMAScript-standard-compliant class fields. */\n    // \"moduleDetection\": \"auto\",                        /* Control what method is used to detect module-format JS files. */\n\n    /* Modules */\n    \"module\": \"commonjs\" /* Specify what module code is generated. */,\n    //\"rootDir\": \"./\",                                  /* Specify the root folder within your source files. */\n    // \"moduleResolution\": \"node\",                       /* Specify how TypeScript looks up a file from a given module specifier. */\n    // \"baseUrl\": \"./\",                                  /* Specify the base directory to resolve non-relative module names. */\n    // \"paths\": {},                                      /* Specify a set of entries that re-map imports to additional lookup locations. */\n    // \"rootDirs\": [],                                   /* Allow multiple folders to be treated as one when resolving modules. */\n    // \"typeRoots\": [],                                  /* Specify multiple folders that act like './node_modules/@types'. */\n    // \"types\": [],                                      /* Specify type package names to be included without being referenced in a source file. */\n    // \"allowUmdGlobalAccess\": true,                     /* Allow accessing UMD globals from modules. */\n    // \"moduleSuffixes\": [],                             /* List of file name suffixes to search when resolving a module. */\n    \"resolveJsonModule\": true,                           /* Enable importing .json files. */\n    // \"noResolve\": true,                                /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */\n\n    /* JavaScript Support */\n    // \"allowJs\": true,                                  /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */\n    // \"checkJs\": true,                                  /* Enable error reporting in type-checked JavaScript files. */\n    // \"maxNodeModuleJsDepth\": 1,                        /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */\n\n    /* Emit */\n    // \"declaration\": true,                              /* Generate .d.ts files from TypeScript and JavaScript files in your project. */\n    // \"declarationMap\": true,                           /* Create sourcemaps for d.ts files. */\n    // \"emitDeclarationOnly\": true,                      /* Only output d.ts files and not JavaScript files. */\n    // \"sourceMap\": true,                                /* Create source map files for emitted JavaScript files. */\n    // \"outFile\": \"./\",                                  /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */\n    // \"outDir\": \"./\",                                   /* Specify an output folder for all emitted files. */\n    // \"removeComments\": true,                           /* Disable emitting comments. */\n    // \"noEmit\": true,                                   /* Disable emitting files from a compilation. */\n    // \"importHelpers\": true,                            /* Allow importing helper functions from tslib once per project, instead of including them per-file. */\n    // \"importsNotUsedAsValues\": \"remove\",               /* Specify emit/checking behavior for imports that are only used for types. */\n    // \"downlevelIteration\": true,                       /* Emit more compliant, but verbose and less performant JavaScript for iteration. */\n    // \"sourceRoot\": \"\",                                 /* Specify the root path for debuggers to find the reference source code. */\n    // \"mapRoot\": \"\",                                    /* Specify the location where debugger should locate map files instead of generated locations. */\n    // \"inlineSourceMap\": true,                          /* Include sourcemap files inside the emitted JavaScript. */\n    // \"inlineSources\": true,                            /* Include source code in the sourcemaps inside the emitted JavaScript. */\n    // \"emitBOM\": true,                                  /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */\n    // \"newLine\": \"crlf\",                                /* Set the newline character for emitting files. */\n    // \"stripInternal\": true,                            /* Disable emitting declarations that have '@internal' in their JSDoc comments. */\n    // \"noEmitHelpers\": true,                            /* Disable generating custom helper functions like '__extends' in compiled output. */\n    // \"noEmitOnError\": true,                            /* Disable emitting files if any type checking errors are reported. */\n    // \"preserveConstEnums\": true,                       /* Disable erasing 'const enum' declarations in generated code. */\n    // \"declarationDir\": \"./\",                           /* Specify the output directory for generated declaration files. */\n    // \"preserveValueImports\": true,                     /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */\n\n    /* Interop Constraints */\n    // \"isolatedModules\": true,                          /* Ensure that each file can be safely transpiled without relying on other imports. */\n    // \"allowSyntheticDefaultImports\": true,             /* Allow 'import x from y' when a module doesn't have a default export. */\n    \"esModuleInterop\": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,\n    // \"preserveSymlinks\": true,                         /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */\n    \"forceConsistentCasingInFileNames\": true /* Ensure that casing is correct in imports. */,\n\n    /* Type Checking */\n    \"strict\": true /* Enable all strict type-checking options. */,\n    // \"noImplicitAny\": true,                            /* Enable error reporting for expressions and declarations with an implied 'any' type. */\n    // \"strictNullChecks\": true,                         /* When type checking, take into account 'null' and 'undefined'. */\n    // \"strictFunctionTypes\": true,                      /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */\n    // \"strictBindCallApply\": true,                      /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */\n    // \"strictPropertyInitialization\": true,             /* Check for class properties that are declared but not set in the constructor. */\n    // \"noImplicitThis\": true,                           /* Enable error reporting when 'this' is given the type 'any'. */\n    // \"useUnknownInCatchVariables\": true,               /* Default catch clause variables as 'unknown' instead of 'any'. */\n    // \"alwaysStrict\": true,                             /* Ensure 'use strict' is always emitted. */\n    // \"noUnusedLocals\": true,                           /* Enable error reporting when local variables aren't read. */\n    // \"noUnusedParameters\": true,                       /* Raise an error when a function parameter isn't read. */\n    // \"exactOptionalPropertyTypes\": true,               /* Interpret optional property types as written, rather than adding 'undefined'. */\n    // \"noImplicitReturns\": true,                        /* Enable error reporting for codepaths that do not explicitly return in a function. */\n    // \"noFallthroughCasesInSwitch\": true,               /* Enable error reporting for fallthrough cases in switch statements. */\n    // \"noUncheckedIndexedAccess\": true,                 /* Add 'undefined' to a type when accessed using an index. */\n    // \"noImplicitOverride\": true,                       /* Ensure overriding members in derived classes are marked with an override modifier. */\n    // \"noPropertyAccessFromIndexSignature\": true,       /* Enforces using indexed accessors for keys declared using an indexed type. */\n    // \"allowUnusedLabels\": true,                        /* Disable error reporting for unused labels. */\n    // \"allowUnreachableCode\": true,                     /* Disable error reporting for unreachable code. */\n\n    /* Completeness */\n    // \"skipDefaultLibCheck\": true,                      /* Skip type checking .d.ts files that are included with TypeScript. */\n    \"skipLibCheck\": true /* Skip type checking all .d.ts files. */\n  }\n}\n"
  },
  {
    "path": "vercel.json",
    "content": "{\n  \"functions\": {\n    \"api/*.ts\": {\n      \"memory\": 128,\n      \"maxDuration\": 10\n    }\n  },\n  \"redirects\": [\n    {\n      \"source\": \"/\",\n      \"destination\": \"https://github.com/PiyushSuthar/github-readme-quotes\"\n    }\n  ]\n}\n"
  }
]