├── .eslintrc.json ├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ └── bug.md ├── .gitignore ├── LICENSE ├── README.md ├── api └── index.js ├── package.json ├── src ├── jokes.json ├── renderJokesCard.js ├── themes.json └── utils.js └── vercel.json /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "commonjs": true, 5 | "es2021": true 6 | }, 7 | "extends": [ 8 | "airbnb-base" 9 | ], 10 | "parserOptions": { 11 | "ecmaVersion": 12 12 | }, 13 | "rules": { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # absphreak 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: abhinavsharma 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug 3 | about: Report a bug 4 | title: '' 5 | labels: bug 6 | --- 7 | 8 | # Summary 9 | 10 | What can I help with? Please keep this clear and concise. 11 | 12 | # How To Reproduce 13 | 14 | Steps to reproduce the behavior: 15 | 16 | 1. Go to '...' 17 | 2. Click on '....' 18 | 3. Scroll down to '....' 19 | 4. See error 20 | 21 | Link to minimal reproduce setup repository if any. 22 | 23 | # Expected Behaviors 24 | 25 | A clear and concise description of what you expected to happen. 26 | 27 | # Screenshots 28 | 29 | If applicable, add screenshots to help explain your problem. 30 | 31 | # Additional Context 32 | 33 | Add any other context about the problem here. 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vercel 2 | .env 3 | node_modules 4 | package-lock.json 5 | *.lock 6 | .vscode/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 ᴀʙʜɪɴᴀᴠ sʜᴀʀᴍᴀ✩ 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |

README Jokes

3 | jokes GIF 4 |

Random programming jokes on your README.

5 |

GitHub deployments 6 | GitHub deployments 7 | GitHub issues

8 |
9 | 10 |
11 | View Demo 12 | ● 13 | Report Bugs 14 |
15 | 16 | ### Usage 17 | 18 | Endpoint URL: `https://readme-jokes.vercel.app/api` 19 | 20 | Embed one of these in your README: 21 | 22 | ```md 23 | 24 | 25 | ![Jokes Card](https://readme-jokes.vercel.app/api) 26 | ``` 27 | 28 |

or

29 | 30 | ```html 31 | 32 | Jokes Card 33 | ``` 34 | 35 | ### Customization Guide 36 | 37 | Customize using `?` after /api in the https link, example here with no borders using the `hideBorder` parameter. 38 |
39 | 40 | Markdown method: 41 | `![Jokes Card](https://readme-jokes.vercel.app/api?hideBorder)` 42 |
43 | 44 | Image method: 45 | `Jokes Card` 46 |
47 | 48 | Both methods will produce the following jokes card without border: 49 | ![Jokes Card](https://readme-jokes.vercel.app/api?hideBorder) 50 |
51 | To use multiple parameters use '`&`' after the first parameter, e.g. `?hideBorder&theme=cobalt&qColor=%23944bcc&aColor=%23bbdb51` 52 | 53 | will produce a jokes card without border, with cobalt theme, answer color #944bcc and question color #bbdb51 like so: 54 |
55 | ![Jokes Card](https://readme-jokes.vercel.app/api?hideBorder&theme=cobalt&qColor=%23944bcc&aColor=%23bbdb51) 56 | 57 | #### Parameters Available 58 | 59 | - `bgColor` → **Background Color** 60 | - `borderColor` → **Border Color** 61 | - `qColor` → **Question Color** 62 | - `aColor` → **Answer Color** 63 | - `textColor` → **Normal text Color** 64 | - `codeColor` → **Code Color** 65 | - `hideBorder` → **Mention as a value-less parameter to hide boder** 66 | - `theme` → **Theme (Must be one of the following)** 67 | 68 |
69 | Click to see all available themes. 70 | 71 |
72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 |
Theme NamePreview Image
default
gradientBlue
solidBlue
halloween
watermelon
pinkish
daySky
radical
merko
gruvbox
tokyonight
onedark
cobalt
synthwave
dracula
prussian
monokai
vue
vue-dark
nightowl
buefy
blue-green
algolia
darcula
bear
solarized-dark
solarized-light
gotham
material-palenight
graywhite
ayu-mirage
calm
flag-india
omni
react
blueberry
random
264 | 265 |
266 | 267 |
268 | 269 | _Note: Use URL-encoded `#` for color values i.e. `%23`
_ 270 | _eg: `#FFF` will be `%23FFF`
_ 271 | _Note: You can also use the URL parameters to customize the themes.
_ 272 | _URL eg: https://readme-jokes.vercel.app/api?bgColor=%23073b4c&textColor=%2306d6a0&aColor=%2306d6a0&borderColor=%2306d6a0_ 273 | 274 | ### Demo 275 | 276 | ![Jokes Card](https://readme-jokes.vercel.app/api) 277 | 278 | ![Jokes Card](https://readme-jokes.vercel.app/api?bgColor=%23073b4c&textColor=%2306d6a0&aColor=%2306d6a0&borderColor=%2306d6a0) 279 | 280 | ![Jokes Card](https://readme-jokes.vercel.app/api?bgColor=%23212529&textColor=%23ffddd2&qColor=%23f94144&aColor=%2390be6d&borderColor=%23f9c74f&codeColor=%23f9c74f) 281 | 282 | ### Known Issues 283 | 284 | - Not Mobile responsive. [#3](https://github.com/ABSphreak/readme-jokes/issues/3) 285 | 286 | ### Contributions 287 | 288 | - Fork this repository. 289 | - Deploy on your own [Vercel](https://vercel.com/) instance. 290 | - See [issues](https://github.com/ABSphreak/readme-jokes/issues) that need help. 291 | - Open a [PR](https://github.com/ABSphreak/readme-jokes/pulls), if you solve something. 292 | - Got some idea? Just open an [issue](https://github.com/ABSphreak/readme-jokes/issues/new). 293 | 294 | ### References 295 | 296 | - [Jokes](https://github.com/ABSphreak/readme-jokes/blob/master/src/jokes.json) API has been generated from [wesbos/dad-jokes](https://github.com/wesbos/dad-jokes) 297 | - Project is inspired by [anuraghazra/github-readme-stats](https://github.com/anuraghazra/github-readme-stats) 298 | 299 | --- 300 | 301 |

Feel free to ask any questions, open a PR if you feel something can be done differently!

302 |

🌟Star this repository🌟

303 |

Created by Abhinav Sharma & Community | Deployed on Vercel

304 | -------------------------------------------------------------------------------- /api/index.js: -------------------------------------------------------------------------------- 1 | const jokes = require('../src/jokes.json'); 2 | const { CONSTANTS, getRandomArrayElement } = require('../src/utils'); 3 | const { qnaCard, quoteCard } = require('../src/renderJokesCard'); 4 | const themes = require('../src/themes.json'); 5 | 6 | // Max cache age (Currently = 60 seconds) 7 | const cacheSeconds = CONSTANTS.TEN_SECONDS; 8 | 9 | module.exports = async (req, res) => { 10 | const index = Math.floor(Math.random() * Object.keys(jokes).length); 11 | //const index = 168 12 | let renderJoke = ''; 13 | 14 | let { 15 | borderColor, qColor, aColor, textColor, bgColor, codeColor, quoteColor, theme, hideBorder, 16 | } = req.query; 17 | 18 | theme = theme ? theme.toLowerCase() : theme; 19 | 20 | if (theme === 'random') theme = getRandomArrayElement(Object.keys(themes)); 21 | 22 | if (!themes[theme]) theme = 'default'; 23 | const colorTheme = themes[theme]; 24 | borderColor = borderColor || colorTheme.borderColor; 25 | bgColor = bgColor || colorTheme.bgColor; 26 | qColor = qColor || colorTheme.qColor; 27 | aColor = aColor || colorTheme.aColor; 28 | quoteColor = quoteColor || colorTheme.quoteColor; 29 | codeColor = codeColor || colorTheme.codeColor; 30 | 31 | if (jokes[index].q) { 32 | const question = jokes[index].q; 33 | const answer = jokes[index].a; 34 | renderJoke = qnaCard( 35 | qColor || '#ffca3a', 36 | aColor || '#8ac926', 37 | bgColor || '#242423', 38 | borderColor || '#8ac926', 39 | codeColor || '#f72585', 40 | question, 41 | answer, 42 | hideBorder, 43 | ); 44 | } else { 45 | let joke = jokes[index]; 46 | 47 | if (joke.includes("
" + joke[1]; 51 | else joke = jokes[index]; 52 | } 53 | 54 | renderJoke = quoteCard( 55 | textColor || '#ffca3a', 56 | bgColor || '#242423', 57 | borderColor || '#8ac926', 58 | codeColor || '#f72585', 59 | joke, 60 | hideBorder, 61 | ); 62 | } 63 | 64 | // Sets the type of content sent 65 | res.setHeader('Content-Type', 'image/svg+xml'); 66 | // Set the Cache type to public (Any cache can store the data) and the max-age 67 | res.setHeader('Cache-Control', `public, max-age=${cacheSeconds}`); 68 | res.send(renderJoke); 69 | }; 70 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "readme-jokes", 3 | "version": "1.0.0", 4 | "description": "README Jokes", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "lint": "eslint --fix ." 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/ABSphreak/readme-jokes.git" 13 | }, 14 | "author": "Abhinav Sharma", 15 | "license": "MIT", 16 | "bugs": { 17 | "url": "https://github.com/ABSphreak/readme-jokes/issues" 18 | }, 19 | "homepage": "https://github.com/ABSphreak/readme-jokes#readme", 20 | "devDependencies": { 21 | "eslint": "^7.32.0", 22 | "eslint-config-airbnb-base": "^14.2.1", 23 | "eslint-plugin-import": "^2.24.2" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/jokes.json: -------------------------------------------------------------------------------- 1 | { 2 | "0": { 3 | "q": "Relationship status?", 4 | "a": "I'll leave the relations to the database.", 5 | "form": "qa" 6 | }, 7 | "1": { 8 | "q": "How do you get the code for the bank vault?", 9 | "a": "You checkout their branch.", 10 | "form": "qa" 11 | }, 12 | "2": { 13 | "q": "How did the developer announce their engagement?", 14 | "a": "They returned true!", 15 | "form": "qa" 16 | }, 17 | "3": { 18 | "q": "Why did the security conscious engineer refuse to pay their dinner bill?", 19 | "a": "Because they could not verify the checksum.", 20 | "form": "qa" 21 | }, 22 | "4": { 23 | "q": "What do you call a busy waiter?", 24 | "a": "A server.", 25 | "form": "qa" 26 | }, 27 | "5": { 28 | "q": "What do you call an idle server?", 29 | "a": "A waiter.", 30 | "form": "qa" 31 | }, 32 | "6": "[Please Enter New Password]

fortnight

[Error: Password is Two Week]", 33 | "7": { 34 | "q": "How many Prolog programmers does it take to change a lightbulb?", 35 | "a": "Yes.", 36 | "form": "qa" 37 | }, 38 | "8": "I’ve been hearing news about this big boolean. Huge if true.", 39 | "9": { 40 | "q": "What diet did the ghost developer go on?", 41 | "a": "Boooooolean", 42 | "form": "qa" 43 | }, 44 | "10": { 45 | "q": "Why was the developer unhappy at their job?", 46 | "a": "They wanted arrays.", 47 | "form": "qa" 48 | }, 49 | "11": { 50 | "q": "Why did 10 get paid less than \"10\"?", 51 | "a": "There was workplace inequality.", 52 | "form": "qa" 53 | }, 54 | "12": { 55 | "q": "Why was the function sad after a successful first call?", 56 | "a": "It didn’t get a callback.", 57 | "form": "qa" 58 | }, 59 | "13": { 60 | "q": "Why did the angry function exceed the callstack size?", 61 | "a": "It got into an Argument with itself", 62 | "form": "qa" 63 | }, 64 | "14": { 65 | "q": "Whats the object-oriented way to become wealthy?", 66 | "a": "Inheritance", 67 | "form": "qa" 68 | }, 69 | "15": { 70 | "q": "Why did the developer ground their kid?", 71 | "a": "They weren't telling the truthy", 72 | "form": "qa" 73 | }, 74 | "16": { 75 | "q": "What did the array say after it was extended?", 76 | "a": "Stop objectifying me.", 77 | "form": "qa" 78 | }, 79 | "17": "**!false**It's funny 'cause it's true.", 80 | "18": { 81 | "q": "Where did the parallel function wash its hands?", 82 | "a": "Async", 83 | "form": "qa" 84 | }, 85 | "19": { 86 | "q": "I'm starting a band called HTML Encoder", 87 | "a": "Looking to buy a guitar \\&", 88 | "form": "qa" 89 | }, 90 | "20": { 91 | "q": "Why did the functions stop calling each other?", 92 | "a": "Because they had constant arguments.", 93 | "form": "qa" 94 | }, 95 | "21": { 96 | "q": "What's the second movie about a database engineer called?", 97 | "a": "The SQL.", 98 | "form": "qa" 99 | }, 100 | "22": { 101 | "q": "Why doesn't Hollywood make more Big Data movies?", 102 | "a": "NoSQL.", 103 | "form": "qa" 104 | }, 105 | "23": "A programmer's significant other tells them, \"Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.\"The programmer comes home with 12 loaves of bread.", 106 | "24": { 107 | "q": "What did the spider do on the computer?", 108 | "a": "Made a website!", 109 | "form": "qa" 110 | }, 111 | "25": { 112 | "q": "What did the computer do at lunchtime?", 113 | "a": "Had a byte!", 114 | "form": "qa" 115 | }, 116 | "26": { 117 | "q": "What does a baby computer call his father?", 118 | "a": "Data!", 119 | "form": "qa" 120 | }, 121 | "27": { 122 | "q": "Why did the computer keep sneezing?", 123 | "a": "It had a virus!", 124 | "form": "qa" 125 | }, 126 | "28": { 127 | "q": "What is a computer virus?", 128 | "a": "A terminal illness!", 129 | "form": "qa" 130 | }, 131 | "29": "I never tell the same joke twice I have a DRY sense of humor.", 132 | "30": { 133 | "q": "Why was the computer freezing?", 134 | "a": "It left its Windows open!", 135 | "form": "qa" 136 | }, 137 | "31": { 138 | "q": "Why was there a bug in the computer?", 139 | "a": "Because it was looking for a byte to eat?", 140 | "form": "qa" 141 | }, 142 | "32": { 143 | "q": "Why did the computer squeak?", 144 | "a": "Because someone stepped on its mouse!", 145 | "form": "qa" 146 | }, 147 | "33": { 148 | "q": "What do you get when you cross a computer and a life guard?", 149 | "a": "A screensaver!", 150 | "form": "qa" 151 | }, 152 | "34": { 153 | "q": "Where do all the cool mice live?", 154 | "a": "In their mousepads!", 155 | "form": "qa" 156 | }, 157 | "35": { 158 | "q": "What do you get when you cross a computer with an elephant?", 159 | "a": "Lots of memory!", 160 | "form": "qa" 161 | }, 162 | "36": "Java truly is an OOP language...\nAs in: OOPs I used Java!", 163 | "37": { 164 | "q": "How do programming pirates pass method parameters?", 165 | "a": "Varrrrarrrgs.", 166 | "form": "qa" 167 | }, 168 | "38": { 169 | "q": "How do programming shepherds count their flock?", 170 | "a": "With lambda functions", 171 | "form": "qa" 172 | }, 173 | "39": { 174 | "q": "What airline do developers prefer when they're in a rush?", 175 | "a": "Delta.", 176 | "form": "qa" 177 | }, 178 | "40": { 179 | "q": "How did pirates collaborate before computers?", 180 | "a": "Pier to pier networking.", 181 | "form": "qa" 182 | }, 183 | "41": { 184 | "q": "Why don't bachelors like Git?", 185 | "a": "Because they are afraid to commit.", 186 | "form": "qa" 187 | }, 188 | "42": { 189 | "q": "A SQL query goes into a bar, walks up to two tables and asks:", 190 | "a": "Can I JOIN you?", 191 | "form": "qa" 192 | }, 193 | "43": { 194 | "q": "How does a developer make a cheer?", 195 | "a": "[\"hip\",\"hip\"] // (hip hip array!)", 196 | "form": "qa" 197 | }, 198 | "44": { 199 | "q": "Why was the developer's family upset with them at dinner?", 200 | "a": "They forgot to git squash before going home", 201 | "form": "qa" 202 | }, 203 | "45": { 204 | "q": "What did JavaScript call his son?", 205 | "a": "JSON!", 206 | "form": "qa" 207 | }, 208 | "46": { 209 | "q": "What did the proud React component say to its child?", 210 | "a": "I've got to give you props", 211 | "form": "qa" 212 | }, 213 | "47": { 214 | "q": "What did the server say to his client who was having a bad day?", 215 | "a": "Everything's going to be 200", 216 | "form": "qa" 217 | }, 218 | "48": { 219 | "q": "Why did the developer go broke?", 220 | "a": "Because they used up all their cache", 221 | "form": "qa" 222 | }, 223 | "49": { 224 | "q": "Are computers dangerous?", 225 | "a": "Nah, they don't byte. They just nibble a bit.", 226 | "form": "qa" 227 | }, 228 | "50": { 229 | "q": "How did the mafioso kill the Node server?", 230 | "a": "Tie await to it and let it async.", 231 | "form": "qa" 232 | }, 233 | "51": { 234 | "q": "You know what the best thing about booleans is?", 235 | "a": "Even if you are wrong, you are only off by a bit.", 236 | "form": "qa" 237 | }, 238 | "52": { 239 | "q": "Why couldn’t the user update a file on a shared server?", 240 | "a": "They didn’t have the write permissions", 241 | "form": "qa" 242 | }, 243 | "53": { 244 | "q": "What do you do when you can't understand your husband's behavior?", 245 | "a": "man man", 246 | "form": "qa" 247 | }, 248 | "54": { 249 | "q": "What do you call a doctor who fixes websites?", 250 | "a": "A URLogist", 251 | "form": "qa" 252 | }, 253 | "55": { 254 | "q": "How many developers does it take to change a light bulb?", 255 | "a": "None. It's a hardware issue", 256 | "form": "qa" 257 | }, 258 | "56": { 259 | "q": "Why do programmers always mix up Halloween and Christmas?", 260 | "a": "Because 31 OCT == 25 DEC", 261 | "form": "qa" 262 | }, 263 | "57": { 264 | "q": "Why do kayakers make bad programmers?", 265 | "a": "Because they're afraid of waterfall.", 266 | "form": "qa" 267 | }, 268 | "58": { 269 | "q": "What are computers' favorite snacks?", 270 | "a": "Microchips, phish sticks, and cookies. But just a few bytes of each.", 271 | "form": "qa" 272 | }, 273 | "59": { 274 | "q": "What do computers love to do at the beach?", 275 | "a": "Put on some spam block for protection so they can safely surf the net while catching some .WAVs!", 276 | "form": "qa" 277 | }, 278 | "60": { 279 | "q": "What do you call a computer that sings?", 280 | "a": "A-dell.", 281 | "form": "qa" 282 | }, 283 | "61": { 284 | "q": "What's a compiler developer's favorite spice?", 285 | "a": "Parsley.", 286 | "form": "qa" 287 | }, 288 | "62": { 289 | "q": "When do front end developers go out to eat?", 290 | "a": "On their lunch <br>.", 291 | "form": "qa" 292 | }, 293 | "63": { 294 | "q": "A SQL developer walked into a NoSQL bar.", 295 | "a": "They left because they couldn't find a table.", 296 | "form": "qa" 297 | }, 298 | "64": { 299 | "q": "How do you help JS errors?", 300 | "a": "You console them!", 301 | "form": "qa" 302 | }, 303 | "65": { 304 | "q": "Why don't parents teach their kids about regular expressions?", 305 | "a": "Because they don't want them playing with matches", 306 | "form": "qa" 307 | }, 308 | "66": { 309 | "q": "Why didn't the div get invited to the dinner party?", 310 | "a": "Because it had no class!", 311 | "form": "qa" 312 | }, 313 | "67": { 314 | "q": "Why aren't cryptocurrency engineers allowed to vote?", 315 | "a": "Because they're miners!", 316 | "form": "qa" 317 | }, 318 | "68": { 319 | "q": "Why did the constant break up with the variable?", 320 | "a": "Because they changed.", 321 | "form": "qa" 322 | }, 323 | "69": { 324 | "q": "Why did the database administrator leave his wife?", 325 | "a": "She had one-to-many relationships.", 326 | "form": "qa" 327 | }, 328 | "70": "Asynchronous JavaScript is amazing.I Promise you, await and see.", 329 | "71": { 330 | "q": "What did the Class say in court when put on trial?", 331 | "a": "I strongly object!", 332 | "form": "qa" 333 | }, 334 | "72": { 335 | "q": "Why do Java developers wear glasses?", 336 | "a": "Because they don't C#!", 337 | "form": "qa" 338 | }, 339 | "73": { 340 | "q": "What are the three hardest problems in computer science?", 341 | "a": "Naming things and off-by-one errors", 342 | "form": "qa" 343 | }, 344 | "74": { 345 | "q": "What did the fruit basket say to the developer?", 346 | "a": "I hope you're ready for some pear programming!", 347 | "form": "qa" 348 | }, 349 | "75": { 350 | "q": "How does a sysadmin keep a fire going?", 351 | "a": "They rotate the logs.", 352 | "form": "qa" 353 | }, 354 | "76": "I've got a great UDP joke but I'm afraid you wouldn't get it...", 355 | "77": "A programmer was arrested for writing unreadable code. They refused to comment.", 356 | "78": "There are 10 types of people in this world, those who understand binary and those who don't.", 357 | "79": { 358 | "q": "I love you and I only love you. Does that turn you on?", 359 | "a": "ATE:** No.", 360 | "form": "qa" 361 | }, 362 | "80": { 363 | "q": "Why do all HTML emails get blocked?", 364 | "a": "Because they are all span", 365 | "form": "qa" 366 | }, 367 | "81": { 368 | "q": "What did the process say after working in an infinite loop all day?", 369 | "a": "I need a break.", 370 | "form": "qa" 371 | }, 372 | "82": { 373 | "q": "An Agent died unexpectedly. How was the crime solved?", 374 | "a": "By looking at the Stack Trace.", 375 | "form": "qa" 376 | }, 377 | "83": { 378 | "q": "Why did the document store go out of business?", 379 | "a": "It had NoSQL.", 380 | "form": "qa" 381 | }, 382 | "84": { 383 | "q": "Why can't SQL and NoSQL Developers date one other?", 384 | "a": "Because they don't agree on relationships.", 385 | "form": "qa" 386 | }, 387 | "85": { 388 | "q": "Why is Python like the Soviet Union?", 389 | "a": "Because it has no private fields", 390 | "form": "qa" 391 | }, 392 | "86": { 393 | "q": "Where did the API go to eat?", 394 | "a": "To the RESTaurant", 395 | "form": "qa" 396 | }, 397 | "87": { 398 | "q": "Why shouldn't you trust Matlab developers?", 399 | "a": "Because they're always plotting something.", 400 | "form": "qa" 401 | }, 402 | "88": { 403 | "q": "Why did the developer have to quit smoking?", 404 | "a": "Because they couldn't afford to pay the new syntax.", 405 | "form": "qa" 406 | }, 407 | "89": { 408 | "q": "How does a programmer open a jar for their significant other?", 409 | "a": "They install Java", 410 | "form": "qa" 411 | }, 412 | "90": { 413 | "q": "What did the psychic say to the developers?", 414 | "a": "I see dev people.", 415 | "form": "qa" 416 | }, 417 | "91": { 418 | "q": "Where does the pirate stash all of their digital treasures?", 419 | "a": "RAR", 420 | "form": "qa" 421 | }, 422 | "92": { 423 | "q": "What is React's favorite movie genre?", 424 | "a": "Suspense", 425 | "form": "qa" 426 | }, 427 | "93": { 428 | "q": "Why couldn't the React component understand the joke?", 429 | "a": "Because it didn't get the context.", 430 | "form": "qa" 431 | }, 432 | "94": { 433 | "q": "What did XHR say to AJAX when it thought it was being a Mean Girl?", 434 | "a": "Stop trying to make fetch happen!", 435 | "form": "qa" 436 | }, 437 | "95": { 438 | "q": "What was Grace Hopper's favorite car?", 439 | "a": "VW Bug", 440 | "form": "qa" 441 | }, 442 | "96": { 443 | "q": "What sits on a pirate's shoulder and calls, \"Pieces of seven, Pieces of seven\"?", 444 | "a": "Parroty error.", 445 | "form": "qa" 446 | }, 447 | "97": { 448 | "q": "What is a pirate's favorite programming language?", 449 | "a": "You'd think it was R, but a pirate's first love is Objectively C.", 450 | "form": "qa" 451 | }, 452 | "98": { 453 | "q": "Why did the programmer come home crying?\"", 454 | "a": "His friends were always boolean him.", 455 | "form": "qa" 456 | }, 457 | "99": "**-** Knock Knock!**-** An async function**-** Who's there?", 458 | "100": { 459 | "q": "What PostgreSQL library should Python developers use for adult-oriented code?", 460 | "a": "psycoPG13", 461 | "form": "qa" 462 | }, 463 | "101": "The next time you're using Safari or Firefox and it's running slowly, you can say to yourself,
\"I could've had a V8 (a browser 'engine')\".", 464 | "102": { 465 | "q": "What accommodations did the JavaScript developer request at the hotel?", 466 | "a": "A room with a Vue.", 467 | "form": "qa" 468 | }, 469 | "103": { 470 | "q": "Where do developers drink?", 471 | "a": "The Foo bar", 472 | "form": "qa" 473 | }, 474 | "104": { 475 | "q": "Why do assembly programmers need to know how to swim?", 476 | "a": "Because they work below C level.", 477 | "form": "qa" 478 | }, 479 | "105": { 480 | "q": "Who used the internet before it was cool?", 481 | "a": "Httpsters", 482 | "form": "qa" 483 | }, 484 | "106": { 485 | "q": "What kind of computer can hold a musical note?", 486 | "a": "A Dell.", 487 | "form": "qa" 488 | }, 489 | "107": { 490 | "q": "Why did the web developer always go to the wrong hotel room?", 491 | "a": "They were in room 301.", 492 | "form": "qa" 493 | }, 494 | "108": { 495 | "q": "How do you stop a web developer stealing your stuff?", 496 | "a": "Write 403 on it.", 497 | "form": "qa" 498 | }, 499 | "109": { 500 | "q": "Why are machine learning models so fit?", 501 | "a": "Because they do weight training.", 502 | "form": "qa" 503 | }, 504 | "110": { 505 | "q": "Why did Gargamel shut down the internet?", 506 | "a": "Because he didn't want people **SMURFING** the web!", 507 | "form": "qa" 508 | }, 509 | "111": { 510 | "q": "What did the command line die of?", 511 | "a": "A Terminal illness.", 512 | "form": "qa" 513 | }, 514 | "112": { 515 | "q": "Did you hear what the clumsy cryptographer did to their password?", 516 | "a": "Made a hash of it.", 517 | "form": "qa" 518 | }, 519 | "113": { 520 | "q": "Why are keyboards always working so hard?", 521 | "a": "Cause they have two shifts!", 522 | "form": "qa" 523 | }, 524 | "114": { 525 | "q": "What are clouds made of?", 526 | "a": "Mostly linux servers.", 527 | "form": "qa" 528 | }, 529 | "115": { 530 | "q": "How does Mr. Potato Head (dev edition 0.0.1) remove his mustache?", 531 | "a": "git stache pop", 532 | "form": "qa" 533 | }, 534 | "116": { 535 | "q": "Why can't you use 'Soup' as your password?", 536 | "a": "Because it isn't stroganoff", 537 | "form": "qa" 538 | }, 539 | "117": { 540 | "q": "Why do developers use mechanical keyboards?", 541 | "a": "To strongly type their code.", 542 | "form": "qa" 543 | }, 544 | "118": "A new database query walks into a bar. The server says \"Sorry, cache only.\"", 545 | "119": "What's the best tool for automatically ignoring long email threads about tech buzzwords?\"\"Block-chain\"", 546 | "120": { 547 | "q": "What is a developer's favorite country song?", 548 | "a": "Hello World - by Lady Antebellum", 549 | "form": "qa" 550 | }, 551 | "121": { 552 | "q": "Why was nobody given food at the developer conference?", 553 | "a": "It was a serverless function!", 554 | "form": "qa" 555 | }, 556 | "122": { 557 | "q": "Why did the developer cancel their dinner plans?", 558 | "a": "They were unable to fulfil peer dependencies", 559 | "form": "qa" 560 | }, 561 | "123": { 562 | "q": "Why did the functional programmer finally move out of their house?", 563 | "a": "For(e) closure", 564 | "form": "qa" 565 | }, 566 | "124": { 567 | "q": "How do JavaScript developers break up?", 568 | "a": "They always promise to callback", 569 | "form": "qa" 570 | }, 571 | "125": { 572 | "q": "Why do developers mixup Terminals and Polygraphs?", 573 | "a": "Because they both can see a lie (CLI)", 574 | "form": "qa" 575 | }, 576 | "126": { 577 | "q": "Did you hear about the programmer that was scared of IDEs?", 578 | "a": "They retreated back into their shell", 579 | "form": "qa" 580 | }, 581 | "127": { 582 | "q": "What do you call optimistic front-end developers?", 583 | "a": "Stack half-full developers.", 584 | "form": "qa" 585 | }, 586 | "128": "Chuck Norris can take a screenshot of his blue screen.", 587 | "129": { 588 | "q": "Have you heard the one about the Corduroy pillow?", 589 | "a": "It's making HEADLINES!", 590 | "form": "qa" 591 | }, 592 | "130": { 593 | "q": "Hey officer! How did the hackers escape?", 594 | "a": "No idea. They just ransomware.", 595 | "form": "qa" 596 | }, 597 | "131": { 598 | "q": "Why can’t data engineers become hat makers?", 599 | "a": "They can only guarantee two thirds of a CAP!", 600 | "form": "qa" 601 | }, 602 | "132": { 603 | "q": "How did the hippie learn about database transactions?", 604 | "a": "By taking ACID", 605 | "form": "qa" 606 | }, 607 | "133": { 608 | "q": "Why is it called the Dark Ages?", 609 | "a": "There were a lot of KNIGHTS!", 610 | "form": "qa" 611 | }, 612 | "134": { 613 | "q": "What did the Network Administrator say when they caught a nasty virus?", 614 | "a": "It hurts when IP", 615 | "form": "qa" 616 | }, 617 | "135": { 618 | "q": "Which programming language is the shortest?", 619 | "a": "HTML. Because it doesn't have a neck between its head and body.", 620 | "form": "qa" 621 | }, 622 | "136": { 623 | "q": "What good can come of 2989 witches casting a hex?", 624 | "a": "None, it is always 0xBAD", 625 | "form": "qa" 626 | }, 627 | "137": { 628 | "q": "Did you hear about the witch who was off by two when casting a hex?", 629 | "a": "They failed to make the target DEAD and made them DEAF instead!", 630 | "form": "qa" 631 | }, 632 | "138": "I went to a street where the houses were numbered 8k, 16k, 32k, 64k, 128k, 256k and 512k.It was a trip down Memory Lane.", 633 | "139": "Lisp programmers don't make prank calls. They make FUNCALLs", 634 | "140": { 635 | "q": "Why do Front-End Developers eat lunch alone?", 636 | "a": "Because, they don't know how to join tables.", 637 | "form": "qa" 638 | }, 639 | "141": { 640 | "q": "What advice do you give to a JS developer who has never played baseball?", 641 | "a": "Try catch.", 642 | "form": "qa" 643 | }, 644 | "142": { 645 | "q": "Why are the arrays that Chuck Norris declare, of infinite size.", 646 | "a": "Because Chuck Norris knows no bounds.", 647 | "form": "qa" 648 | }, 649 | "143": { 650 | "q": "Why doesn't Chuck Norris need garbage collection.", 651 | "a": "Because he doesn’t call .Dispose(), he calls .DropKick().", 652 | "form": "qa" 653 | }, 654 | "144": { 655 | "q": "How did the programmer die in the shower?", 656 | "a": "He read the shampoo bottle instructions: Lather. Rinse. Repeat.", 657 | "form": "qa" 658 | }, 659 | "145": "When I wrote this code, only God and I understood what I was doing. Now, only God knows.", 660 | "146": { 661 | "q": "What did the Java code say to the C code?", 662 | "a": "You've got no class.", 663 | "form": "qa" 664 | }, 665 | "147": { 666 | "q": "What is the most used language in programming?", 667 | "a": "Profanity.", 668 | "form": "qa" 669 | }, 670 | "148": { 671 | "q": "Why did the geek add body { padding-top: 1000px; } to his Facebook profile?", 672 | "a": "He wanted to keep a low profile.", 673 | "form": "qa" 674 | }, 675 | "149": "8 bytes walk into a bar, the bartenders asks \"What will it be?\"
One of them says, \"Make us a double.\"", 676 | "150": "An SEO couple had twins. For the first time, they were happy with duplicate content.", 677 | "151": "LISP - Lots of Infuriating Superfluous Parentheses", 678 | "152": "I'm starting a band called 1023MB. I don't think we'll ever get a gig.", 679 | "153": { 680 | "q": "Why did the developer quit his job?", 681 | "a": "He did not get arrays.", 682 | "form": "qa" 683 | }, 684 | "154": "There are two ways to write error-free programs; only the third one works.", 685 | "155": { 686 | "q": "Why couldn't the developer pull the weeds from the garden?", 687 | "a": "They didn't have root access.", 688 | "form": "qa" 689 | }, 690 | "156": "Dev 1 - We have a problem. Dev 2 - Let’s use RegEx! Dev 1 - Now we have two problems", 691 | "157": { 692 | "q": "How do you tell HTML from HTML5?", 693 | "a": "Try it out in Internet Explorer, if it does not work then it's HTML5.", 694 | "form": "qa" 695 | }, 696 | "158": { 697 | "q": "What do computers and air conditioners have in common?", 698 | "a": "They both become useless when you open windows.", 699 | "form": "qa" 700 | }, 701 | "159": "99 little bugs in the code, 99 bugs in the code, 1 bug fixed...compile again, 100 little bugs in the code.", 702 | "160": "UNIX is very user friendly... It's just very particular about who its friends are.", 703 | "161": "Debugging: Removing the needles from the haystack.", 704 | "162": "You are the CSS to my HTML", 705 | "163": "An optimist says: “the glass is half full.”
A pessimist says: “the glass is half empty.”
A programmer says: “the glass is twice as large as necessary.", 706 | "164": "CSS developers have the biggest ego, they think they're so !important", 707 | "165": { 708 | "q": "Hamlet: To be - or not to be...", 709 | "a": "Programmer: True !" 710 | }, 711 | "166": "The Professor says \"Welcome to English 101\".The student panicks.\"What's wrong?\" asks the Professor.

\"I missed the first 4 English classes\".", 712 | "167": { 713 | "q": "What do cats and programmers have in common?", 714 | "a": "When either one is unusually happy and excited, an appropriate question would be, \"did you find a bug\".", 715 | "form": "qa" 716 | }, 717 | "168": "Java and C were telling jokes. It was C's turn, so he writes something on the wall, points to it and says \"Do you get the reference?\" But Java didn't.", 718 | "169": "To understand recursion. You must first understand recursion.", 719 | "170": "Two bytes meet. The first byte asks, \"Are you ill?\"The second byte replies, \"No, just feeling a bit off.\" ", 720 | "171": "I put so much more effort into naming my first Wi-Fi than my first child.", 721 | "172": { 722 | "q": "Why was the developer unable to find his room?", 723 | "a": "His room card said 404", 724 | "form": "qa" 725 | }, 726 | "173": { 727 | "q": "How do you tell an introverted computer scientist from an extroverted scientist?", 728 | "a": "An extroverted computer scientist looks at your shoes when he talks to you.", 729 | "form": "qa" 730 | }, 731 | "174": { 732 | "q": "How do you comfort a JS bug?", 733 | "a": "You console it", 734 | "form": "qa" 735 | }, 736 | "175": "When an Apple employees dies, does their life HTML5 in front of their eyes?", 737 | "176": { 738 | "q": "What's 0.1+0.2?", 739 | "a": "It's 0.30000000000000004", 740 | "form": "qa" 741 | }, 742 | "177": { 743 | "q": "Why do programmers prefer dark mode?", 744 | "a": "Because light attracts bugs.", 745 | "form": "qa" 746 | }, 747 | "178": { 748 | "q": "Did you know?", 749 | "a": "Spiders are the only web developers in the world that like finding bugs", 750 | "form": "qa" 751 | }, 752 | "179": { 753 | "q": "Don't add a programming language to your skills list after watching a 15-minute video on it.", 754 | "a": "Yes wait until you've written hello world", 755 | "form": "qa" 756 | }, 757 | 758 | "180": "A data Scientist goes to a bar and sees two tables. Then he says: Hey bro... Can I join you?", 759 | 760 | "181": { 761 | "q": "Why do python developers wear glasses?", 762 | "a": "Because they can't C", 763 | "form": "qa" 764 | }, 765 | "182": { 766 | "q": "Why does the Docker container fail?", 767 | "a": "So that, Kubernetes can start it again", 768 | "form": "qa" 769 | }, 770 | "183": { 771 | "q": "I.. CAN'T GET.. IT.. OFF!!", 772 | "a": "DUDE, THAT'S BECAUSE YOUR CAPS LOCK IS ON", 773 | "form": "qa" 774 | }, 775 | "184": { 776 | "q": "What do NASA programmers do on the weekends?", 777 | "a": "They hit the space bar", 778 | "form": "qa" 779 | }, 780 | "185": { 781 | "q": "What do you call a programmer from Finland?", 782 | "a": "Nerdic", 783 | "form": "qa" 784 | }, 785 | "186": { 786 | "q": "Want to know the biggest lie in the universe?", 787 | "a": "I have read and agree to the Terms & Conditions", 788 | "form": "qa" 789 | }, 790 | "187": { 791 | "q": "What is the biggest lie you have heard from a programmer?", 792 | "a": "It should work now.", 793 | "form": "qa" 794 | }, 795 | "188": "If the box says: \"This software requires Windows XP or better\". Does that mean it will run on Linux?", 796 | "189": { 797 | "q": "Why did the functional programmer get thrown out of school?", 798 | "a": "Because he refused to take classes" 799 | }, 800 | 801 | "190": "If it weren't for C, we'd all be programming in BASI and OBOL", 802 | 803 | "191": "Programming is like sex: One mistake and you have to support it for the rest of your life.", 804 | 805 | "192": "Chuck Norris writes code, that optimizes itself." 806 | } 807 | -------------------------------------------------------------------------------- /src/renderJokesCard.js: -------------------------------------------------------------------------------- 1 | const width = '100%'; 2 | const height = '100%'; 3 | 4 | // Question-Answer type card 5 | const qnaCard = (qColor, aColor, bg, borderColor, codeColor, question, answer, hideBorder) => { 6 | let border = `2px solid ${borderColor}`; 7 | if (hideBorder !== undefined) { 8 | border = '2px solid transparent'; 9 | } 10 | // ${console.log(window.innerHeight)} 11 | const card = ` 12 | 13 | 27 | 28 |
29 | 62 |
63 |
64 |

Q. ${question}

65 |

A. ${answer}

66 |
67 |
68 |
69 |
70 |
`; 71 | return card; 72 | }; 73 | 74 | // Quotation type card 75 | const quoteCard = (textColor, bg, borderColor, codeColor, qoute, hideBorder) => { 76 | let border = `2px solid ${borderColor}`; 77 | if (hideBorder !== undefined) { 78 | border = '2px solid transparent'; 79 | } 80 | const card = ` 81 | 82 | 97 | 98 |
99 | 129 |
130 |
131 |

${qoute}

132 |
133 |
134 |
135 |
136 |
137 | `; 138 | return card; 139 | }; 140 | 141 | module.exports = { 142 | qnaCard, 143 | quoteCard, 144 | }; 145 | -------------------------------------------------------------------------------- /src/themes.json: -------------------------------------------------------------------------------- 1 | { 2 | "default": { 3 | "borderColor": "#8ac926", 4 | "bgColor": "#242423", 5 | "qColor": "#ffca3a", 6 | "aColor": "#8ac926", 7 | "quoteColor": "#ffca3a", 8 | "codeColor": "#f72585" 9 | }, 10 | "gradientblue": { 11 | "borderColor": "#72e7ff", 12 | "bgColor": "linear-gradient(26deg, rgba(4,26,48,1) 0%, rgba(33,93,142,1) 54%, rgba(0,212,255,1) 100%)", 13 | "qColor": "#B3B8BD", 14 | "aColor": "#D6DEE6", 15 | "quoteColor": "#D6DEE6", 16 | "codeColor": "#f72585" 17 | }, 18 | "solidblue": { 19 | "borderColor": "#72e7ff", 20 | "bgColor": "rgba(4,26,48,1)", 21 | "qColor": "#2289F0", 22 | "aColor": "#63B1FF", 23 | "quoteColor": "#63B1FF", 24 | "codeColor": "#f72585" 25 | }, 26 | "halloween": { 27 | "borderColor": "#DE2C2C", 28 | "bgColor": "rgba(21,3,3,1)", 29 | "qColor": "#DE2C2C", 30 | "aColor": "#ef9696", 31 | "quoteColor": "#DE2C2C", 32 | "codeColor": "#f72585" 33 | }, 34 | "watermelon": { 35 | "borderColor": "#28d0dc", 36 | "bgColor": "rgba(3,21,14,1)", 37 | "qColor": "#caf6e3", 38 | "aColor": "#2cdd93", 39 | "quoteColor": "#2cdd93", 40 | "codeColor": "#f72585" 41 | }, 42 | "pinkish": { 43 | "borderColor": "#FF7F9D", 44 | "bgColor": "#CF4B6A", 45 | "qColor": "#FBC0FC", 46 | "aColor": "#FEE0FF", 47 | "quoteColor": "#FEE0FF", 48 | "codeColor": "#ffffff" 49 | }, 50 | "daysky": { 51 | "borderColor": "#1777D6", 52 | "bgColor": "#ABCDEF", 53 | "qColor": "#074685", 54 | "aColor": "#FEE0FF", 55 | "quoteColor": "#0C6FD1", 56 | "codeColor": "#f72585" 57 | }, 58 | "radical": { 59 | "borderColor": "#42cbf5", 60 | "bgColor": "#141321", 61 | "qColor": "#fe428e", 62 | "aColor": "#a9fef7", 63 | "quoteColor": "#a9fef7", 64 | "codeColor": "#f8d847" 65 | }, 66 | "merko": { 67 | "borderColor": "#b7d364", 68 | "bgColor": "#0a0f0b", 69 | "qColor": "#abd200", 70 | "aColor": "#68b587", 71 | "quoteColor": "#68b587", 72 | "codeColor": "" 73 | }, 74 | "gruvbox": { 75 | "borderColor": "#fe8019", 76 | "bgColor": "#282828", 77 | "qColor": "#fabd2f", 78 | "aColor": "#8ec07c", 79 | "quoteColor": "#8ec07c", 80 | "codeColor": "" 81 | }, 82 | "tokyonight": { 83 | "borderColor": "#bf91f3", 84 | "bgColor": "#1a1b27", 85 | "qColor": "#70a5fd", 86 | "aColor": "#38bdae", 87 | "quoteColor": "#38bdae", 88 | "codeColor": "" 89 | }, 90 | "onedark": { 91 | "borderColor": "#8eb573", 92 | "bgColor": "#282c34", 93 | "qColor": "#e4bf7a", 94 | "aColor": "#df6d74", 95 | "quoteColor": "#df6d74", 96 | "codeColor": "" 97 | }, 98 | "cobalt": { 99 | "borderColor": "#0480ef", 100 | "bgColor": "#193549", 101 | "qColor": "#e683d9", 102 | "aColor": "#75eeb2", 103 | "quoteColor": "#75eeb2", 104 | "codeColor": "" 105 | }, 106 | "synthwave": { 107 | "borderColor": "#ef8539", 108 | "bgColor": "#2b213a", 109 | "qColor": "#e2e9ec", 110 | "aColor": "#e5289e", 111 | "quoteColor": "#e5289e", 112 | "codeColor": "" 113 | }, 114 | "dracula": { 115 | "borderColor": "#79dafa", 116 | "bgColor": "#282a36", 117 | "qColor": "#ff6e96", 118 | "aColor": "#f8f8f2", 119 | "quoteColor": "#f8f8f2", 120 | "codeColor": "" 121 | }, 122 | "prussian": { 123 | "borderColor": "#38a0ff", 124 | "bgColor": "#172f45", 125 | "qColor": "#bddfff", 126 | "aColor": "#6e93b5", 127 | "quoteColor": "#6e93b5", 128 | "codeColor": "" 129 | }, 130 | "monokai": { 131 | "borderColor": "#e28905", 132 | "bgColor": "#272822", 133 | "qColor": "#eb1f6a", 134 | "aColor": "#f1f1eb", 135 | "quoteColor": "#f1f1eb", 136 | "codeColor": "" 137 | }, 138 | "vue": { 139 | "borderColor": "#41b883", 140 | "bgColor": "#fffefe", 141 | "qColor": "#41b883", 142 | "aColor": "#273849", 143 | "quoteColor": "#273849", 144 | "codeColor": "" 145 | }, 146 | "vue-dark": { 147 | "borderColor": "#41b883", 148 | "bgColor": "#273849", 149 | "qColor": "#41b883", 150 | "aColor": "#fffefe", 151 | "quoteColor": "#fffefe", 152 | "codeColor": "" 153 | }, 154 | "nightowl": { 155 | "borderColor": "#ffeb95", 156 | "bgColor": "#011627", 157 | "qColor": "#c792ea", 158 | "aColor": "#7fdbca", 159 | "quoteColor": "#7fdbca", 160 | "codeColor": "" 161 | }, 162 | "buefy": { 163 | "borderColor": "#ff3860", 164 | "bgColor": "#ffffff", 165 | "qColor": "#7957d5", 166 | "aColor": "#363636", 167 | "quoteColor": "#363636", 168 | "codeColor": "" 169 | }, 170 | "blue-green": { 171 | "borderColor": "#f5b700", 172 | "bgColor": "#040f0f", 173 | "qColor": "#2f97c1", 174 | "aColor": "#0cf574", 175 | "quoteColor": "#0cf574", 176 | "codeColor": "" 177 | }, 178 | "algolia": { 179 | "borderColor": "#2DDE98", 180 | "bgColor": "#050F2C", 181 | "qColor": "#00AEFF", 182 | "aColor": "#FFFFFF", 183 | "quoteColor": "#FFFFFF", 184 | "codeColor": "" 185 | }, 186 | "darcula": { 187 | "borderColor": "#84628F", 188 | "bgColor": "#242424", 189 | "qColor": "#BA5F17", 190 | "aColor": "#BEBEBE", 191 | "quoteColor": "#BEBEBE", 192 | "codeColor": "" 193 | }, 194 | "bear": { 195 | "borderColor": "#00AEFF", 196 | "bgColor": "#1f2023", 197 | "qColor": "#e03c8a", 198 | "aColor": "#bcb28d", 199 | "quoteColor": "#bcb28d", 200 | "codeColor": "" 201 | }, 202 | "solarized-dark": { 203 | "borderColor": "#b58900", 204 | "bgColor": "#002b36", 205 | "qColor": "#268bd2", 206 | "aColor": "#859900", 207 | "quoteColor": "#859900", 208 | "codeColor": "" 209 | }, 210 | "solarized-light": { 211 | "borderColor": "#b58900", 212 | "bgColor": "#fdf6e3", 213 | "qColor": "#268bd2", 214 | "aColor": "#859900", 215 | "quoteColor": "#859900", 216 | "codeColor": "" 217 | }, 218 | "gotham": { 219 | "borderColor": "#599cab", 220 | "bgColor": "#0c1014", 221 | "qColor": "#2aa889", 222 | "aColor": "#99d1ce", 223 | "quoteColor": "#99d1ce", 224 | "codeColor": "" 225 | }, 226 | "material-palenight": { 227 | "borderColor": "#89ddff", 228 | "bgColor": "#292d3e", 229 | "qColor": "#c792ea", 230 | "aColor": "#a6accd", 231 | "quoteColor": "#a6accd", 232 | "codeColor": "" 233 | }, 234 | "graywhite": { 235 | "borderColor": "#24292e", 236 | "bgColor": "#ffffff", 237 | "qColor": "#24292e", 238 | "aColor": "#24292e", 239 | "quoteColor": "#24292e", 240 | "codeColor": "" 241 | }, 242 | "ayu-mirage": { 243 | "borderColor": "#73d0ff", 244 | "bgColor": "#1f2430", 245 | "qColor": "#f4cd7c", 246 | "aColor": "#c7c8c2", 247 | "quoteColor": "#c7c8c2", 248 | "codeColor": "" 249 | }, 250 | "calm": { 251 | "borderColor": "#edae49", 252 | "bgColor": "#373f51", 253 | "qColor": "#e07a5f", 254 | "aColor": "#ebcfb2", 255 | "quoteColor": "#ebcfb2", 256 | "codeColor": "" 257 | }, 258 | "flag-india": { 259 | "borderColor": "#250E62", 260 | "bgColor": "#ffffff", 261 | "qColor": "#ff8f1c", 262 | "aColor": "#509E2F", 263 | "quoteColor": "#509E2F", 264 | "codeColor": "" 265 | }, 266 | "omni": { 267 | "borderColor": "#e7de79", 268 | "bgColor": "#191622", 269 | "qColor": "#FF79C6", 270 | "aColor": "#E1E1E6", 271 | "quoteColor": "#E1E1E6", 272 | "codeColor": "" 273 | }, 274 | "react": { 275 | "borderColor": "#61dafb", 276 | "bgColor": "#20232a", 277 | "qColor": "#61dafb", 278 | "aColor": "#ffffff", 279 | "quoteColor": "#ffffff", 280 | "codeColor": "" 281 | }, 282 | "blueberry": { 283 | "borderColor": "#89ddff", 284 | "bgColor": "#242938", 285 | "qColor": "#82aaff", 286 | "aColor": "#27e8a7", 287 | "quoteColor": "#27e8a7", 288 | "codeColor": "" 289 | } 290 | } 291 | -------------------------------------------------------------------------------- /src/utils.js: -------------------------------------------------------------------------------- 1 | // For giving a median value of cache age. Useful if the cache time is set by the user using query parameters 2 | exports.clampValue = (number, min, max) => Math.max(min, Math.min(number, max)); 3 | // Pre defined cache age values (in seconds) 4 | exports.CONSTANTS = { 5 | TEN_SECONDS: 10, 6 | THIRTY_SECONDS: 30, 7 | ONE_MINUTE: 60, 8 | THIRTY_MINUTES: 1800, 9 | TWO_HOURS: 7200, 10 | FOUR_HOURS: 14400, 11 | ONE_DAY: 86400, 12 | }; 13 | 14 | exports.getRandomArrayElement = (arr) => { 15 | min = 0; 16 | max = arr.length; 17 | return arr[Math.floor(Math.random() * (max - min) + min)]; // The maximum is inclusive and the minimum is inclusive 18 | }; 19 | -------------------------------------------------------------------------------- /vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "redirects": [ 3 | { 4 | "source": "/", 5 | "destination": "https://github.com/ABSphreak/readme-jokes" 6 | } 7 | ] 8 | } 9 | --------------------------------------------------------------------------------