├── img ├── oops.png └── avatar.png ├── README.md ├── LICENSE ├── oops.html ├── index.html ├── styles ├── oops.css └── main.css └── app.js /img/oops.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Itz-fork/Redirect-to-Heroku/HEAD/img/oops.png -------------------------------------------------------------------------------- /img/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Itz-fork/Redirect-to-Heroku/HEAD/img/avatar.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Redirect to Heroku 2 | This is a simple website to get the heroku deploy link from a github repository. 3 | 4 | ## Usage 5 | 6 | - Open the [Redirect to Heroku Website](https://itz-fork.github.io/Redirect-to-Heroku) 7 | - You can pass `src` parameter to add fork button on the page. Once you passed it you can't get the deploy link for the same github repo 8 | - **Ex:** `https://itz-fork.github.io/Redirect-to-Heroku?src=YOUR-GITHUB-USERNAME/REPO-NAME` 9 | 10 | - Enter your **forked github repo link** in the input field 11 | - Click on the "Deploy Now!" button 12 | 13 | That's it! 14 | 15 | ## License & Credits 16 | 17 | - This repo is licensed under [MIT LICENSE](https://github.com/Itz-fork/Redirect-to-Heroku/blob/main/LICENSE) 18 | - Main image credits goes to [Dyepell](https://www.deviantart.com/dyepell/art/Sagiri-676662189) 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 I'm Not A Bot #Left_TG 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files Redirect-to-Heroku, 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. -------------------------------------------------------------------------------- /oops.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Whoops! 10 | 11 | 12 | 13 | 14 |
15 |

Whoops!

16 | 17 |

18 | Oops! 19 |

20 | 21 |

22 |

32 |

33 |
34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Heroku Deployer by @Itz-fork 10 | 11 | 12 | 13 | 14 | 15 | Avatar 16 | 17 | 18 |
19 |

Redirect to Heroku

20 | 21 | 22 |

23 | 24 | 25 |
26 | 27 |
28 | 29 | 30 |

31 | 32 |

33 |
34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /styles/oops.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Bangers&family=Fredoka+One&family=Source+Code+Pro&display=swap'); 2 | 3 | :root { 4 | --h1-color: #171C25; 5 | --text-color: #1c212c; 6 | --url-color: #232936; 7 | } 8 | 9 | body { 10 | background-color: #a2cad4; 11 | } 12 | 13 | .details-box { 14 | padding: 1rem; 15 | justify-content: center; 16 | align-items: center; 17 | box-shadow: 18 | 0 2.8px 2.2px rgba(0, 0, 0, 0.034), 19 | 0 6.7px 5.3px rgba(0, 0, 0, 0.048), 20 | 0 12.5px 10px rgba(0, 0, 0, 0.06), 21 | 0 22.3px 17.9px rgba(0, 0, 0, 0.072), 22 | 0 41.8px 33.4px rgba(0, 0, 0, 0.086), 23 | 0 100px 80px rgba(0, 0, 0, 0.12); 24 | /* width: 25rem; */ 25 | margin: 25px auto 25px; 26 | background: #eef3f5; 27 | border-radius: 5px; 28 | } 29 | 30 | .oops-avatar { 31 | width: 250px; 32 | height: auto; 33 | position: relative; 34 | pointer-events: none; 35 | margin-top: -2.5rem; 36 | margin-bottom: -2.5rem; 37 | } 38 | 39 | h1 { 40 | font-family: 'Bangers', cursive; 41 | font-weight: 50; 42 | font-size: 4rem; 43 | color: var(--h1-color); 44 | } 45 | 46 | li{ 47 | font-size: 1.5rem; 48 | font-family: 'Fredoka One', cursive; 49 | text-align: center; 50 | display: table; 51 | margin: 1rem 0 auto; 52 | color: var(--text-color); 53 | } 54 | 55 | code { 56 | font-size: 1.2rem; 57 | font-family: 'Source Code Pro', monospace; 58 | } 59 | 60 | a { 61 | color: var(--url-color); 62 | } 63 | 64 | /* For responsive layout */ 65 | @media (min-width: 700px) { 66 | .details-box { 67 | width: 30rem; 68 | } 69 | } -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | // Function to validate src parameter 2 | function validateSrc() { 3 | if (!unr) { 4 | unr = "Itz-fork"; 5 | return 6 | } 7 | let spl = unr.split("/"); 8 | if (spl.length < 2 || spl[1] == "") { 9 | return throwError(); 10 | } 11 | } 12 | 13 | // Function to setup fork button 14 | function setupForkButton() { 15 | if (unr == "Itz-fork") { 16 | document.getElementById("fork").innerHTML = `Follow @Itz-fork`; 17 | } else { 18 | document.getElementById("fork").innerHTML = `Fork it!`; 19 | } 20 | } 21 | 22 | 23 | // Function to redirect to heroku 24 | function redirectToHeroku() { 25 | let input = document.getElementById("repo-link").value; 26 | if (!input || input == "") { 27 | return throwError("Please enter your forked repo link!"); 28 | } 29 | 30 | if (input.includes(unr)) { 31 | return throwError("You are trying to deploy the original repo which was banned from heroku. Please enter your forked repo link or kindly fuck off!"); 32 | } 33 | 34 | const regex = /https?:\/\/github\.com\/(?:[^\/\s]+\/)+/g 35 | if (!regex.test(input)) { 36 | return throwError("Please enter a github repo url!"); 37 | } 38 | 39 | window.open(`https://heroku.com/deploy?template=${input}`, "_blank"); 40 | } 41 | 42 | // Function to throw errors 43 | function throwError(alTxt = null) { 44 | if (alTxt) { 45 | alert(alTxt); 46 | } else { 47 | window.location = "oops.html"; 48 | } 49 | } 50 | 51 | 52 | // Get the url parameters 53 | var unr = new URL(window.location.href).searchParams.get("src"); 54 | 55 | validateSrc(); 56 | setupForkButton(); -------------------------------------------------------------------------------- /styles/main.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Fredoka+One&display=swap'); 2 | 3 | :root { 4 | --input-color: #021942be; 5 | } 6 | 7 | body { 8 | background-color: #b7dfe9; 9 | } 10 | 11 | .avatar { 12 | width: calc(250 * 1.6px); 13 | position: fixed; 14 | bottom: 0px; 15 | right: calc(-10 * 10px); 16 | pointer-events: none; 17 | z-index: 2; 18 | } 19 | 20 | .heroku-box { 21 | padding: 1rem; 22 | justify-content: center; 23 | align-items: center; 24 | box-shadow: 25 | 0 2.8px 2.2px rgba(0, 0, 0, 0.034), 26 | 0 6.7px 5.3px rgba(0, 0, 0, 0.048), 27 | 0 12.5px 10px rgba(0, 0, 0, 0.06), 28 | 0 22.3px 17.9px rgba(0, 0, 0, 0.072), 29 | 0 41.8px 33.4px rgba(0, 0, 0, 0.086), 30 | 0 100px 80px rgba(0, 0, 0, 0.12); 31 | margin: 100px auto 100px; 32 | background: #eef3f5; 33 | border-radius: 5px; 34 | } 35 | 36 | h1 { 37 | color: #2f455c; 38 | font-family: 'Fredoka One', cursive; 39 | font-size: 2rem; 40 | text-align: center; 41 | } 42 | 43 | .input-field { 44 | width: 100%; 45 | position: relative; 46 | border-bottom: 2px solid var(--input-color); 47 | margin: 4rem auto 2.5rem; 48 | } 49 | 50 | .input-field::after { 51 | content: ""; 52 | position: relative; 53 | display: block; 54 | height: 4px; 55 | width: 100%; 56 | background: var(--input-color); 57 | transform: scaleX(0); 58 | transform-origin: 0%; 59 | transition: transform 600ms ease-in-out; 60 | top: 2px; 61 | } 62 | 63 | .input-field:focus-within { 64 | border-color: transparent; 65 | } 66 | 67 | .input-field:focus-within::after { 68 | transform: scaleX(1); 69 | } 70 | 71 | 72 | .deploy-button { 73 | margin-top: 1rem; 74 | z-index: 1; 75 | font-size: 1.2rem; 76 | font-weight: 200 bold; 77 | letter-spacing: 1px; 78 | padding: 10px 40px 10px; 79 | border: 1px solid black; 80 | cursor: pointer; 81 | position: relative; 82 | } 83 | 84 | .deploy-button::after { 85 | content: ""; 86 | background-color: #92eedf; 87 | width: 100%; 88 | z-index: -1; 89 | position: absolute; 90 | height: 100%; 91 | top: 7px; 92 | left: 7px; 93 | transition: 0.4s; 94 | } 95 | 96 | .deploy-button:hover::after { 97 | top: 0px; 98 | left: 0px; 99 | } 100 | 101 | 102 | .input { 103 | outline: none; 104 | border: none; 105 | overflow: hidden; 106 | margin: 0; 107 | width: 100%; 108 | background: none; 109 | font-weight: bold; 110 | padding: 0.25rem 0; 111 | font-size: 1rem; 112 | color: #2E3440; 113 | } 114 | .input:invalid { 115 | color: #F08080; 116 | } 117 | 118 | 119 | /* For responsive layout */ 120 | @media (min-width: 700px) { 121 | .heroku-box { 122 | width: 30rem; 123 | } 124 | 125 | .avatar { 126 | width: calc(250 * 2.5px); 127 | } 128 | } 129 | 130 | @media (max-width: 400px) { 131 | .avatar { 132 | width: calc(250 * 1.4px); 133 | } 134 | } 135 | 136 | @media (max-width: 360px) { 137 | .avatar { 138 | display: none; 139 | } 140 | } --------------------------------------------------------------------------------