├── README.md ├── .gitignore ├── requirements.txt ├── static ├── 1.png ├── 10.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png ├── 6.png ├── 7.png ├── 8.png ├── 9.png ├── 404.css ├── style.css ├── app.js └── particles.js ├── Procfile ├── templates ├── confirm.html ├── landing.html ├── index.html └── 404.html └── main.py /README.md: -------------------------------------------------------------------------------- 1 | # GDSC -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | gunicorn -------------------------------------------------------------------------------- /static/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xditya/Bifrost/main/static/1.png -------------------------------------------------------------------------------- /static/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xditya/Bifrost/main/static/10.png -------------------------------------------------------------------------------- /static/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xditya/Bifrost/main/static/2.png -------------------------------------------------------------------------------- /static/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xditya/Bifrost/main/static/3.png -------------------------------------------------------------------------------- /static/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xditya/Bifrost/main/static/4.png -------------------------------------------------------------------------------- /static/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xditya/Bifrost/main/static/5.png -------------------------------------------------------------------------------- /static/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xditya/Bifrost/main/static/6.png -------------------------------------------------------------------------------- /static/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xditya/Bifrost/main/static/7.png -------------------------------------------------------------------------------- /static/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xditya/Bifrost/main/static/8.png -------------------------------------------------------------------------------- /static/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xditya/Bifrost/main/static/9.png -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | # Modify this Procfile to fit your needs 2 | web: gunicorn main:app 3 | -------------------------------------------------------------------------------- /templates/confirm.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 7 |
12 |
13 | 15 | Please confirm your booking for {{portal_id}} 16 | 17 | 18 | 19 |
20 | 21 | -------------------------------------------------------------------------------- /static/404.css: -------------------------------------------------------------------------------- 1 | /* https://codepen.io/namratapdr/pen/yLOgREo */ 2 | 3 | @import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&family=Fira+Mono:wght@500&display=swap'); 4 | 5 | body { 6 | height: 95vh; 7 | background: #000000; 8 | text-align: center; 9 | color: #E0E0E0; 10 | font-family: 'Fira Mono', monospace; 11 | } 12 | 13 | h1 { 14 | font-size: 2.5rem; 15 | font-family: 'Permanent Marker', cursive; 16 | } 17 | 18 | div { 19 | transform-style: preserve-3d; 20 | } 21 | 22 | svg { 23 | width: clamp(300px, 70%, 600px); 24 | height: 500px; 25 | 26 | } 27 | 28 | #rocket { 29 | 30 | transform: translateY(750px); 31 | 32 | animation: launch 2s ease-out forwards; 33 | } 34 | 35 | @keyframes launch { 36 | from { 37 | transform: translateY(750px); 38 | } 39 | 40 | to { 41 | perspective: 500px; 42 | transform: translateY(0px); 43 | } 44 | } 45 | 46 | #stars { 47 | animation: twinkling 2s linear; 48 | } 49 | 50 | @keyframes twinkling { 51 | 52 | from { 53 | transform: scale(0); 54 | } 55 | 56 | to { 57 | transform: scale(1); 58 | } 59 | } 60 | 61 | .text { 62 | opacity: 0; 63 | animation: appear 1s ease-in forwards; 64 | animation-delay: 1.8s; 65 | } 66 | 67 | @keyframes appear { 68 | from { 69 | opacity: 0; 70 | } 71 | 72 | to { 73 | opacity: 1; 74 | } 75 | } 76 | 77 | a { 78 | color: #F66947; 79 | text-decoration: none; 80 | } -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import os 2 | import string 3 | from random import choice 4 | 5 | from flask import Flask, render_template, request, redirect 6 | 7 | app = Flask(__name__, static_folder="static") 8 | 9 | 10 | ips = {} 11 | 12 | 13 | @app.route("/") 14 | def home_page(): 15 | ip = request.environ["REMOTE_ADDR"] 16 | # print("IP:", ip) 17 | return portal_clicked() if ip in ips else render_template("index.html") 18 | 19 | 20 | @app.route("/confirm") 21 | def confirm(): 22 | portal_number = request.args.get("id") 23 | return ( 24 | render_template("confirm.html", portal_id=portal_number) 25 | if portal_number 26 | else render_template("404.html") 27 | ) 28 | 29 | 30 | @app.route("/portal") 31 | def portal_clicked(): 32 | portal_number = request.args.get("id") 33 | if not portal_number: 34 | return render_template("404.html") 35 | ip = request.remote_addr 36 | random_booking_id = "".join( 37 | [choice(string.ascii_letters + string.digits) for _ in range(10)] 38 | ) 39 | if ip not in list(ips.keys()): 40 | ips[ip] = random_booking_id 41 | return render_template( 42 | "landing.html", booking_id=random_booking_id, portal_number=portal_number 43 | ) 44 | 45 | 46 | @app.route("/cancel") 47 | def canceller(): 48 | portal_number = request.args.get("id") 49 | if not portal_number: 50 | return render_template("404.html") 51 | ip = request.remote_addr 52 | if ip in list(ips.keys()): 53 | ips.pop(ip) 54 | return redirect("/") 55 | 56 | 57 | # app.run(debug=True, port=5000) 58 | # app.run(debug=True, port=8080) 59 | -------------------------------------------------------------------------------- /templates/landing.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
15 |
16 |
18 | Thank you for your purchase!
19 | Your Booking ID: {{booking_id}}
20 | Portal Number: {{portal_number}}
21 |
22 |
23 |
24 |
25 |
26 |
27 |
14 |
17 |
22 |
23 | Hydrargyrum24 |58,999 25 |Recommended for the unhinged. |
30 |
31 |
32 |
33 | Daenerys34 |779,999 35 |Her children really do want this planet. |
40 |
41 |
42 | Wine43 |96,999 44 |Need I say more? 45 | 47 | |
48 |
49 |
50 | Medovyy51 |155,999 52 |Meet the darling dear members of the Winnie De Pooh 53 | species. 54 | 56 | |
57 |
58 |
59 | Omu Lette60 |125,999 61 |Some say there lies a dragon child |
66 |
68 |
69 | Earthalla70 |99,999 71 |The dear long lost twin of our very own Earth. |
76 |
77 |
78 | Amoongus79 |69,899 80 |Scientists have searched long and hard, yet no one knows which 81 | of 82 | the two references the name is based on. 83 | 85 | |
86 |
87 |
88 | Reality89 |49,999 90 |Some say, often disappointing. 91 | 93 | |
94 |
95 |
96 | Snice97 |98,999 98 |Is it ice? Is it snow? No one knows but don't miss those! Just 99 | don't light a fire over here. 100 | 102 | |
103 |
104 |
105 | Licorie106 |88,999 107 |Green and lush. Almost as if the name refers to something
108 | similar. |