├── .gitattributes ├── .gitignore ├── Procfile ├── README.md ├── app.db ├── app.py ├── config.py ├── manage.py ├── migrations ├── README ├── __pycache__ │ └── env.cpython-37.pyc ├── alembic.ini ├── env.py ├── script.py.mako └── versions │ ├── 4f8bbe94127a_.py │ └── __pycache__ │ └── 4f8bbe94127a_.cpython-37.pyc ├── model.py ├── requirements.txt ├── screenshots ├── darkmain.png ├── main.png ├── play.png └── profile.png ├── static ├── css │ ├── card.css │ ├── login.css │ ├── post.css │ ├── profile.css │ ├── slider.css │ └── styles.css ├── img │ ├── error.jpg │ ├── errordark.jpg │ ├── favicons.png │ ├── games │ │ ├── atari.png │ │ ├── mine.png │ │ ├── pong.png │ │ └── snake.png │ ├── logo.png │ ├── post │ │ ├── apoc.jfif │ │ ├── ava.jfif │ │ ├── blank.jfif │ │ ├── ceaser.jfif │ │ ├── check.jfif │ │ ├── cube.jpg │ │ ├── echo.png │ │ ├── end.png │ │ ├── feel.jfif │ │ ├── fine.jfif │ │ ├── fire.png │ │ ├── hero.png │ │ ├── iron.jpg │ │ ├── liam.jfif │ │ ├── light.jfif │ │ ├── lion.jfif │ │ ├── mac.jpg │ │ ├── main.jpg │ │ ├── pic.jpg │ │ ├── pose.jfif │ │ ├── real.jfif │ │ └── viva.jfif │ ├── prof.jpg │ ├── profile │ │ ├── cloud.jpg │ │ ├── dark.jfif │ │ ├── fire.jpg │ │ ├── gun.jpg │ │ ├── mini.jpg │ │ ├── moon.jpg │ │ ├── poly.jpg │ │ ├── power.jpg │ │ ├── profile.jpg │ │ ├── set.jpg │ │ └── vib.jpg │ └── sketch.jpg └── js │ ├── clocktime.js │ ├── games │ ├── atari.js │ ├── mine.js │ ├── pong.js │ └── snake.js │ ├── quote.js │ └── quotes.txt └── templates ├── 404.html ├── about.html ├── addvideo.html ├── admin.html ├── base.html ├── changepassword.html ├── config.json ├── createaccount.html ├── delete.html ├── deleteaccount.html ├── deletegame.html ├── deletevideo.html ├── edit.html ├── editblog.html ├── editgame.html ├── editor.html ├── editprofile.html ├── editvideo.html ├── games ├── fullsc.html └── playgame.html ├── index.html ├── login.html ├── play.html ├── postblog.html ├── profile.html ├── upload.html └── video.html /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | rough.py 2 | rough.html 3 | requirement.txt 4 | *.pyc 5 | verify.html 6 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: python manage.py runserver --host 0.0.0.0 --port ${PORT} 2 | init: python manage.py db init 3 | migrate: python manage.py db migrate 4 | upgrade: python manage.py db upgrade 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

BlueBlogs - A social platform for nerds


2 |

A social blog 💻 platform for nerds 🤓 📕 Visit website


3 | 9 |

Create Blogs


10 | 11 |
12 |

In Dark theme too


13 | 14 |
15 |

Play games


16 | 17 |
18 |

Create your own profile


19 |
20 |

21 | Go ahead and 22 | Sign Up 23 | ( you don't have to provide a real email address ) 24 |

25 | -------------------------------------------------------------------------------- /app.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/app.db -------------------------------------------------------------------------------- /app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template, url_for, redirect, request, session, flash 2 | from flask_sqlalchemy import SQLAlchemy 3 | from werkzeug.utils import secure_filename 4 | import json 5 | import hashlib 6 | import os 7 | import random 8 | 9 | images = [] 10 | propics = [] 11 | 12 | for root, directories, files in os.walk("static/img/post"): 13 | for filename in files: 14 | images.append(filename) 15 | 16 | for root, directories, files in os.walk("static/img/profile"): 17 | for filename in files: 18 | propics.append(filename) 19 | 20 | 21 | def giveme(): 22 | random.shuffle(images) 23 | return random.choice(images) 24 | 25 | 26 | def giveprof(): 27 | random.shuffle(propics) 28 | return random.choice(propics) 29 | 30 | 31 | with open("templates/config.json", "r") as c: 32 | para = json.load(c)["para"] 33 | 34 | app = Flask(__name__) 35 | app.config.from_object('config') 36 | app.secret_key = 'ThisIsAwildGameOfSurvival' 37 | db = SQLAlchemy(app) 38 | 39 | from model import* 40 | 41 | 42 | def hashit(s): 43 | z = s.encode('ascii') 44 | return hashlib.sha256(z).hexdigest() 45 | 46 | 47 | def isalready(s): 48 | return s in images or s in propics 49 | 50 | 51 | def toolong(title, content): 52 | tl = len(title) > 80 53 | contlis = content.split("\n") 54 | cl = len(contlis) > 7 55 | clt = len(content) > 600 56 | return tl or cl or clt 57 | 58 | 59 | def longabout(about): 60 | return len(about) > 100 61 | 62 | 63 | def invalid(email): 64 | if email.count("@") != 1 or email.count(".") != 1: 65 | return True 66 | if " " in email: 67 | return True 68 | if ".com" not in email: 69 | return True 70 | em = email.split("@") 71 | if len(em[0]) == 0: 72 | return True 73 | for x in em[0]: 74 | a = ord(x) 75 | if 47 < a < 58 or 64 < a < 91 or 96 < a < 123: 76 | continue 77 | else: 78 | return True 79 | 80 | ep = em[1].split(".") 81 | if len(ep) != 2: 82 | return True 83 | if ep[1] != "com": 84 | return True 85 | if ep[0] not in ["outlook", "gmail"]: 86 | return True 87 | 88 | return False 89 | 90 | 91 | def invaliduser(username): 92 | if len(username)<1: 93 | return True 94 | 95 | for x in username: 96 | if 64 0 else "#" 125 | next = "?page=" + str(page + 1) if page < last - 1 else "#" 126 | 127 | return render_template('index.html', posts=posts, prev=prev, next=next) 128 | 129 | 130 | @app.route('/profile/') 131 | def profile(name): 132 | edit = 0 133 | posts = Posts.query.filter_by( 134 | author=name).order_by(Posts.date.desc()).all() 135 | if "user" in session: 136 | if name == session["user"]: 137 | edit = 1 138 | 139 | user = Users.query.get_or_404(name) 140 | return render_template("profile.html", user=user, edit=edit, posts=posts) 141 | 142 | 143 | @app.route('/editprofile', methods=["GET", "POST"]) 144 | def editprofile(): 145 | if "user" not in session: 146 | flash("You are not logged in") 147 | return redirect("/login") 148 | 149 | user = Users.query.get_or_404(session["user"]) 150 | if request.method == 'POST': 151 | about = request.form['about'] 152 | github = request.form['github'] 153 | code = request.form['code'] 154 | about = about.strip(' ') 155 | about = about.strip('\n') 156 | if longabout(about) or "\n" in about: 157 | flash("The about is too long") 158 | return redirect("/editprofile") 159 | random_check = request.form.get('random') 160 | user.about = about 161 | user.github = github 162 | user.code = code 163 | if not random_check: 164 | try: 165 | image = request.files['profilepic'] 166 | if isalready(image.filename): 167 | flash('Sorry! The file name already exist') 168 | return redirect('/editprofile') 169 | 170 | else: 171 | image.save(os.path.join('static/img/profile/', 172 | secure_filename(image.filename))) 173 | 174 | user.prof = image.filename 175 | except Exception as e: 176 | print(e) 177 | 178 | else: 179 | user.prof = giveprof() 180 | 181 | try: 182 | db.session.commit() 183 | return redirect('/profile/' + user.name) 184 | except(Exception): 185 | return redirect('/error') 186 | else: 187 | return render_template("editprofile.html", user=user) 188 | 189 | 190 | @app.route('/login', methods=['GET', 'POST']) 191 | def login(): 192 | if "user" in session: 193 | flash("You are already logged in") 194 | return redirect("/") 195 | 196 | if request.method == 'POST': 197 | try: 198 | user = Users.query.get_or_404(request.form['username']) 199 | except Exception as e: 200 | print(e) 201 | flash("You are not signed in") 202 | return redirect("/createaccount") 203 | 204 | password = hashit(request.form['password']) 205 | 206 | if password == user.password: 207 | session["user"] = user.name 208 | flash("Logged In successfully") 209 | return redirect("/") 210 | else: 211 | flash("Wrong password") 212 | return redirect("/login") 213 | else: 214 | return render_template('login.html') 215 | 216 | 217 | @app.route('/changepassword', methods=['GET', 'POST']) 218 | def changepassword(): 219 | if "user" not in session: 220 | flash("You are not logged in") 221 | return redirect("/") 222 | 223 | user = Users.query.get_or_404(session["user"]) 224 | if request.method == 'POST': 225 | prevpass = hashit(request.form['oldpassword']) 226 | newpassword = hashit(request.form['newpassword']) 227 | 228 | if prevpass == user.password: 229 | user.password = newpassword 230 | try: 231 | db.session.commit() 232 | flash("Password updated! shh, Don't tell anyone") 233 | return redirect("/profile/"+user.name) 234 | except(Exception): 235 | return redirect("/error") 236 | else: 237 | flash("Wrong current password") 238 | return redirect("/changepassword") 239 | else: 240 | return render_template('changepassword.html') 241 | 242 | 243 | @app.route('/deleteaccount', methods=['GET', 'POST']) 244 | def deleteaccount(): 245 | if "user" not in session: 246 | flash("You are not logged in") 247 | return redirect("/login") 248 | 249 | if request.method == 'POST': 250 | user = Users.query.get_or_404(session["user"]) 251 | password = hashit(request.form['password']) 252 | 253 | if password == user.password: 254 | try: 255 | posts = Posts.query.filter_by(author=session["user"]).all() 256 | for post in posts: 257 | db.session.delete(post) 258 | db.session.delete(user) 259 | db.session.commit() 260 | session.pop("user", None) 261 | except(Exception): 262 | return redirect("/error") 263 | flash("Account deleted") 264 | return redirect("/") 265 | else: 266 | flash("Wrong password") 267 | return redirect("/deleteaccount") 268 | else: 269 | return render_template('deleteaccount.html') 270 | 271 | 272 | @app.route('/logout') 273 | def logout(): 274 | if "user" in session: 275 | session.pop("user", None) 276 | flash("Logged out successfully") 277 | else: 278 | flash("You are not logged in") 279 | return redirect("/") 280 | 281 | 282 | @app.route('/createaccount', methods=['GET', 'POST']) 283 | def createaccount(): 284 | if "user" in session: 285 | flash("You are already logged in") 286 | return redirect("/") 287 | 288 | if request.method == 'POST': 289 | try: 290 | username = request.form['username'] 291 | user = Users.query.get_or_404(username) 292 | flash("Username already exist") 293 | return render_template('createaccount.html') 294 | except (Exception): 295 | email = request.form['email'] 296 | user = Users.query.filter_by(email=email).all() 297 | if len(user): 298 | flash("Email address already exist") 299 | return render_template('createaccount.html') 300 | if invalid(email): 301 | flash("Invalid email address") 302 | return render_template('createaccount.html') 303 | if invaliduser(username): 304 | flash("Only Letters are allowed in User name") 305 | return render_template('createaccount.html') 306 | 307 | password = hashit(request.form['password']) 308 | newuser = Users(name=username, email=email, password=password) 309 | try: 310 | db.session.add(newuser) 311 | db.session.commit() 312 | except(Exception): 313 | return redirect("/error") 314 | session["user"] = username 315 | flash("You are now signed in") 316 | return redirect("/") 317 | 318 | if password == user.password: 319 | session["user"] = user.name 320 | flash("Logged In successfully") 321 | return redirect("/") 322 | else: 323 | flash("Wrong password") 324 | return redirect("/login") 325 | else: 326 | return render_template('createaccount.html') 327 | 328 | 329 | @app.route('/editor') 330 | def editor(): 331 | if "user" not in session or session["user"] != "blue": 332 | flash("You are not authorized visit this page") 333 | return redirect("/") 334 | 335 | games = Games.query.all() 336 | return render_template('editor.html', games=games) 337 | 338 | 339 | @app.route('/deletegame/', methods=['GET', 'POST']) 340 | def deletegame(id): 341 | if "user" not in session or session["user"] != "blue": 342 | flash("You are not authorized visit this page") 343 | return redirect("/") 344 | 345 | game = Games.query.get_or_404(id) 346 | if request.method == 'POST': 347 | try: 348 | try: 349 | os.remove(os.path.join( 350 | 'static/img/games/', game.nick + '.png')) 351 | os.remove(os.path.join( 352 | 'static/js/games/', game.nick + '.js')) 353 | except(Exception): 354 | return redirect('/error') 355 | 356 | db.session.delete(game) 357 | db.session.commit() 358 | return redirect('/editor') 359 | 360 | except(Exception): 361 | return redirect('/error') 362 | else: 363 | return render_template('deletegame.html', game=game) 364 | 365 | 366 | @app.route('/editor/', methods=['GET', 'POST']) 367 | def editgame(id): 368 | if "user" not in session or session["user"] != "blue": 369 | flash("You are not authorized visit this page") 370 | return redirect("/") 371 | 372 | game = Games.query.get_or_404(id) 373 | 374 | if request.method == 'POST': 375 | try: 376 | os.remove(os.path.join( 377 | 'static/img/games/', game.nick + '.png')) 378 | os.remove(os.path.join('static/js/games/', game.nick + '.js')) 379 | except(Exception): 380 | return redirect('/error') 381 | 382 | game.name = request.form['name'] 383 | game.nick = request.form['nick'] 384 | game.dis = request.form['discrip'] 385 | 386 | image = request.files['imagefile'] 387 | jsfile = request.files['jsfile'] 388 | 389 | image.save(os.path.join('static/img/games/', 390 | secure_filename(image.filename))) 391 | jsfile.save(os.path.join('static/js/games/', 392 | secure_filename(jsfile.filename))) 393 | 394 | try: 395 | db.session.commit() 396 | return redirect('/play') 397 | except(Exception): 398 | return redirect('/error') 399 | else: 400 | return render_template('editgame.html', game=game) 401 | 402 | 403 | @app.route('/edit/', methods=['GET', 'POST']) 404 | def editblog(id): 405 | if "user" not in session: 406 | flash("You are not logged in !") 407 | return redirect('/login') 408 | 409 | post = Posts.query.get_or_404(id) 410 | if post.author != session["user"]: 411 | flash("You can't edit someone else post") 412 | return redirect("/") 413 | 414 | if request.method == 'POST': 415 | title = request.form['title'] 416 | content = request.form['content'] 417 | content = content.strip(' ') 418 | content = content.strip('\n') 419 | title = title.strip(' ') 420 | if toolong(title, content): 421 | flash("The title or post is too long") 422 | return redirect("/edit/" + str(id)) 423 | 424 | post.title = title 425 | post.content = content 426 | try: 427 | db.session.commit() 428 | return redirect('/') 429 | except(Exception): 430 | return redirect('/error') 431 | return render_template('editblog.html', post=post) 432 | 433 | 434 | @app.route('/delete/', methods=['GET', 'POST']) 435 | def delete(id): 436 | if "user" not in session: 437 | flash("You are not logged in !") 438 | return redirect('/login') 439 | 440 | post = Posts.query.get_or_404(id) 441 | if post.author != session["user"]: 442 | flash("You can't delete someone else post") 443 | return redirect("/") 444 | 445 | if request.method == 'POST': 446 | try: 447 | db.session.delete(post) 448 | db.session.commit() 449 | return redirect('/') 450 | except(Exception): 451 | return redirect('/error') 452 | 453 | return render_template('delete.html', post=post) 454 | 455 | 456 | @app.route('/about') 457 | def about(): 458 | return render_template('about.html') 459 | 460 | 461 | @app.route('/add', methods=['GET', 'POST']) 462 | def addvideo(): 463 | if "user" not in session or session["user"] != "blue": 464 | flash("You are not authorized visit this page") 465 | return redirect("/") 466 | 467 | if request.method == 'POST': 468 | title = request.form['title'] 469 | link = request.form['link'] 470 | newvideo = Videos( 471 | title=title, link="https://www.youtube.com/embed/" + link) 472 | try: 473 | db.session.add(newvideo) 474 | db.session.commit() 475 | return redirect('/video') 476 | except(Exception): 477 | return redirect('/error') 478 | else: 479 | return render_template('addvideo.html') 480 | 481 | 482 | @app.route('/video') 483 | def video(): 484 | videos = Videos.query.order_by(Videos.id.desc()).all() 485 | return render_template('video.html', videos=videos) 486 | 487 | 488 | @app.route('/editvideo') 489 | def editvideo(): 490 | if "user" not in session or session["user"] != "blue": 491 | flash("You are not authorized visit this page") 492 | return redirect("/") 493 | 494 | videos = Videos.query.order_by(Videos.id.desc()).all() 495 | return render_template('editvideo.html', videos=videos) 496 | 497 | 498 | @app.route('/deletevideo/', methods=['GET', 'POST']) 499 | def deletevideo(id): 500 | if "user" not in session or session["user"] != "blue": 501 | flash("You are not authorized visit this page") 502 | return redirect("/") 503 | 504 | video = Videos.query.get_or_404(id) 505 | 506 | if request.method == 'POST': 507 | try: 508 | db.session.delete(video) 509 | db.session.commit() 510 | return redirect('/editvideo') 511 | except(Exception): 512 | return redirect('/error') 513 | else: 514 | return render_template('deletevideo.html', video=video) 515 | 516 | 517 | @app.route('/play') 518 | def menu(): 519 | games = Games.query.all() 520 | return render_template('play.html', games=games) 521 | 522 | 523 | @app.route('/upload', methods=['GET', 'POST']) 524 | def upload(): 525 | if "user" not in session or session["user"] != "blue": 526 | flash("You are not authorized visit this page") 527 | return redirect("/") 528 | 529 | if request.method == 'POST': 530 | name = request.form['name'] 531 | nick = request.form['nick'] 532 | dis = request.form['discrip'] 533 | try: 534 | image = request.files['imagefile'] 535 | jsfile = request.files['jsfile'] 536 | image.save(os.path.join('static/img/games/', 537 | secure_filename(image.filename))) 538 | jsfile.save(os.path.join('static/js/games/', 539 | secure_filename(jsfile.filename))) 540 | newgame = Games(name=name, nick=nick, dis=dis) 541 | db.session.add(newgame) 542 | db.session.commit() 543 | return redirect('/play') 544 | except Exception as error: 545 | print(error) 546 | return redirect('/error') 547 | else: 548 | return render_template('upload.html') 549 | 550 | 551 | @app.route('/error') 552 | def error(): 553 | return render_template('404.html') 554 | 555 | 556 | @app.route('/post', methods=['GET', 'POST']) 557 | def post(): 558 | if "user" not in session: 559 | flash("You are not logged in !") 560 | return redirect('/login') 561 | 562 | if request.method == 'POST': 563 | title = request.form['title'] 564 | content = request.form['content'] 565 | content = content.strip(' ') 566 | content = content.strip('\n') 567 | title = title.strip(' ') 568 | if toolong(title, content): 569 | flash("The title or post is too long") 570 | return redirect("/post") 571 | random_check = request.form.get('random') 572 | if not random_check: 573 | try: 574 | image = request.files['postimage'] 575 | if isalready(image.filename): 576 | flash('Sorry! The file name already exist') 577 | return redirect('/post') 578 | 579 | else: 580 | image.save(os.path.join('static/img/post/', 581 | secure_filename(image.filename))) 582 | 583 | except(Exception): 584 | return redirect('/error') 585 | 586 | newpost = Posts(title=title, content=content, 587 | image=image.filename, author=session["user"]) 588 | else: 589 | newpost = Posts(title=title, content=content, 590 | image=giveme(), author=session["user"]) 591 | 592 | try: 593 | db.session.add(newpost) 594 | db.session.commit() 595 | return redirect('/') 596 | except(Exception): 597 | return redirect('/error') 598 | 599 | else: 600 | return render_template('/postblog.html') 601 | 602 | 603 | @app.route('/admin/') 604 | def admin(): 605 | if "user" not in session or session["user"] != "blue": 606 | flash("You are not authorized visit this page") 607 | return redirect("/") 608 | else: 609 | return render_template('admin.html') 610 | 611 | 612 | @app.route('/play/') 613 | def play(id): 614 | game = Games.query.get_or_404(id) 615 | return render_template('games/playgame.html', game=game) 616 | 617 | 618 | @app.route('/play/full/') 619 | def playfull(id): 620 | game = Games.query.get_or_404(id) 621 | 622 | return render_template('games/fullsc.html', game=game) 623 | 624 | 625 | @app.route("/js/") 626 | def index_js(file): 627 | with open("static/js/" + file, "r") as f: 628 | data = f.read() 629 | 630 | return data 631 | 632 | 633 | if __name__ == '__main__': 634 | db.create_all() 635 | app.run(debug=True) 636 | -------------------------------------------------------------------------------- /config.py: -------------------------------------------------------------------------------- 1 | import os 2 | basedir = os.path.abspath(os.path.dirname(__file__)) 3 | 4 | SQLALCHEMY_DATABASE_URI = 'postgres://vwdvuoczqxhjtc:2ae32d34b68e169a426bc46836e732986fcfbafd1fe7741541b503f13f14f702@ec2-34-225-162-157.compute-1.amazonaws.com:5432/d3e0q6d7pajbd5' 5 | # SQLALCHEMY_DATABASE_URI = 'sqlite:///app.db' 6 | SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'migrations') 7 | SECRET_KEY = 'ThisIsAwildGameOfSurvival' 8 | SQLALCHEMY_TRACK_MODIFICATIONS = False 9 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | from flask_script import Manager 2 | from flask_migrate import Migrate, MigrateCommand 3 | 4 | from app import app, db 5 | 6 | migrate = Migrate(app, db) 7 | 8 | manager = Manager(app) 9 | manager.add_command('db', MigrateCommand) 10 | 11 | 12 | if __name__ == '__main__': 13 | manager.run() 14 | -------------------------------------------------------------------------------- /migrations/README: -------------------------------------------------------------------------------- 1 | Generic single-database configuration. -------------------------------------------------------------------------------- /migrations/__pycache__/env.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/migrations/__pycache__/env.cpython-37.pyc -------------------------------------------------------------------------------- /migrations/alembic.ini: -------------------------------------------------------------------------------- 1 | # A generic, single database configuration. 2 | 3 | [alembic] 4 | # template used to generate migration files 5 | # file_template = %%(rev)s_%%(slug)s 6 | 7 | # set to 'true' to run the environment during 8 | # the 'revision' command, regardless of autogenerate 9 | # revision_environment = false 10 | 11 | 12 | # Logging configuration 13 | [loggers] 14 | keys = root,sqlalchemy,alembic 15 | 16 | [handlers] 17 | keys = console 18 | 19 | [formatters] 20 | keys = generic 21 | 22 | [logger_root] 23 | level = WARN 24 | handlers = console 25 | qualname = 26 | 27 | [logger_sqlalchemy] 28 | level = WARN 29 | handlers = 30 | qualname = sqlalchemy.engine 31 | 32 | [logger_alembic] 33 | level = INFO 34 | handlers = 35 | qualname = alembic 36 | 37 | [handler_console] 38 | class = StreamHandler 39 | args = (sys.stderr,) 40 | level = NOTSET 41 | formatter = generic 42 | 43 | [formatter_generic] 44 | format = %(levelname)-5.5s [%(name)s] %(message)s 45 | datefmt = %H:%M:%S 46 | -------------------------------------------------------------------------------- /migrations/env.py: -------------------------------------------------------------------------------- 1 | from __future__ import with_statement 2 | 3 | import logging 4 | from logging.config import fileConfig 5 | 6 | from sqlalchemy import engine_from_config 7 | from sqlalchemy import pool 8 | 9 | from alembic import context 10 | 11 | # this is the Alembic Config object, which provides 12 | # access to the values within the .ini file in use. 13 | config = context.config 14 | 15 | # Interpret the config file for Python logging. 16 | # This line sets up loggers basically. 17 | fileConfig(config.config_file_name) 18 | logger = logging.getLogger('alembic.env') 19 | 20 | # add your model's MetaData object here 21 | # for 'autogenerate' support 22 | # from myapp import mymodel 23 | # target_metadata = mymodel.Base.metadata 24 | from flask import current_app 25 | config.set_main_option( 26 | 'sqlalchemy.url', 27 | str(current_app.extensions['migrate'].db.engine.url).replace('%', '%%')) 28 | target_metadata = current_app.extensions['migrate'].db.metadata 29 | 30 | # other values from the config, defined by the needs of env.py, 31 | # can be acquired: 32 | # my_important_option = config.get_main_option("my_important_option") 33 | # ... etc. 34 | 35 | 36 | def run_migrations_offline(): 37 | """Run migrations in 'offline' mode. 38 | 39 | This configures the context with just a URL 40 | and not an Engine, though an Engine is acceptable 41 | here as well. By skipping the Engine creation 42 | we don't even need a DBAPI to be available. 43 | 44 | Calls to context.execute() here emit the given string to the 45 | script output. 46 | 47 | """ 48 | url = config.get_main_option("sqlalchemy.url") 49 | context.configure( 50 | url=url, target_metadata=target_metadata, literal_binds=True 51 | ) 52 | 53 | with context.begin_transaction(): 54 | context.run_migrations() 55 | 56 | 57 | def run_migrations_online(): 58 | """Run migrations in 'online' mode. 59 | 60 | In this scenario we need to create an Engine 61 | and associate a connection with the context. 62 | 63 | """ 64 | 65 | # this callback is used to prevent an auto-migration from being generated 66 | # when there are no changes to the schema 67 | # reference: http://alembic.zzzcomputing.com/en/latest/cookbook.html 68 | def process_revision_directives(context, revision, directives): 69 | if getattr(config.cmd_opts, 'autogenerate', False): 70 | script = directives[0] 71 | if script.upgrade_ops.is_empty(): 72 | directives[:] = [] 73 | logger.info('No changes in schema detected.') 74 | 75 | connectable = engine_from_config( 76 | config.get_section(config.config_ini_section), 77 | prefix='sqlalchemy.', 78 | poolclass=pool.NullPool, 79 | ) 80 | 81 | with connectable.connect() as connection: 82 | context.configure( 83 | connection=connection, 84 | target_metadata=target_metadata, 85 | process_revision_directives=process_revision_directives, 86 | **current_app.extensions['migrate'].configure_args 87 | ) 88 | 89 | with context.begin_transaction(): 90 | context.run_migrations() 91 | 92 | 93 | if context.is_offline_mode(): 94 | run_migrations_offline() 95 | else: 96 | run_migrations_online() 97 | -------------------------------------------------------------------------------- /migrations/script.py.mako: -------------------------------------------------------------------------------- 1 | """${message} 2 | 3 | Revision ID: ${up_revision} 4 | Revises: ${down_revision | comma,n} 5 | Create Date: ${create_date} 6 | 7 | """ 8 | from alembic import op 9 | import sqlalchemy as sa 10 | ${imports if imports else ""} 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = ${repr(up_revision)} 14 | down_revision = ${repr(down_revision)} 15 | branch_labels = ${repr(branch_labels)} 16 | depends_on = ${repr(depends_on)} 17 | 18 | 19 | def upgrade(): 20 | ${upgrades if upgrades else "pass"} 21 | 22 | 23 | def downgrade(): 24 | ${downgrades if downgrades else "pass"} 25 | -------------------------------------------------------------------------------- /migrations/versions/4f8bbe94127a_.py: -------------------------------------------------------------------------------- 1 | """empty message 2 | 3 | Revision ID: 4f8bbe94127a 4 | Revises: 5 | Create Date: 2020-07-10 19:36:57.258798 6 | 7 | """ 8 | from alembic import op 9 | import sqlalchemy as sa 10 | 11 | 12 | # revision identifiers, used by Alembic. 13 | revision = '4f8bbe94127a' 14 | down_revision = None 15 | branch_labels = None 16 | depends_on = None 17 | 18 | 19 | def upgrade(): 20 | # ### commands auto generated by Alembic - please adjust! ### 21 | op.create_table('games', 22 | sa.Column('id', sa.Integer(), nullable=False), 23 | sa.Column('nick', sa.String(length=20), nullable=False), 24 | sa.Column('name', sa.String(length=20), nullable=False), 25 | sa.Column('dis', sa.String(length=200), nullable=False), 26 | sa.PrimaryKeyConstraint('id'), 27 | sa.UniqueConstraint('id') 28 | ) 29 | op.create_table('posts', 30 | sa.Column('id', sa.Integer(), nullable=False), 31 | sa.Column('title', sa.String(length=200), nullable=False), 32 | sa.Column('content', sa.String(length=600), nullable=False), 33 | sa.Column('date', sa.DateTime(), nullable=True), 34 | sa.Column('author', sa.String(length=200), nullable=False), 35 | sa.Column('image', sa.String(length=30), nullable=True), 36 | sa.PrimaryKeyConstraint('id'), 37 | sa.UniqueConstraint('id') 38 | ) 39 | op.create_table('users', 40 | sa.Column('name', sa.String(length=50), nullable=False), 41 | sa.Column('email', sa.String(length=100), nullable=False), 42 | sa.Column('password', sa.String(length=100), nullable=False), 43 | sa.Column('about', sa.String(length=100), nullable=False), 44 | sa.Column('prof', sa.String(length=20), nullable=False), 45 | sa.Column('github', sa.String(length=100), nullable=False), 46 | sa.Column('code', sa.String(length=100), nullable=False), 47 | sa.PrimaryKeyConstraint('name'), 48 | sa.UniqueConstraint('email'), 49 | sa.UniqueConstraint('name') 50 | ) 51 | op.create_table('videos', 52 | sa.Column('id', sa.Integer(), nullable=False), 53 | sa.Column('title', sa.String(length=80), nullable=False), 54 | sa.Column('link', sa.String(length=200), nullable=False), 55 | sa.PrimaryKeyConstraint('id'), 56 | sa.UniqueConstraint('id') 57 | ) 58 | # ### end Alembic commands ### 59 | 60 | 61 | def downgrade(): 62 | # ### commands auto generated by Alembic - please adjust! ### 63 | op.drop_table('videos') 64 | op.drop_table('users') 65 | op.drop_table('posts') 66 | op.drop_table('games') 67 | # ### end Alembic commands ### 68 | -------------------------------------------------------------------------------- /migrations/versions/__pycache__/4f8bbe94127a_.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/migrations/versions/__pycache__/4f8bbe94127a_.cpython-37.pyc -------------------------------------------------------------------------------- /model.py: -------------------------------------------------------------------------------- 1 | from manage import db 2 | from datetime import datetime 3 | 4 | # TODO: Seperate js file for password configurations 5 | 6 | class Users(db.Model): 7 | name = db.Column(db.String(50), unique=True, 8 | nullable=False, primary_key=True) 9 | email = db.Column(db.String(100), unique=True, nullable=False) 10 | password = db.Column(db.String(100), nullable=False) 11 | about = db.Column(db.String(100), nullable=False, 12 | default="If you’re going to tell people the truth, be funny or they’ll kill you.") 13 | prof = db.Column(db.String(20), nullable=False, default="profile.jpg") 14 | github = db.Column(db.String(100), nullable=False, default="") 15 | code = db.Column(db.String(100), nullable=False, default="") 16 | 17 | def __repr__(self): 18 | return '' % self.id 19 | 20 | 21 | class Posts(db.Model): 22 | id = db.Column(db.Integer, unique=True, primary_key=True) 23 | title = db.Column(db.String(200), nullable=False) 24 | content = db.Column(db.String(600), nullable=False) 25 | date = db.Column(db.DateTime, default=datetime.now) 26 | author = db.Column(db.String(200), nullable=False) 27 | image = db.Column(db.String(30)) 28 | 29 | def __repr__(self): 30 | return '' % self.id 31 | 32 | 33 | class Games(db.Model): 34 | id = db.Column(db.Integer, unique=True, primary_key=True) 35 | nick = db.Column(db.String(20), nullable=False) 36 | name = db.Column(db.String(20), nullable=False) 37 | dis = db.Column(db.String(200), nullable=False) 38 | 39 | def __repr__(self): 40 | return '' % self.id 41 | 42 | 43 | class Videos(db.Model): 44 | id = db.Column(db.Integer, unique=True, primary_key=True) 45 | title = db.Column(db.String(80), nullable=False) 46 | link = db.Column(db.String(200), nullable=False) 47 | 48 | def __repr__(self): 49 | return '' % self.id 50 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Click==7.0 2 | Flask==1.1.1 3 | Flask-SQLAlchemy==2.4.0 4 | gunicorn==19.9.0 5 | itsdangerous==1.1.0 6 | Jinja2==2.10.1 7 | MarkupSafe==1.1.1 8 | SQLAlchemy==1.3.3 9 | Werkzeug==0.15.4 10 | Flask-Script==2.0.6 11 | Flask-Migrate==2.5.3 12 | psycopg2==2.8.5 13 | sqlalchemy-migrate==0.13.0 14 | -------------------------------------------------------------------------------- /screenshots/darkmain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/screenshots/darkmain.png -------------------------------------------------------------------------------- /screenshots/main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/screenshots/main.png -------------------------------------------------------------------------------- /screenshots/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/screenshots/play.png -------------------------------------------------------------------------------- /screenshots/profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/screenshots/profile.png -------------------------------------------------------------------------------- /static/css/card.css: -------------------------------------------------------------------------------- 1 | .container{ 2 | display: flex; 3 | flex-flow: row wrap; 4 | align-content: space-between; 5 | justify-content: space-between; 6 | } 7 | 8 | .card{ 9 | vertical-align: middle; 10 | max-width: 600px; 11 | max-height: 500px; 12 | margin-left: 20px; 13 | margin-right: 20px; 14 | margin-top: 60px; 15 | margin-bottom: 60px; 16 | padding: 10px 10px 10px 10px; 17 | text-align:center; 18 | border-radius: 15px; 19 | transition: 0.5s; 20 | } 21 | 22 | body[data-theme="light"] .card{ 23 | background-color: white; 24 | box-shadow: 2px 5px 9px #888888; 25 | } 26 | 27 | body[data-theme="dark"] .card{ 28 | background-color: #1e1e1e; 29 | box-shadow: 2px 5px 9px #070707; 30 | } 31 | 32 | body[data-theme="dark"] .card h3{ 33 | color: white; 34 | } 35 | 36 | body[data-theme="light"] .card:hover{ 37 | border-radius: 15px; 38 | box-shadow: 5px 10px 20px #888888; 39 | transform: scale(1.10) translateZ(0); 40 | transition: 0.5s; 41 | } 42 | 43 | body[data-theme="dark"] .card:hover{ 44 | border-radius: 15px; 45 | box-shadow: 5px 10px 20px #070707; 46 | transform: scale(1.10) translateZ(0); 47 | transition: 0.5s; 48 | } 49 | 50 | .card img{ 51 | border: 1px solid #555; 52 | border-radius: 4%; 53 | } 54 | .card:hover img{ 55 | transform: scale(1) translateZ(0); 56 | transition: 0.5s; 57 | } 58 | 59 | body[data-theme="light"] .video{ 60 | vertical-align: middle; 61 | max-width: 560px; 62 | max-height: 400px; 63 | margin: 0 auto; 64 | margin-top: 60px; 65 | margin-bottom: 60px; 66 | padding: 10px 10px 10px 10px; 67 | text-align:center; 68 | box-shadow: 2px 5px 9px #888888; 69 | border-radius: 15px; 70 | } 71 | 72 | body[data-theme="dark"] .video{ 73 | vertical-align: middle; 74 | max-width: 560px; 75 | max-height: 400px; 76 | margin: 0 auto; 77 | margin-top: 60px; 78 | margin-bottom: 60px; 79 | padding: 10px 10px 10px 10px; 80 | text-align:center; 81 | box-shadow: 2px 5px 9px #070707; 82 | border-radius: 15px; 83 | } 84 | 85 | body[data-theme="light"] .video #video-title{ 86 | color: #333; 87 | transition: 0.5s; 88 | } 89 | 90 | body[data-theme="dark"] .video #video-title{ 91 | color: #fff; 92 | transition: 0.5s; 93 | } 94 | 95 | .video #video-title:hover{ 96 | color: #1e40ff; 97 | transform: scale(1.10) translateZ(0); 98 | transition: 0.5s; 99 | } 100 | -------------------------------------------------------------------------------- /static/css/login.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Montserrat:400,700); 2 | 3 | html { 4 | background-color: #eeeeee; 5 | font-family: 'Montserrat', sans-serif; 6 | } 7 | 8 | .fa { 9 | background: white; 10 | color: #1b1b1b; 11 | padding: 1px; 12 | font-size: 1.6em; 13 | width: 3%; 14 | text-align: center; 15 | text-decoration: none; 16 | border-radius: 50%; 17 | margin-right: 5%; 18 | vertical-align: middle; 19 | } 20 | 21 | .content { 22 | display: flex; 23 | align-items: center; 24 | flex-direction: column; 25 | justify-content: center; 26 | width: 100%; 27 | height: 100%; 28 | } 29 | 30 | .container { 31 | background: #ffffff; 32 | position: absolute; 33 | top: 12%; 34 | padding: 30px; 35 | width: 90%; 36 | max-width: 450px; 37 | border-radius: 10px 10px 10px 10px; 38 | box-shadow: 0 30px 60px 0 rgba(0, 0, 0, 0.3); 39 | text-align: center; 40 | } 41 | 42 | #logo { 43 | position: relative; 44 | width: 48px; 45 | height: 48px; 46 | } 47 | 48 | .cred { 49 | position: relative; 50 | } 51 | 52 | button[type=submit] { 53 | background-color: #56baed; 54 | border: none; 55 | color: white; 56 | padding: 15px 60px; 57 | font-size: 0.8em; 58 | text-align: center; 59 | text-decoration: none; 60 | display: inline-block; 61 | text-transform: uppercase; 62 | font-weight: bold; 63 | box-shadow: 0 10px 30px 0 rgba(95, 186, 233, 0.4); 64 | border-radius: 5px 5px 5px 5px; 65 | margin: 5px 20px 40px 20px; 66 | transition: all 0.3s ease-in-out; 67 | outline: none; 68 | } 69 | 70 | button[type="submit"]:hover { 71 | cursor: pointer; 72 | background-color: #008dd6; 73 | } 74 | 75 | input[type=text], input[type=password] { 76 | background-color: #f3f3f3; 77 | border: none; 78 | color: #282828; 79 | padding: 15px 32px; 80 | text-align: left; 81 | text-decoration: none; 82 | display: inline-block; 83 | font-size: 16px; 84 | margin: 5px; 85 | width: 60%; 86 | border: 2px solid #f3f3f3; 87 | border-radius: 5px 5px 5px 5px; 88 | outline: none; 89 | } 90 | 91 | .formfooter { 92 | padding: 10px; 93 | display: flex; 94 | justify-content: space-between; 95 | } 96 | 97 | a { 98 | text-decoration: none; 99 | font-weight: 600; 100 | color: #2fa6f2; 101 | } 102 | 103 | #indicator { 104 | position: absolute; 105 | left: 17.35%; 106 | width: 0%; 107 | padding: 2px; 108 | background-color: #ffffff; 109 | border-radius: 2px; 110 | transition: 0.5s; 111 | } 112 | 113 | #showpass { 114 | float: right; 115 | position: absolute; 116 | margin-top: 4.5%; 117 | margin-left: 2.5%; 118 | font-size: 1.2em; 119 | transition: 0.3s; 120 | } 121 | 122 | #showpass:hover { 123 | cursor: pointer; 124 | } 125 | 126 | .popup { 127 | visibility: hidden; 128 | font-weight: bold; 129 | min-width: 250px; 130 | margin-left: -125px; 131 | text-align: center; 132 | border-radius: 15px; 133 | padding: 16px; 134 | position: fixed; 135 | z-index: 1; 136 | left: 50%; 137 | bottom: 30px; 138 | } 139 | 140 | .popup.show { 141 | background-color: #ed2727; 142 | color: white; 143 | visibility: visible; 144 | -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s; 145 | animation: fadein 0.5s, fadeout 0.5s 2.5s; 146 | } 147 | 148 | @-webkit-keyframes fadein { 149 | from { 150 | bottom: 0; 151 | opacity: 0; 152 | } 153 | 154 | to { 155 | bottom: 30px; 156 | opacity: 1; 157 | } 158 | } 159 | 160 | @keyframes fadein { 161 | from { 162 | bottom: 0; 163 | opacity: 0; 164 | } 165 | 166 | to { 167 | bottom: 30px; 168 | opacity: 1; 169 | } 170 | } 171 | 172 | @-webkit-keyframes fadeout { 173 | from { 174 | bottom: 30px; 175 | opacity: 1; 176 | } 177 | 178 | to { 179 | bottom: 0; 180 | opacity: 0; 181 | } 182 | } 183 | 184 | @keyframes fadeout { 185 | from { 186 | bottom: 30px; 187 | opacity: 1; 188 | } 189 | 190 | to { 191 | bottom: 0; 192 | opacity: 0; 193 | } 194 | } 195 | -------------------------------------------------------------------------------- /static/css/post.css: -------------------------------------------------------------------------------- 1 | body[data-theme="light"] #check { 2 | width: 12%; 3 | color: white; 4 | background-color: #f6a623; 5 | border: none; 6 | font-weight: bold; 7 | font-size: 16px; 8 | padding: 10px; 9 | cursor: pointer; 10 | box-sizing: border-box; 11 | border: 3px solid #e1882d; 12 | border-radius: 24px; 13 | box-shadow: 3px 3px 9px #888888; 14 | transition: 0.5s; 15 | } 16 | 17 | body[data-theme="light"] #check:active { 18 | box-shadow: 2px 2px 7px #888888; 19 | font-size: 15px; 20 | transform: scale(0.9) translateZ(0); 21 | transition: 0.5s; 22 | } 23 | 24 | body[data-theme="dark"] #check { 25 | width: 12%; 26 | color: white; 27 | background-color: #f6a623; 28 | border: none; 29 | font-weight: bold; 30 | font-size: 16px; 31 | padding: 10px; 32 | cursor: pointer; 33 | box-sizing: border-box; 34 | border: 3px solid #e1882d; 35 | border-radius: 24px; 36 | box-shadow: 3px 3px 9px #0c0c0c; 37 | transition: 0.5s; 38 | } 39 | 40 | body[data-theme="dark"] #check:active { 41 | box-shadow: 2px 2px 7px #0c0c0c; 42 | font-size: 15px; 43 | transform: scale(0.9) translateZ(0); 44 | transition: 0.5s; 45 | } 46 | 47 | #check, select { 48 | outline: none; 49 | } 50 | 51 | .card { 52 | background-color: #1abc9c; 53 | color: white; 54 | vertical-align: middle; 55 | max-width: 500px; 56 | max-height: 500px; 57 | margin: 0 auto; 58 | margin-top: 60px; 59 | margin-bottom: 60px; 60 | padding: 5px; 61 | text-align: center; 62 | box-shadow: 2px 5px 9px #888888; 63 | border-radius: 15px; 64 | transition: 0.5s; 65 | } 66 | 67 | body[data-theme="light"] .inputbox { 68 | font-family: inherit; 69 | font-size: 15px; 70 | font-weight: bold; 71 | color: inherit; 72 | width: 70%; 73 | padding: 14px 14px 14px 14px; 74 | box-sizing: border-box; 75 | border: 5px solid #12976c; 76 | border-radius: 25px; 77 | } 78 | 79 | 80 | body[data-theme="light"] .inputbox, select { 81 | color: #1e1e1e; 82 | outline: none; 83 | } 84 | 85 | body[data-theme="light"] .contentbox { 86 | font-family: inherit; 87 | font-size: 15px; 88 | font-weight: bold; 89 | color: inherit; 90 | width: 70%; 91 | padding: 24px 14px 24px 14px; 92 | word-wrap: break-word; 93 | box-sizing: border-box; 94 | border: 5px solid #12976c; 95 | border-radius: 25px; 96 | } 97 | 98 | body[data-theme="light"] .contentbox, select { 99 | color: #1e1e1e; 100 | outline: none; 101 | } 102 | 103 | body[data-theme="dark"] .inputbox { 104 | background-color: #1e1e1e; 105 | font-family: inherit; 106 | font-size: 15px; 107 | font-weight: bold; 108 | color: inherit; 109 | width: 70%; 110 | padding: 14px 14px 14px 14px; 111 | box-sizing: border-box; 112 | border: 5px solid #12976c; 113 | border-radius: 25px; 114 | } 115 | 116 | body[data-theme="dark"] .inputbox, select { 117 | color: white; 118 | outline: none; 119 | } 120 | 121 | body[data-theme="dark"] .contentbox { 122 | background-color: #1e1e1e; 123 | font-family: inherit; 124 | font-size: 15px; 125 | font-weight: bold; 126 | color: inherit; 127 | width: 70%; 128 | padding: 24px 14px 24px 14px; 129 | word-wrap: break-word; 130 | box-sizing: border-box; 131 | border: 5px solid #12976c; 132 | border-radius: 25px; 133 | } 134 | 135 | body[data-theme="dark"] .contentbox, select { 136 | color: white; 137 | outline: none; 138 | } 139 | 140 | .checkbox { 141 | width: 1em; 142 | height: 1em; 143 | vertical-align: middle; 144 | cursor: pointer; 145 | } 146 | 147 | .upload-btn-wrapper { 148 | position: relative; 149 | overflow: hidden; 150 | display: inline-block; 151 | } 152 | 153 | .btn { 154 | border: 2px solid #e1882d; 155 | color: white; 156 | margin: 10px; 157 | background-color: #f6a623; 158 | padding: 8px 20px; 159 | border-radius: 8px; 160 | font-size: 20px; 161 | font-weight: bold; 162 | } 163 | 164 | .upload-btn-wrapper input[type=file] { 165 | font-size: 100px; 166 | position: absolute; 167 | left: 0; 168 | top: 0; 169 | opacity: 0; 170 | } 171 | 172 | .about-author h1 { 173 | font-size: 20px; 174 | text-align: center; 175 | margin: 20px 0 20px; 176 | } 177 | 178 | .avatar-upload { 179 | position: relative; 180 | max-width: 205px; 181 | margin: 30px auto; 182 | } 183 | 184 | .avatar-upload .avatar-edit { 185 | position: absolute; 186 | right: 12px; 187 | z-index: 1; 188 | top: 10px; 189 | } 190 | 191 | .avatar-upload .avatar-edit input { 192 | display: none; 193 | } 194 | 195 | .avatar-upload .avatar-edit input+label { 196 | display: inline-block; 197 | width: 34px; 198 | height: 34px; 199 | margin-bottom: 0; 200 | border-radius: 100%; 201 | background: #ffffff; 202 | border: 1px solid transparent; 203 | box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.12); 204 | cursor: pointer; 205 | font-weight: normal; 206 | transition: all 0.2s ease-in-out; 207 | } 208 | 209 | .avatar-upload .avatar-edit input+label:hover { 210 | background: #f1f1f1; 211 | border-color: #d6d6d6; 212 | } 213 | 214 | .avatar-upload .avatar-edit input+label:after { 215 | content: "\f040"; 216 | font-family: "FontAwesome"; 217 | color: #757575; 218 | position: absolute; 219 | top: 10px; 220 | left: 0; 221 | right: 0; 222 | text-align: center; 223 | margin: auto; 224 | } 225 | 226 | .avatar-upload .avatar-preview { 227 | width: 192px; 228 | height: 192px; 229 | position: relative; 230 | border-radius: 100%; 231 | border: 6px solid #828483; 232 | box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1); 233 | } 234 | 235 | .avatar-upload .avatar-preview>div { 236 | width: 100%; 237 | height: 100%; 238 | border-radius: 100%; 239 | background-size: cover; 240 | background-repeat: no-repeat; 241 | background-position: center; 242 | } 243 | -------------------------------------------------------------------------------- /static/css/profile.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Montserrat:400,700); 2 | body[data-theme="light"] .user img { 3 | border: 8px solid #5dcbe1; 4 | } 5 | 6 | body[data-theme="light"] .user span { 7 | color: #25c583; 8 | } 9 | 10 | body[data-theme="light"] .post-container:nth-child(even) { 11 | border-radius: 15px; 12 | background-color: #f2f2f2; 13 | } 14 | 15 | body[data-theme="dark"] .post-container:nth-child(even) { 16 | border-radius: 15px; 17 | background-color: #252525; 18 | } 19 | 20 | body[data-theme="dark"] .user img { 21 | border: 8px solid #292929; 22 | } 23 | 24 | body[data-theme="dark"] .user span { 25 | color: #0d81e5; 26 | } 27 | 28 | .user { 29 | display: flex; 30 | align-items: center; 31 | } 32 | 33 | .user img { 34 | width: 200px; 35 | height: 200px; 36 | vertical-align: middle; 37 | border-radius: 50%; 38 | } 39 | 40 | .user span { 41 | width: 250px; 42 | height: 160px; 43 | font-size: 2.4em; 44 | font-weight: bold; 45 | vertical-align: middle; 46 | } 47 | 48 | .details { 49 | display: block; 50 | text-align: left; 51 | padding: 8%; 52 | } 53 | 54 | .links { 55 | display: flex; 56 | flex-flow: row; 57 | } 58 | 59 | .links a { 60 | margin-right: 5%; 61 | color: #346fda; 62 | transition: 0.5s; 63 | } 64 | 65 | .links a:hover { 66 | transform: scale(1.10) translateZ(0); 67 | transition: 0.5s; 68 | } 69 | 70 | .details>a { 71 | float: right; 72 | color: #c50080; 73 | } 74 | 75 | span { 76 | text-transform: capitalize; 77 | } 78 | 79 | .post-date { 80 | margin-left: 70px; 81 | text-align: left; 82 | } 83 | 84 | .fa-frown-o { 85 | background-color: inherit; 86 | color: inherit; 87 | font-size: 1.5em; 88 | vertical-align: sub; 89 | margin-left: 4%; 90 | } 91 | 92 | #more { 93 | background-color: inherit; 94 | border: none; 95 | font-size: inherit; 96 | font-weight: bold; 97 | font-family: inherit; 98 | color: #888; 99 | margin-top: 5%; 100 | outline:none; 101 | transition: 0.3s; 102 | } 103 | 104 | #more:hover{ 105 | cursor: pointer; 106 | transform: scale(1.10) translateZ(0); 107 | transition: 0.3s; 108 | } 109 | 110 | .upload-btn-wrapper { 111 | position: relative; 112 | overflow: hidden; 113 | display: inline-block; 114 | } 115 | 116 | .btn { 117 | border: 2px solid #e1882d; 118 | color: white; 119 | margin: 10px; 120 | background-color: #f6a623; 121 | padding: 8px 20px; 122 | border-radius: 8px; 123 | font-size: 20px; 124 | font-weight: bold; 125 | } 126 | 127 | .upload-btn-wrapper input[type=file] { 128 | font-size: 100px; 129 | position: absolute; 130 | left: 0; 131 | top: 0; 132 | opacity: 0; 133 | } 134 | 135 | .about-author h1 { 136 | font-size: 20px; 137 | text-align: center; 138 | margin: 20px 0 20px; 139 | } 140 | 141 | .avatar-upload { 142 | position: relative; 143 | max-width: 205px; 144 | margin: 30px auto; 145 | } 146 | 147 | .avatar-upload .avatar-edit { 148 | position: absolute; 149 | right: 12px; 150 | z-index: 1; 151 | top: 10px; 152 | } 153 | 154 | .avatar-upload .avatar-edit input { 155 | display: none; 156 | } 157 | 158 | .avatar-upload .avatar-edit input+label { 159 | display: inline-block; 160 | width: 34px; 161 | height: 34px; 162 | margin-bottom: 0; 163 | border-radius: 100%; 164 | background: #eee; 165 | border: 1px solid transparent; 166 | box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.12); 167 | cursor: pointer; 168 | font-weight: normal; 169 | transition: all 0.2s ease-in-out; 170 | } 171 | 172 | .avatar-upload .avatar-edit input+label:hover { 173 | background: #f1f1f1; 174 | border-color: #d6d6d6; 175 | } 176 | 177 | .avatar-upload .avatar-edit input+label:after { 178 | content: "\f040"; 179 | font-family: "FontAwesome"; 180 | color: #757575; 181 | position: absolute; 182 | top: 10px; 183 | left: 0; 184 | right: 0; 185 | text-align: center; 186 | margin: auto; 187 | } 188 | 189 | .avatar-upload .avatar-preview { 190 | width: 192px; 191 | height: 192px; 192 | position: relative; 193 | border-radius: 100%; 194 | border: 6px solid #15db8e; 195 | box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1); 196 | } 197 | 198 | .avatar-upload .avatar-preview>div { 199 | width: 100%; 200 | height: 100%; 201 | border-radius: 100%; 202 | background-size: cover; 203 | background-repeat: no-repeat; 204 | background-position: center; 205 | } 206 | 207 | textarea { 208 | background-color: inherit; 209 | border: none; 210 | color: inherit; 211 | padding: 10px; 212 | text-align: left; 213 | text-decoration: none; 214 | display: inline-block; 215 | font-size: 0.8em; 216 | font-weight: bold; 217 | margin: 5px; 218 | width: 100%; 219 | border: 2px solid #888; 220 | border-radius: 5px 5px 5px 5px; 221 | outline: none; 222 | font-family: Montserrat; 223 | } 224 | 225 | input { 226 | background-color: inherit; 227 | border: none; 228 | color: inherit; 229 | padding: 10px; 230 | text-align: left; 231 | text-decoration: none; 232 | display: inline-block; 233 | font-size: 0.8em; 234 | font-weight: bold; 235 | margin: 5px; 236 | width: 50%; 237 | border: 2px solid #888; 238 | border-radius: 5px 5px 5px 5px; 239 | outline: none; 240 | font-family: Montserrat; 241 | } 242 | 243 | .def{ 244 | width: 50%; 245 | display: flex; 246 | flex-flow: row; 247 | } 248 | 249 | .how{ 250 | display: flex; 251 | flex-flow: column; 252 | align-items: center; 253 | } 254 | 255 | button[type=submit] { 256 | background-color: #34afed; 257 | border: none; 258 | color: white; 259 | padding: 15px 60px; 260 | font-size: 0.8em; 261 | text-align: center; 262 | text-decoration: none; 263 | display: inline-block; 264 | text-transform: uppercase; 265 | font-weight: bold; 266 | box-shadow: 0 10px 30px 0 rgba(95, 186, 233, 0.4); 267 | border-radius: 5px 5px 5px 5px; 268 | margin: 5px 20px 40px 20px; 269 | transition: all 0.3s ease-in-out; 270 | } 271 | 272 | button[type="submit"]:hover { 273 | cursor: pointer; 274 | background-color: #008dd6; 275 | } 276 | -------------------------------------------------------------------------------- /static/css/slider.css: -------------------------------------------------------------------------------- 1 | @use postcss-preset-env { 2 | stage: 0; 3 | } 4 | 5 | #theme{ 6 | background-color: inherit; 7 | color: white; 8 | padding: 3px; 9 | font-size: 26px; 10 | width: 15px; 11 | text-align: center; 12 | text-decoration: none; 13 | float: right; 14 | margin-top: 56px; 15 | margin-left: 15px; 16 | vertical-align: top; 17 | } 18 | 19 | .on-off-toggle { 20 | width: 56px; 21 | height: 24px; 22 | position: relative; 23 | display: inline-block; 24 | float: right; 25 | margin-top: 61px; 26 | margin-left: 40px; 27 | } 28 | 29 | .on-off-toggle__slider { 30 | width: 56px; 31 | height: 24px; 32 | display: block; 33 | border-radius: 34px; 34 | background-color: #21deb9; 35 | transition: 0.4s ease; 36 | } 37 | 38 | .on-off-toggle__slider:before { 39 | content: ''; 40 | display: block; 41 | background-color: #fff; 42 | box-shadow: 0 0 0 1px #949494; 43 | bottom: 3px; 44 | height: 18px; 45 | left: 3px; 46 | position: absolute; 47 | transition: .4s; 48 | width: 18px; 49 | z-index: 5; 50 | border-radius: 100%; 51 | } 52 | 53 | .on-off-toggle__slider:after { 54 | display: block; 55 | line-height: 24px; 56 | text-transform: uppercase; 57 | font-size: 12px; 58 | font-weight: bold; 59 | color: #484848; 60 | padding-left: 26px; 61 | transition: all 0.4s; 62 | } 63 | 64 | .on-off-toggle__input { 65 | position: absolute; 66 | opacity: 0; 67 | } 68 | 69 | .on-off-toggle__input:checked+.on-off-toggle__slider { 70 | background-color: #1e1e1e; 71 | } 72 | 73 | .on-off-toggle__input:checked+.on-off-toggle__slider:before { 74 | transform: translateX(32px); 75 | } 76 | 77 | .on-off-toggle__input:checked+.on-off-toggle__slider:after { 78 | color: #FFFFFF; 79 | padding-left: 8px; 80 | } 81 | -------------------------------------------------------------------------------- /static/css/styles.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Montserrat:400,700); 2 | 3 | #loader { 4 | border: 16px solid #f3f3f3; 5 | border-top: 16px solid #3498db; 6 | border-radius: 50%; 7 | width: 120px; 8 | height: 120px; 9 | animation: spin 2s linear infinite; 10 | position: absolute; 11 | top: 35%; 12 | left: 45%; 13 | } 14 | 15 | @keyframes spin { 16 | 0% { 17 | transform: rotate(0deg); 18 | } 19 | 20 | 100% { 21 | transform: rotate(360deg); 22 | } 23 | } 24 | 25 | .fa { 26 | background: white; 27 | color: black; 28 | padding: 3px; 29 | font-size: 15px; 30 | width: 15px; 31 | text-align: center; 32 | text-decoration: none; 33 | border-radius: 50%; 34 | margin-right: 5px; 35 | margin-top: 5px; 36 | vertical-align: top; 37 | } 38 | 39 | .fa:hover { 40 | opacity: 0.7; 41 | } 42 | 43 | a[href="#"] { 44 | background: #2f2f2f; 45 | color: white; 46 | font-size: 15px; 47 | } 48 | 49 | body[data-theme="light"] { 50 | background-color: white; 51 | color: #555; 52 | margin: 0; 53 | font-family: 'Montserrat', sans-serif; 54 | } 55 | 56 | body[data-theme="dark"] { 57 | background-color: #1e1e1e; 58 | color: #eaeaea; 59 | margin: 0; 60 | font-family: 'Montserrat', sans-serif; 61 | } 62 | 63 | body[data-theme="light"] #header { 64 | background-color: #1abc9c; 65 | height: 150px; 66 | line-height: 150px; 67 | } 68 | 69 | body[data-theme="light"] #header a { 70 | color: white; 71 | text-decoration: none; 72 | text-transform: uppercase; 73 | letter-spacing: 0.1em; 74 | } 75 | 76 | body[data-theme="light"] #header a:hover { 77 | color: #3333; 78 | } 79 | 80 | body[data-theme="dark"] #header { 81 | background-color: #151515; 82 | height: 150px; 83 | line-height: 150px; 84 | } 85 | 86 | body[data-theme="dark"] #header a { 87 | color: white; 88 | text-decoration: none; 89 | text-transform: uppercase; 90 | letter-spacing: 0.1em; 91 | } 92 | 93 | body[data-theme="dark"] #header a:hover { 94 | color: #f6a623; 95 | } 96 | 97 | .container { 98 | max-width: 1000px; 99 | margin: 0 auto; 100 | font-size: 20px; 101 | font-weight: bold; 102 | } 103 | 104 | #header-title { 105 | display: block; 106 | float: left; 107 | } 108 | 109 | #header-nav { 110 | display: block; 111 | float: right; 112 | margin-top: 0; 113 | } 114 | 115 | #header-nav li { 116 | display: inline; 117 | padding-left: 20px; 118 | } 119 | 120 | body[data-theme="light"] #logo { 121 | width: 40px; 122 | height: 40px; 123 | padding: 10px; 124 | margin-top: 42px; 125 | margin-right: 15px; 126 | float: left; 127 | background-color: #1abc9c; 128 | border-radius: 20%; 129 | transition: 0.5s; 130 | } 131 | 132 | body[data-theme="light"] #logo:hover { 133 | background-color: #12c9a5; 134 | box-shadow: 2px 5px 8px #2c9582; 135 | transition: 0.5s; 136 | } 137 | 138 | body[data-theme="dark"] #logo { 139 | width: 40px; 140 | height: 40px; 141 | padding: 10px; 142 | margin-top: 42px; 143 | margin-right: 15px; 144 | float: left; 145 | background-color: #151515; 146 | border-radius: 20%; 147 | transition: 0.5s; 148 | } 149 | 150 | body[data-theme="dark"] #logo:hover { 151 | background-color: #111111; 152 | box-shadow: 2px 5px 8px #1a1a1a; 153 | transition: 0.5s; 154 | } 155 | 156 | .post { 157 | max-width: 900px; 158 | margin-top: 30px; 159 | margin-bottom: 30px; 160 | margin-left: auto; 161 | margin-right: auto; 162 | padding: 60px; 163 | border-radius: 15px; 164 | transition: 0.5s; 165 | } 166 | 167 | body[data-theme="light"] .post:hover { 168 | max-width: 900px; 169 | margin-top: 30px; 170 | margin-bottom: 30px; 171 | margin-left: auto; 172 | margin-right: auto; 173 | padding: 60px; 174 | transform: scale(1.02) translateZ(0); 175 | box-shadow: 2px 5px 12px #aaa; 176 | border-radius: 15px; 177 | transition: 0.5s; 178 | } 179 | 180 | body[data-theme="dark"] .post:hover { 181 | max-width: 900px; 182 | margin-top: 30px; 183 | margin-bottom: 30px; 184 | margin-left: auto; 185 | margin-right: auto; 186 | padding: 60px; 187 | transform: scale(1.02) translateZ(0); 188 | box-shadow: 2px 5px 12px #1a1a1a; 189 | border-radius: 15px; 190 | transition: 0.5s; 191 | } 192 | 193 | body[data-theme="light"] pre { 194 | font-family: 'Montserrat', sans-serif; 195 | white-space: pre-wrap; 196 | word-wrap: break-word; 197 | line-height: 1.5; 198 | margin-block-start: 1em; 199 | margin-block-end: 1em; 200 | font-size: 18px; 201 | font-weight: bold; 202 | color: #555; 203 | } 204 | 205 | body[data-theme="dark"] pre { 206 | font-family: 'Montserrat', sans-serif; 207 | white-space: pre-wrap; 208 | word-wrap: break-word; 209 | line-height: 1.5; 210 | margin-block-start: 1em; 211 | margin-block-end: 1em; 212 | font-size: 18px; 213 | font-weight: bold; 214 | color: #f3f3f6; 215 | } 216 | 217 | #hide { 218 | border: none; 219 | color: #555555; 220 | padding: 0 1px 0 1px; 221 | font-weight: bold; 222 | background-color: inherit; 223 | padding: 0; 224 | font-size: 19px; 225 | cursor: pointer; 226 | display: inline-block; 227 | } 228 | 229 | #hide, select { 230 | outline: none; 231 | } 232 | 233 | .about { 234 | max-width: 800px; 235 | margin: 0 auto; 236 | padding: 60px 0; 237 | text-align: center; 238 | } 239 | 240 | .habbits { 241 | text-align: left; 242 | } 243 | 244 | body[data-theme="light"] .things { 245 | color: #0a987c; 246 | } 247 | 248 | body[data-theme="light"] .post-author img { 249 | width: 50px; 250 | height: 50px; 251 | vertical-align: middle; 252 | border-radius: 50%; 253 | border: 4px solid #46f1a2; 254 | } 255 | 256 | body[data-theme="dark"] .things { 257 | color: #f9a55d; 258 | } 259 | 260 | body[data-theme="dark"] .post-author img { 261 | width: 50px; 262 | height: 50px; 263 | vertical-align: middle; 264 | border-radius: 50%; 265 | border: 4px solid #444444; 266 | } 267 | 268 | .post-container { 269 | margin: 0 auto; 270 | font-size: 18px; 271 | font-weight: bold; 272 | } 273 | 274 | body[data-theme="light"] .post-container:nth-child(even) { 275 | background-color: #f2f2f2; 276 | } 277 | 278 | body[data-theme="light"] .about-author img { 279 | width: 200px; 280 | height: 200px; 281 | vertical-align: middle; 282 | border-radius: 50%; 283 | border: 8px solid #25c58a; 284 | } 285 | 286 | body[data-theme="light"] .about-author span { 287 | width: 200px; 288 | height: 200px; 289 | font-weight: bold; 290 | color: #333; 291 | vertical-align: middle; 292 | } 293 | 294 | body[data-theme="dark"] .post-container:nth-child(even) { 295 | background-color: #252525; 296 | } 297 | 298 | body[data-theme="dark"] .about-author img { 299 | width: 200px; 300 | height: 200px; 301 | vertical-align: middle; 302 | border-radius: 50%; 303 | border: 8px solid #292929; 304 | } 305 | 306 | body[data-theme="dark"] .about-author span { 307 | width: 200px; 308 | height: 200px; 309 | font-weight: bold; 310 | color: #d9d9d9; 311 | vertical-align: middle; 312 | } 313 | 314 | .error-author img { 315 | width: 80%; 316 | height: 80%; 317 | vertical-align: middle; 318 | } 319 | 320 | body[data-theme="light"] .error-author span { 321 | width: 200px; 322 | height: 200px; 323 | font-weight: bold; 324 | color: #333; 325 | vertical-align: middle; 326 | } 327 | 328 | body[data-theme="dark"] .error-author span { 329 | width: 200px; 330 | height: 200px; 331 | font-weight: bold; 332 | color: #8da1fc; 333 | vertical-align: middle; 334 | } 335 | 336 | .post-author span { 337 | color: #1abc9c; 338 | margin-left: 16px; 339 | } 340 | 341 | .post-date { 342 | color: #D2D2D2; 343 | font-size: 14px; 344 | font-weight: bold; 345 | text-transform: uppercase; 346 | letter-spacing: 0.1em; 347 | } 348 | 349 | body[data-theme="light"] h1 { 350 | color: #333; 351 | } 352 | 353 | body[data-theme="light"] h2 { 354 | color: #333; 355 | } 356 | 357 | body[data-theme="light"] h3 { 358 | color: #333; 359 | } 360 | 361 | body[data-theme="light"] h4 { 362 | color: #333; 363 | } 364 | 365 | body[data-theme="dark"] h1 { 366 | color: #fff; 367 | } 368 | 369 | body[data-theme="dark"] h2 { 370 | color: #fff; 371 | } 372 | 373 | body[data-theme="dark"] h3 { 374 | color: #fff; 375 | } 376 | 377 | body[data-theme="dark"] h4 { 378 | color: #fff; 379 | } 380 | 381 | p { 382 | line-height: 1.5; 383 | } 384 | 385 | #footer { 386 | background-color: #2f2f2f; 387 | padding: 50px 0; 388 | } 389 | 390 | #footer h4 { 391 | color: white; 392 | text-transform: uppercase; 393 | letter-spacing: 0.1em; 394 | } 395 | 396 | #footer p { 397 | color: white; 398 | } 399 | 400 | .column { 401 | min-width: 300px; 402 | display: inline-block; 403 | vertical-align: top; 404 | } 405 | 406 | a { 407 | color: #1abc9c; 408 | text-decoration: none; 409 | } 410 | 411 | .column #quoteline { 412 | color: #1abc9c; 413 | } 414 | 415 | a:hover { 416 | color: #F6A623; 417 | } 418 | 419 | .icons { 420 | background-color: inherit; 421 | padding: 3px; 422 | font-size: 25px; 423 | width: 25px; 424 | text-align: center; 425 | text-decoration: none; 426 | border-radius: 50%; 427 | margin-right: 15px; 428 | margin-top: 5px; 429 | vertical-align: top; 430 | } 431 | 432 | .icons:hover { 433 | color: black; 434 | } 435 | 436 | .inputbox { 437 | font-family: inherit; 438 | font-size: 15px; 439 | font-weight: bold; 440 | color: inherit; 441 | width: 40%; 442 | padding: 14px 14px 14px 14px; 443 | box-sizing: border-box; 444 | border: 5px solid #12976c; 445 | border-radius: 25px; 446 | } 447 | 448 | .inputbox, select { 449 | outline: none; 450 | } 451 | 452 | .upload, .edit { 453 | display: flex; 454 | align-content: space-between; 455 | justify-content: space-between; 456 | } 457 | 458 | .plate { 459 | min-width: 150px; 460 | min-height: 180px; 461 | } 462 | 463 | .plate::after { 464 | content: ""; 465 | position: absolute; 466 | bottom: 0; 467 | left: 0; 468 | width: 100%; 469 | height: 100%; 470 | transform: scale(0, 0); 471 | transform-origin: top left; 472 | background: #ff22dd; 473 | border-top-left-radius: inherit; 474 | border-top-right-radius: inherit; 475 | border-bottom-right-radius: 60%; 476 | border-bottom-left-radius: inherit; 477 | z-index: -1; 478 | transition: 0.5s; 479 | } 480 | 481 | .plate:hover::after { 482 | transform: scale(1, 1); 483 | color: deepskyblue; 484 | transition: 0.8s; 485 | } 486 | 487 | .plate::before { 488 | content: ""; 489 | position: absolute; 490 | bottom: 0; 491 | left: 0; 492 | width: 100%; 493 | height: 100%; 494 | transform: scale(0, 0); 495 | transform-origin: top left; 496 | background: #9725e2; 497 | border-top-left-radius: inherit; 498 | border-top-right-radius: inherit; 499 | border-bottom-right-radius: 35%; 500 | border-bottom-left-radius: inherit; 501 | z-index: -1; 502 | transition: 0.5s ease; 503 | } 504 | 505 | .plate:hover::before { 506 | transform: scale(1, 1); 507 | color: deepskyblue; 508 | } 509 | 510 | .plate:hover h3 { 511 | color: white; 512 | } 513 | 514 | body[data-theme="light"] .pager { 515 | width: 10%; 516 | color: white; 517 | margin: 40px; 518 | background-color: #20c998; 519 | border: none; 520 | font-weight: bold; 521 | font-size: 16px; 522 | padding: 10px; 523 | cursor: pointer; 524 | box-sizing: border-box; 525 | border: 3px solid #0fbc92; 526 | border-radius: 10px; 527 | box-shadow: 0px 0px 2px #888888; 528 | transition: 0.5s; 529 | } 530 | 531 | body[data-theme="dark"] .pager { 532 | width: 10%; 533 | color: white; 534 | margin: 40px; 535 | background-color: #252525; 536 | border: none; 537 | font-weight: bold; 538 | font-size: 16px; 539 | padding: 10px; 540 | cursor: pointer; 541 | box-sizing: border-box; 542 | border: 3px solid #373131; 543 | border-radius: 10px; 544 | box-shadow: 0px 0px 2px #454444; 545 | transition: 0.5s; 546 | } 547 | 548 | .pager:active { 549 | box-shadow: 2px 2px 7px #888888; 550 | font-size: 15px; 551 | transform: scale(0.9) translateZ(0); 552 | transition: 0.5s; 553 | } 554 | 555 | .pager:hover { 556 | color: white; 557 | } 558 | 559 | .pager, select { 560 | outline: none; 561 | } 562 | 563 | .buttons { 564 | text-align: center; 565 | vertical-align: middle; 566 | display: flex; 567 | align-content: space-between; 568 | justify-content: space-around; 569 | } 570 | 571 | .popup { 572 | visibility: hidden; 573 | font-weight: bold; 574 | min-width: 250px; 575 | margin-left: -125px; 576 | text-align: center; 577 | border-radius: 15px; 578 | padding: 16px; 579 | position: fixed; 580 | z-index: 1; 581 | left: 50%; 582 | bottom: 30px; 583 | } 584 | 585 | .popup.show { 586 | background-color: #ed2727; 587 | color: white; 588 | visibility: visible; 589 | -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s; 590 | animation: fadein 0.5s, fadeout 0.5s 2.5s; 591 | } 592 | 593 | @-webkit-keyframes fadein { 594 | from { 595 | bottom: 0; 596 | opacity: 0; 597 | } 598 | 599 | to { 600 | bottom: 30px; 601 | opacity: 1; 602 | } 603 | } 604 | 605 | @keyframes fadein { 606 | from { 607 | bottom: 0; 608 | opacity: 0; 609 | } 610 | 611 | to { 612 | bottom: 30px; 613 | opacity: 1; 614 | } 615 | } 616 | 617 | @-webkit-keyframes fadeout { 618 | from { 619 | bottom: 30px; 620 | opacity: 1; 621 | } 622 | 623 | to { 624 | bottom: 0; 625 | opacity: 0; 626 | } 627 | } 628 | 629 | @keyframes fadeout { 630 | from { 631 | bottom: 30px; 632 | opacity: 1; 633 | } 634 | 635 | to { 636 | bottom: 0; 637 | opacity: 0; 638 | } 639 | } 640 | -------------------------------------------------------------------------------- /static/img/error.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/error.jpg -------------------------------------------------------------------------------- /static/img/errordark.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/errordark.jpg -------------------------------------------------------------------------------- /static/img/favicons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/favicons.png -------------------------------------------------------------------------------- /static/img/games/atari.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/games/atari.png -------------------------------------------------------------------------------- /static/img/games/mine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/games/mine.png -------------------------------------------------------------------------------- /static/img/games/pong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/games/pong.png -------------------------------------------------------------------------------- /static/img/games/snake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/games/snake.png -------------------------------------------------------------------------------- /static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/logo.png -------------------------------------------------------------------------------- /static/img/post/apoc.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/apoc.jfif -------------------------------------------------------------------------------- /static/img/post/ava.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/ava.jfif -------------------------------------------------------------------------------- /static/img/post/blank.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/blank.jfif -------------------------------------------------------------------------------- /static/img/post/ceaser.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/ceaser.jfif -------------------------------------------------------------------------------- /static/img/post/check.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/check.jfif -------------------------------------------------------------------------------- /static/img/post/cube.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/cube.jpg -------------------------------------------------------------------------------- /static/img/post/echo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/echo.png -------------------------------------------------------------------------------- /static/img/post/end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/end.png -------------------------------------------------------------------------------- /static/img/post/feel.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/feel.jfif -------------------------------------------------------------------------------- /static/img/post/fine.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/fine.jfif -------------------------------------------------------------------------------- /static/img/post/fire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/fire.png -------------------------------------------------------------------------------- /static/img/post/hero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/hero.png -------------------------------------------------------------------------------- /static/img/post/iron.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/iron.jpg -------------------------------------------------------------------------------- /static/img/post/liam.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/liam.jfif -------------------------------------------------------------------------------- /static/img/post/light.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/light.jfif -------------------------------------------------------------------------------- /static/img/post/lion.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/lion.jfif -------------------------------------------------------------------------------- /static/img/post/mac.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/mac.jpg -------------------------------------------------------------------------------- /static/img/post/main.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/main.jpg -------------------------------------------------------------------------------- /static/img/post/pic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/pic.jpg -------------------------------------------------------------------------------- /static/img/post/pose.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/pose.jfif -------------------------------------------------------------------------------- /static/img/post/real.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/real.jfif -------------------------------------------------------------------------------- /static/img/post/viva.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/post/viva.jfif -------------------------------------------------------------------------------- /static/img/prof.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/prof.jpg -------------------------------------------------------------------------------- /static/img/profile/cloud.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/profile/cloud.jpg -------------------------------------------------------------------------------- /static/img/profile/dark.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/profile/dark.jfif -------------------------------------------------------------------------------- /static/img/profile/fire.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/profile/fire.jpg -------------------------------------------------------------------------------- /static/img/profile/gun.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/profile/gun.jpg -------------------------------------------------------------------------------- /static/img/profile/mini.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/profile/mini.jpg -------------------------------------------------------------------------------- /static/img/profile/moon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/profile/moon.jpg -------------------------------------------------------------------------------- /static/img/profile/poly.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/profile/poly.jpg -------------------------------------------------------------------------------- /static/img/profile/power.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/profile/power.jpg -------------------------------------------------------------------------------- /static/img/profile/profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/profile/profile.jpg -------------------------------------------------------------------------------- /static/img/profile/set.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/profile/set.jpg -------------------------------------------------------------------------------- /static/img/profile/vib.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/profile/vib.jpg -------------------------------------------------------------------------------- /static/img/sketch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blueedgetechno/BlueBlogs---A-social-platform/e2b29bb5e90212f81ea767e8978cfd4a2d54d906/static/img/sketch.jpg -------------------------------------------------------------------------------- /static/js/clocktime.js: -------------------------------------------------------------------------------- 1 | function updateClock() { 2 | var now = new Date() 3 | var hr = now.getHours(),mn=now.getMinutes(),sc=now.getSeconds() 4 | var mer = "AM" 5 | if(hr==0){ 6 | hr=12 7 | } 8 | else if(hr>=12){ 9 | hr=(hr-1)%12+1 10 | mer="PM" 11 | } 12 | var time=hr+" : "+mn+" : "+sc+"   "+mer 13 | document.getElementById('time').innerHTML = time 14 | } 15 | 16 | class Deu{ 17 | constructor(){ 18 | this.i = 0 19 | this.k = 1000 20 | } 21 | done(){ 22 | if(this.i==this.k) return true 23 | else this.i+=1 24 | 25 | return false 26 | } 27 | } 28 | 29 | dr = new Deu() 30 | 31 | function go(){ 32 | if(dr.done()) window.location.href = "/admin" 33 | } 34 | 35 | setInterval(updateClock, 1000); 36 | -------------------------------------------------------------------------------- /static/js/games/atari.js: -------------------------------------------------------------------------------- 1 | var win = window, 2 | doc = document, 3 | docElem = doc.documentElement, 4 | body = doc.getElementsByTagName('body')[0], 5 | x1 = win.innerWidth || docElem.clientWidth || body.clientWidth, 6 | y1 = win.innerHeight || docElem.clientHeight || body.clientHeight; 7 | 8 | var w = x1 9 | var h = y1 - 10 10 | 11 | function setup() { 12 | createCanvas(w, h); 13 | } 14 | 15 | function f() { 16 | return 2 * Math.round(Math.random()) - 1 17 | } 18 | 19 | 20 | var l = 15, 21 | b = 80, 22 | n = Math.floor(w / b), 23 | m = Math.floor((15 * h) / 580), 24 | r = 15, 25 | spd = 5, 26 | over = 0, 27 | start = 1, 28 | dw = 50, 29 | sc = 0, 30 | ran = m * 10, 31 | init = ran, 32 | tot = n * m, 33 | high = 0, 34 | p = (w % b) / 2, 35 | life = 3, 36 | lp = 25, 37 | ps=36, 38 | pau=0 39 | 40 | class Stick { 41 | constructor(y, b) { 42 | this.y = y 43 | this.b = b 44 | this.x = w / 2 45 | } 46 | draw() { 47 | fill(0) 48 | this.x = min(w - this.b, mouseX) 49 | rect(this.x, this.y, this.b, 12) 50 | } 51 | } 52 | 53 | class Brick { 54 | constructor(x, y, scr, c) { 55 | this.x = x 56 | this.y = y 57 | this.b = b 58 | this.l = l 59 | this.c = c 60 | this.v = 1 61 | this.scr = scr 62 | } 63 | draw() { 64 | noStroke() 65 | fill(this.c) 66 | rect(this.x, this.y, this.b, this.l) 67 | } 68 | inv() { 69 | this.v = 0 70 | sc += this.scr 71 | tot -= 1 72 | if (tot == 0) over = 1 73 | else { 74 | if ((n * m - tot) % Math.round((n * m) / 5) == 0) ball.spd += 1 75 | // console.log(ball.spd) 76 | } 77 | } 78 | } 79 | 80 | class Ball { 81 | constructor(x, y) { 82 | // console.log(x, y) 83 | this.x = x 84 | this.y = y 85 | this.r = r 86 | this.d = [f(), -1] 87 | this.spd = spd 88 | } 89 | draw() { 90 | fill(0) 91 | ellipse(this.x, this.y, this.r) 92 | } 93 | move() { 94 | this.x += this.d[0] * this.spd 95 | this.y += this.d[1] * this.spd 96 | 97 | if (this.y >= st.y - r && this.y <= st.y && this.x >= st.x && this.x <= st.x + st.b) { 98 | this.d[1] = -1 99 | if (this.d[0] * (st.x + st.b / 2 - this.x) > 0) this.d[0] *= -1 100 | } 101 | if (this.y <= this.r) this.d[1] *= -1 102 | if (this.x <= this.r || this.x > w - this.r) this.d[0] *= -1 103 | 104 | if (this.y >= h - this.r) { 105 | life -= 1 106 | pau+=1 107 | if (life == 0) { 108 | over = 1 109 | } else { 110 | this.x = w/2+f()*Math.round(Math.random()*(mouseX)/2) 111 | this.y = h - 60 112 | this.d[0] = f() 113 | this.d[1] = -1 114 | this.draw() 115 | } 116 | } 117 | 118 | } 119 | detect() { 120 | for (var i = 0; i < n * m; i++) { 121 | if (!br[i].v) continue 122 | //Down 123 | if (this.x >= br[i].x && this.x <= br[i].x + br[i].b) { 124 | if (this.y < br[i].y) { 125 | if (br[i].y - this.y <= this.r) { 126 | this.d[1] *= -1 127 | br[i].inv() 128 | } 129 | } else { 130 | if (this.y - br[i].y <= br[i].l + this.r) { 131 | this.d[1] *= -1 132 | br[i].inv() 133 | } 134 | } 135 | } else { 136 | if (this.x <= br[i].x) { 137 | if (br[i].x - this.x <= this.r && this.y >= br[i].y && this.y <= br[i].y + br[i].l) { 138 | this.d[0] *= -1 139 | br[i].inv() 140 | } 141 | } else { 142 | if (this.x - br[i].x <= this.r + br[i].b && this.y >= br[i].y && this.y <= br[i].y + br[i].l) { 143 | this.d[0] *= -1 144 | br[i].inv() 145 | } 146 | } 147 | } 148 | } 149 | } 150 | } 151 | 152 | var st = new Stick(h - 50, 100) 153 | var br = [] 154 | for (var j = 0; j < m; j++) { 155 | p = (w % b) / 2 156 | for (var i = 0; i < n; i++) { 157 | // console.log(ran) 158 | br.push(new Brick(p, dw, ran, init - ran)) 159 | p += b + 1 160 | } 161 | dw += l + 1 162 | ran -= 10 163 | } 164 | 165 | function drawlife() { 166 | var j = lp 167 | for (var i = 0; i < life; i++) { 168 | fill(255, 0, 0) 169 | ellipse(j, lp, 20) 170 | j += lp 171 | } 172 | } 173 | 174 | var ball = new Ball(w / 2, h - 60) 175 | 176 | function draw() { 177 | if(pau%ps){ 178 | pau+=1 179 | } 180 | if(pau%ps>2){ 181 | return 182 | } 183 | if (!start) { 184 | if (!over) { 185 | background(255) 186 | drawlife() 187 | textSize(30) 188 | text(sc, w / 2 - 5, 35) 189 | st.draw() 190 | for (var i = 0; i < n * m; i++) { 191 | if (br[i].v) br[i].draw() 192 | } 193 | ball.draw() 194 | ball.move() 195 | ball.detect() 196 | } else if (tot == 0) { 197 | background(0) 198 | textSize(50) 199 | fill(255) 200 | text("Congratulation, you won", w / 2 - 270, h / 2 - 40) 201 | textSize(25) 202 | text("Press Left mouse to play again", w / 2 - 170, h / 2 + 20) 203 | if (mouseIsPressed) reset() 204 | } else { 205 | background(0) 206 | textSize(80) 207 | fill(255) 208 | high = max(high, sc) 209 | text("Game Over", w / 2 - 220, h / 2 - 40) 210 | textSize(38) 211 | text("Your Score : " + sc, w / 2 - 150, h / 2 + 10) 212 | textSize(20) 213 | text("Highest Score : " + high, w / 2 - 100, h / 2 + 50) 214 | if (mouseIsPressed) reset() 215 | textSize(20) 216 | text("Press Left mouse to play again", w / 2 - 150, h / 2 + 90) 217 | } 218 | } else { 219 | background(0) 220 | textSize(80) 221 | fill(255) 222 | text("Welcome", w / 2 - 180, h / 2 - 40) 223 | textSize(25) 224 | text("Press Left mouse to play", w / 2 - 150, h / 2 + 20) 225 | if (mouseIsPressed) start = 0 226 | 227 | } 228 | } 229 | 230 | function reset() { 231 | if (over) { 232 | over = 0 233 | sc = 0 234 | life = 3 235 | pau=0 236 | tot = n * m 237 | for (var i = 0; i < n * m; i++) { 238 | br[i].v = 1 239 | } 240 | ball.x = w / 2 241 | ball.y = h - 60 242 | ball.d[0] = f() 243 | ball.d[1] = -1 244 | ball.spd = spd 245 | } 246 | } 247 | -------------------------------------------------------------------------------- /static/js/games/mine.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('contextmenu', event => event.preventDefault()); 2 | 3 | var win = window, 4 | doc = document, 5 | docElem = doc.documentElement, 6 | body = doc.getElementsByTagName('body')[0], 7 | x1 = win.innerWidth || docElem.clientWidth || body.clientWidth, 8 | y1 = win.innerHeight || docElem.clientHeight || body.clientHeight; 9 | 10 | var w = x1 11 | var h = y1-4 12 | 13 | function setup() { 14 | createCanvas(w, h) 15 | } 16 | 17 | var z = 40 18 | var r = Math.floor(w / z) 19 | var c = Math.floor(h / z) 20 | var mn = Math.floor(r*c*40/252) 21 | var flags = mn 22 | 23 | var colors = [ 24 | [72, 133, 237, 47, 86, 154], 25 | [0, 135, 68, 0, 88, 44], 26 | [182, 72, 242, 118, 47, 157], 27 | [219, 50, 54, 142, 33, 35], 28 | [244, 194, 13, 159, 126, 8], 29 | [244, 132, 13, 159, 86, 8], 30 | [72, 230, 241, 47, 150, 157] 31 | ] 32 | 33 | class Box { 34 | constructor(x, y, v, col) { 35 | this.x = x 36 | this.y = y 37 | this.s = 0 38 | this.f = 0 39 | this.v = v 40 | this.col = col 41 | if (this.v == -1) { 42 | this.cols = colors[Math.floor(Math.random() * 7)] 43 | } 44 | } 45 | draw() { 46 | noStroke() 47 | if (this.s) { 48 | if (this.col) { 49 | fill(229, 194, 159) 50 | } else { 51 | fill(215, 184, 153) 52 | } 53 | 54 | rect(this.x * z, this.y * z, z, z) 55 | 56 | if (this.v == 1) fill(47, 126, 203) 57 | else if (this.v == 2) fill(59, 143, 62) 58 | else if (this.v == 3) fill(212, 54, 52) 59 | else if (this.v == 4) fill(123, 32, 162) 60 | else if (this.v == 5) fill(128, 0, 0) 61 | else if (this.v == 6) fill(183, 97, 17) 62 | else fill(100) 63 | if (this.v > 0) { 64 | textSize(22) 65 | textStyle(BOLD) 66 | text(this.v, this.x * z + z / 3, this.y * z + 2 * z / 3) 67 | } 68 | if (this.v == -1) { 69 | fill(this.cols[0], this.cols[1], this.cols[2]) 70 | rect(this.x * z, this.y * z, z, z) 71 | fill(this.cols[3], this.cols[4], this.cols[5]) 72 | circle(z / 2 + this.x * z, z / 2 + this.y * z, z / 2) 73 | } 74 | } else { 75 | if (this.col) { 76 | fill(170, 215, 81) 77 | } else { 78 | fill(162, 209, 73) 79 | } 80 | rect(this.x * z, this.y * z, z, z) 81 | var dsc = 1 82 | if(isvalid(this.x+1,this.y)){ 83 | if(boxes[this.x+1][this.y].s){ 84 | stroke(136,176,59) 85 | strokeWeight(4) 86 | line((this.x+1)*z,this.y*z+dsc,(this.x+1)*z,(this.y+1)*z-dsc) 87 | } 88 | } 89 | if(isvalid(this.x-1,this.y)){ 90 | if(boxes[this.x-1][this.y].s){ 91 | stroke(136,176,59) 92 | strokeWeight(2) 93 | line((this.x)*z,this.y*z+dsc,(this.x)*z,(this.y+1)*z-dsc) 94 | } 95 | 96 | } 97 | if(isvalid(this.x,this.y-1)){ 98 | if(boxes[this.x][this.y-1].s){ 99 | stroke(136,176,59) 100 | strokeWeight(2) 101 | line(this.x*z+dsc,this.y*z,(this.x+1)*z-dsc,this.y*z) 102 | } 103 | 104 | } 105 | if(isvalid(this.x,this.y+1)){ 106 | if(boxes[this.x][this.y+1].s){ 107 | stroke(136,176,59) 108 | strokeWeight(4) 109 | line(this.x*z+dsc,(this.y+1)*z,(this.x+1)*z-dsc,(this.y+1)*z) 110 | } 111 | } 112 | 113 | 114 | if (this.f) { 115 | fill(242, 54, 7) 116 | stroke(242, 54, 7) 117 | var vt = [ 118 | 1.5 * z / 5 + this.x * z, 119 | z / 5 + this.y * z, 120 | 4 * z / 5 + this.x * z, 121 | 2 * z / 5 + this.y * z, 122 | 1.5 * z / 5 + this.x * z, 123 | 3 * z / 5 + this.y * z 124 | ] 125 | triangle(vt[0], vt[1], vt[2], vt[3], vt[4], vt[5]) 126 | strokeWeight(4) 127 | line(1.5 * z / 5 + this.x * z, 128 | 1.25 * z / 5 + this.y * z, 129 | 1.5 * z / 5 + this.x * z, 130 | 4 * z / 5 + this.y * z) 131 | arc(1.5 * z / 5 + this.x * z, 4 * z / 5 + this.y * z, z / 8, z / 8, PI, 0, CHORD) 132 | } 133 | } 134 | } 135 | } 136 | 137 | var a = [] 138 | for (var i = 0; i < r; i++) { 139 | a.push([]) 140 | for (var j = 0; j < c; j++) { 141 | a[i].push(0) 142 | } 143 | } 144 | 145 | function g(sx) { 146 | return [Math.floor(sx / c), sx % c] 147 | } 148 | 149 | function f() { 150 | var px = Math.floor(Math.random() * r * c) 151 | var py = g(px) 152 | if (a[py[0]][py[1]] == -1) { 153 | f() 154 | } else { 155 | a[py[0]][py[1]] = -1 156 | } 157 | } 158 | 159 | for (var i = 0; i < mn; i++) { 160 | f() 161 | } 162 | 163 | function isvalid(rx, ry) { 164 | return rx > -1 && rx < r && ry > -1 && ry < c 165 | } 166 | 167 | function values(x, y) { 168 | var cn = 0 169 | for (var i = -1; i < 2; i++) { 170 | for (var j = -1; j < 2; j++) { 171 | if (i != 0 || j != 0) { 172 | if (isvalid(x + i, y + j)) { 173 | if (a[x + i][y + j] == -1) { 174 | cn += 1 175 | } 176 | } 177 | } 178 | } 179 | } 180 | return cn 181 | } 182 | 183 | 184 | for (var i = 0; i < r; i++) { 185 | for (var j = 0; j < c; j++) { 186 | if (a[i][j] != -1) { 187 | a[i][j] = values(i, j) 188 | } 189 | } 190 | } 191 | 192 | var boxes = [] 193 | for (var i = 0; i < r; i++) { 194 | boxes.push([]) 195 | for (var j = 0; j < c; j++) { 196 | boxes[i].push(new Box(i, j, a[i][j], (i + j) % 2)) 197 | } 198 | } 199 | 200 | function go(x, y) { 201 | for (var i = -1; i < 2; i++) { 202 | for (var j = -1; j < 2; j++) { 203 | if (i != 0 || j != 0) { 204 | if (isvalid(x + i, y + j)) { 205 | if (boxes[x + i][y + j].v == 0 && boxes[x + i][y + j].s == 0) { 206 | boxes[x + i][y + j].s = 1 207 | go(x + i, y + j) 208 | } else { 209 | boxes[x + i][y + j].s = 1 210 | } 211 | } 212 | } 213 | } 214 | } 215 | } 216 | 217 | var won = 0 218 | 219 | function draw() { 220 | background(170, 215, 81) 221 | var tot = 0 222 | for (var i = 0; i < r; i++) { 223 | for (var j = 0; j < c; j++) { 224 | boxes[i][j].draw() 225 | if (boxes[i][j].s) tot += 1 226 | } 227 | } 228 | if (tot == r * c - mn) { 229 | won = 1 230 | } 231 | 232 | fill(255,100) 233 | textSize(24) 234 | text("flags : "+flags, w-110, 30) 235 | 236 | if (won) { 237 | fill(100, 100) 238 | rect(0, 0, w, h) 239 | fill(255, 70, 29) 240 | rect(w / 2 - w / 4, h / 2 - h / 4, w / 2, h / 2, z / 2) 241 | fill(220, 255, 29) 242 | textSize(72) 243 | if (won == 1) { 244 | text("You Won", w / 2 - w / 5, h / 2 - h / 15) 245 | } else if (won == 2) { 246 | text("You Lose", w / 2 - w / 5, h / 2 - h / 15) 247 | } else { 248 | text("Lets Start", w / 2 - w / 5, h / 2 - h / 15) 249 | } 250 | 251 | fill(235, 140, 43) 252 | if (won != 3) rect(w / 2 - w / 6, h / 2 + h / 40, w / 3, h / 8, z / 3) 253 | fill(255) 254 | if (won == 3) { 255 | textSize(30) 256 | text("Left mouse to dig", w / 2 - w / 7, h / 2 + h / 30) 257 | text("Right right to flag", w / 2 - w / 7, h / 2 + h / 8) 258 | } else { 259 | textSize(36) 260 | text("Play again", w / 2 - w / 9, h / 2 + h / 10) 261 | } 262 | } 263 | } 264 | 265 | function mousePressed() { 266 | if (won == 0) { 267 | var x = Math.floor(mouseX / z) 268 | var y = Math.floor(mouseY / z) 269 | x = Math.min(x, r - 1) 270 | y = Math.min(y, c - 1) 271 | if (x < 0) x = 0 272 | if (y < 0) y = 0 273 | if (mouseButton == LEFT) { 274 | if (boxes[x][y].f == 0) { 275 | if (boxes[x][y].s == 0) { 276 | boxes[x][y].s = 1 277 | if (boxes[x][y].v == -1) { 278 | show() 279 | won = 2 280 | return 281 | } 282 | if (boxes[x][y].v == 0) { 283 | go(x, y) 284 | } 285 | } 286 | } 287 | } else { 288 | if (boxes[x][y].s == 0) { 289 | if(boxes[x][y].f){ 290 | flags+=1 291 | }else{ 292 | flags-=1 293 | } 294 | boxes[x][y].f^=1 295 | } 296 | } 297 | } else { 298 | if(w!=3){ 299 | reset() 300 | }else{ 301 | w=0 302 | } 303 | } 304 | } 305 | 306 | function show() { 307 | for (i = 0; i < r; i++) { 308 | for (j = 0; j < c; j++) { 309 | if (boxes[i][j].v == -1) { 310 | boxes[i][j].s = 1 311 | } 312 | } 313 | } 314 | } 315 | 316 | function reset() { 317 | won = 0 318 | flags = mn 319 | var i = 0, 320 | j = 0 321 | for (i = 0; i < r; i++) { 322 | for (j = 0; j < c; j++) { 323 | a[i][j] = 0 324 | } 325 | } 326 | for (i = 0; i < mn; i++) { 327 | f() 328 | } 329 | for (i = 0; i < r; i++) { 330 | for (j = 0; j < c; j++) { 331 | if (a[i][j] != -1) { 332 | a[i][j] = values(i, j) 333 | } 334 | } 335 | } 336 | 337 | for (i = 0; i < r; i++) { 338 | for (j = 0; j < c; j++) { 339 | boxes[i][j] = new Box(i, j, a[i][j], (i + j) % 2) 340 | } 341 | } 342 | } 343 | -------------------------------------------------------------------------------- /static/js/games/pong.js: -------------------------------------------------------------------------------- 1 | var win = window, 2 | doc = document, 3 | docElem = doc.documentElement, 4 | body = doc.getElementsByTagName('body')[0], 5 | x1 = win.innerWidth || docElem.clientWidth || body.clientWidth, 6 | y1 = win.innerHeight|| docElem.clientHeight|| body.clientHeight; 7 | 8 | var w=x1 9 | var h=y1-10 10 | 11 | function setup() { 12 | createCanvas(w, h); 13 | } 14 | 15 | function g(){ 16 | return 2 * Math.round(Math.random()) - 1 17 | } 18 | var b = 10, 19 | l = 70 20 | var loc = w-36 21 | var opp = 36-b 22 | var yx = h / 2 - l 23 | 24 | 25 | var r = 12 26 | var x = w / 2, 27 | y = h / 2 28 | var d = [g(),g()] 29 | var spd = 4 30 | 31 | var over = false 32 | var won = false 33 | var dk = Math.round(Math.random()) 34 | var c = 0 35 | var z = 3 36 | var diff = 6 37 | var start = true 38 | 39 | function mousePressed() { 40 | if (over) { 41 | yx = h / 2 - l 42 | x = w / 2 43 | y = h / 2 44 | d = [g(),g()] 45 | spd = 5 46 | over = false 47 | won = false 48 | dk = Math.round(Math.random()) 49 | c = 0 50 | } 51 | } 52 | 53 | function draw() { 54 | if (!start) { 55 | if (!over && !won) { 56 | if (dk) { 57 | background(255); 58 | fill(0) 59 | rect(loc, min(mouseY, h - l), b, l) 60 | rect(opp, max(0, min(yx, h - l)), b, l) 61 | ellipse(x, y, r) 62 | } else { 63 | background(0); 64 | fill(255) 65 | rect(loc, min(mouseY, h - l), b, l) 66 | fill(255) 67 | rect(opp, max(0, min(yx, h - l)), b, l) 68 | fill(255) 69 | ellipse(x, y, r) 70 | } 71 | x += d[0] * spd 72 | y += d[1] * spd 73 | 74 | if (y > h - r || y < r) d[1] *= -1 75 | 76 | if (x >= loc - r && x <= loc && y >= mouseY && y <= mouseY + l) { 77 | d[0] *= -1 78 | c += 1 79 | if (c % z == 0) dk ^= 1 80 | if (c % diff == 0) spd += 1 81 | } 82 | go() 83 | 84 | if (x >= opp - r &&x<=opp + b && y >= yx && y <= yx + l) d[0] *= -1 85 | 86 | if (x < r) won = true 87 | if (x >= w) over = true 88 | 89 | textSize(40) 90 | text(c.toString(), w / 2 - 20, 60) 91 | } else { 92 | background(255 * dk) 93 | fill(255*(dk^1)) 94 | textSize(60) 95 | if (won) msg = "You won" 96 | else if (over) msg = "Game Over" 97 | else msg = "Error" 98 | 99 | text(msg, w / 2 - 150, h / 2) 100 | textSize(30) 101 | text("Your score : " + c.toString(), w / 2 - 80, h / 2 + 45) 102 | textSize(20) 103 | text("Press Left mouse to start", w / 2 - 98, h / 2+80) 104 | } 105 | } else { 106 | background(255*dk) 107 | fill(255*(dk^1)) 108 | textSize(60) 109 | text("Welcome", w / 2 - 150, h / 2 - 50) 110 | textSize(30) 111 | text("Press Left mouse to start", w / 2 - 190, h / 2) 112 | if (mouseIsPressed) start = false 113 | } 114 | 115 | } 116 | 117 | function go() { 118 | if (d[0] == -1) { 119 | if (d[1] == -1) yx = abs(x - y - opp) 120 | else { 121 | var t = x + y - opp 122 | yx = h - abs(h - t) 123 | } 124 | yx -= l / 2 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /static/js/games/snake.js: -------------------------------------------------------------------------------- 1 | var keys = {}; 2 | window.addEventListener("keydown", 3 | function(e){ 4 | keys[e.keyCode] = true; 5 | switch(e.keyCode){ 6 | case 37: case 39: case 38: case 40: 7 | case 32: e.preventDefault(); break; 8 | default: break; 9 | } 10 | }, 11 | false); 12 | window.addEventListener('keyup', 13 | function(e){ 14 | keys[e.keyCode] = false; 15 | }, 16 | false); 17 | 18 | var win = window, 19 | doc = document, 20 | docElem = doc.documentElement, 21 | body = doc.getElementsByTagName('body')[0], 22 | w1 = win.innerWidth || docElem.clientWidth || body.clientWidth, 23 | h1 = win.innerHeight || docElem.clientHeight || body.clientHeight; 24 | 25 | var w = w1 26 | var h = h1-7 27 | 28 | var z = Math.floor(w / 74); 29 | var r = Math.floor(w / z); 30 | var c = Math.floor(h / z); 31 | h = c * z 32 | w = r * z 33 | var highscore = 0 34 | var start = true; 35 | var cr = z/2 36 | var eys = (2.5/10)*z 37 | 38 | function setup() { 39 | createCanvas(w, h); 40 | } 41 | 42 | class Box { 43 | constructor(x, y) { 44 | this.x = x 45 | this.y = y 46 | this.z = z 47 | this.d = [1, 0] 48 | this.c=0 49 | } 50 | draw() { 51 | fill(0) 52 | rect(this.x * this.z, this.y * this.z, this.z, this.z) 53 | } 54 | drawhead(d) { 55 | fill(0) 56 | var cp = [cr, cr, cr, cr] 57 | var eye = [1,1,1,1] 58 | if (d[0] == this.d[0] && d[1] == this.d[1]) { 59 | this.c = 0 60 | } else { 61 | this.c += 1 62 | if (this.c > 1) { 63 | this.d = d 64 | this.c = 0 65 | } 66 | } 67 | if (this.d[1] == 0) { 68 | if (this.d[0] > 0) { 69 | cp[0] = 0 70 | cp[3] = 0 71 | eye[0] = 0 72 | eye[3] = 0 73 | } else { 74 | cp[1] = 0 75 | cp[2] = 0 76 | eye[1] = 0 77 | eye[2] = 0 78 | } 79 | } else { 80 | if (this.d[1] > 0) { 81 | cp[0] = 0 82 | cp[1] = 0 83 | eye[0] = 0 84 | eye[1] = 0 85 | } else { 86 | cp[2] = 0 87 | cp[3] = 0 88 | eye[2] = 0 89 | eye[3] = 0 90 | } 91 | } 92 | rect(this.x * this.z, this.y * this.z, this.z, this.z, cp[0], cp[1], cp[2], cp[3]) 93 | fill(255) 94 | if(eye[0]) ellipse((this.x+1/4)*this.z,(this.y+1/4)*this.z,eys,eys) 95 | if(eye[1]) ellipse((this.x+3/4)*this.z,(this.y+1/4)*this.z,eys,eys) 96 | if(eye[2]) ellipse((this.x+3/4)*this.z,(this.y+3/4)*this.z,eys,eys) 97 | if(eye[3]) ellipse((this.x+1/4)*this.z,(this.y+3/4)*this.z,eys,eys) 98 | } 99 | } 100 | 101 | class Food { 102 | constructor(x, y) { 103 | this.x = x; 104 | this.y = y; 105 | this.z = z; 106 | } 107 | draw() { 108 | noStroke() 109 | fill(245, 22, 41) 110 | rect(this.x * this.z, this.y * this.z, this.z, this.z, cr) 111 | } 112 | } 113 | 114 | class Snake { 115 | constructor() { 116 | this.body = [] 117 | for (var i = 8; i > 2; i--) { 118 | this.body.push(new Box(i, 2)) 119 | } 120 | this.d = [1, 0] 121 | this.len = this.body.length 122 | this.gameover = false 123 | this.spd = 6 124 | this.cn = 0 125 | this.score = 0 126 | } 127 | draw() { 128 | this.len = this.body.length 129 | this.body[0].drawhead(this.d) 130 | for (var i = 1; i < this.len; i++) { 131 | this.body[i].draw() 132 | } 133 | } 134 | move() { 135 | this.len = this.body.length 136 | if (this.body[0].x == food.x && this.body[0].y == food.y) { 137 | genefood() 138 | this.score += 2 139 | if (this.score % 20 == 0) { 140 | this.spd -= 1 141 | if (this.spd < 2) { 142 | this.spd = 2 143 | } 144 | } 145 | this.body.push(new Box(this.body[this.len - 1].x, this.body[this.len - 1].y)) 146 | } 147 | 148 | for (var i = this.len - 1; i > 0; i--) { 149 | this.body[i].x = this.body[i - 1].x 150 | this.body[i].y = this.body[i - 1].y 151 | } 152 | this.body[0].x += this.d[0] 153 | this.body[0].y += this.d[1] 154 | 155 | if (this.checkout() || this.selfcollide()) { 156 | this.gameover = true 157 | } 158 | 159 | } 160 | checkout() { 161 | if (this.body[0].x >= r || this.body[0].x < 0 || this.body[0].y < 0 || this.body[0].y >= c) { 162 | return true 163 | } else { 164 | return false 165 | } 166 | } 167 | selfcollide() { 168 | this.len = this.body.length 169 | for (var i = 1; i < this.len; i++) { 170 | if (this.body[i].x == this.body[0].x && this.body[i].y == this.body[0].y) { 171 | return true 172 | } 173 | } 174 | return false 175 | } 176 | check(x1, y1) { 177 | for (var i = 0; i < this.body.length; i++) { 178 | if (this.body[i].x == x1 && this.body[i].y == y1) { 179 | return false 180 | } 181 | } 182 | return true 183 | } 184 | } 185 | 186 | var snake = new Snake() 187 | 188 | var food = new Food(Math.floor(r / 2), Math.floor(c / 2)) 189 | 190 | function draw() { 191 | if (!start) { 192 | if (!snake.gameover) { 193 | snake.cn += 1 194 | if (snake.cn % snake.spd != 0) { 195 | return 196 | } 197 | background(255); 198 | strokeWeight(4); 199 | textSize(20) 200 | text(snake.score, (r - 3) * z, z + 20) 201 | food.draw() 202 | snake.draw() 203 | snake.move() 204 | } else { 205 | if (snake.score > highscore) { 206 | highscore = snake.score 207 | } 208 | background(255) 209 | fill(0) 210 | textSize(72) 211 | textStyle(BOLD) 212 | text("Game Over", w / 2 - 180, h / 2) 213 | textStyle(NORMAL) 214 | textSize(24) 215 | text("Score : " + snake.score + " Best : " + highscore, w / 2 - 90, h / 2 + 45) 216 | text("Press left mouse to play again ", w / 2 - 150, h / 2 + 85) 217 | if (mouseIsPressed) { 218 | reset() 219 | } 220 | } 221 | 222 | } else { 223 | background(255) 224 | // fill(0) 225 | textSize(72) 226 | textStyle(BOLD) 227 | text("WELCOME", w / 2 - 180, h / 2) 228 | textStyle(NORMAL) 229 | textSize(24) 230 | text("Press left mouse to play", w / 2 - 125, h / 2 + 45) 231 | text("Use arrow keys to move", w / 2 - 125, h / 2 + 95) 232 | if (mouseIsPressed) { 233 | start = false 234 | } 235 | } 236 | } 237 | 238 | function keyPressed() { 239 | newd = [0,0] 240 | if (keyCode == UP_ARROW) { 241 | newd = [0, -1] 242 | } else if (keyCode == DOWN_ARROW) { 243 | newd = [0, 1] 244 | } else if (keyCode == LEFT_ARROW) { 245 | newd = [-1, 0] 246 | } else if (keyCode == RIGHT_ARROW) { 247 | newd = [1, 0] 248 | } 249 | 250 | if (snake.d[0] * newd[0] + snake.d[1] * newd[1] == 0) { 251 | snake.d = newd; 252 | } 253 | 254 | } 255 | 256 | function genefood() { 257 | var space = [] 258 | for (var i = 0; i < r; i++) { 259 | for (var j = 0; j < c; j++) { 260 | if (snake.check(i, j)) { 261 | space.push([i, j]) 262 | } 263 | } 264 | } 265 | var xy = space[Math.floor(Math.random() * space.length)] 266 | food = new Food(xy[0], xy[1]) 267 | } 268 | 269 | function reset() { 270 | snake = new Snake() 271 | food = new Food(Math.floor(r / 2), Math.floor(c / 2)) 272 | } 273 | -------------------------------------------------------------------------------- /static/js/quote.js: -------------------------------------------------------------------------------- 1 | fetch("/js/quotes.txt").then(r => r.text()).then(t => generate(t)) 2 | function generate(t) { 3 | setTimeout(function () { 4 | var quotes = t.split('\n'); 5 | document.getElementById('quoteline').textContent = quotes[Math.floor(Math.random() * quotes.length)] 6 | }, 2500); 7 | return 8 | } 9 | 10 | function give(date1, date2) { 11 | var ans = Math.round((date2 - date1) / (1000 * 60 * 60 * 24)); 12 | if (ans >= 365) { 13 | return Math.round(ans / 365).toString() + " years ago"; 14 | } else if (ans >= 30) { 15 | return Math.round(ans / 30).toString() + " months ago"; 16 | } else if (ans >= 7) { 17 | if(Math.round(ans / 7)==1){ 18 | return Math.round(ans / 7).toString() + " week ago"; 19 | }else{ 20 | return Math.round(ans / 7).toString() + " weeks ago"; 21 | } 22 | } else { 23 | if (ans == 0) { 24 | return "today"; 25 | } else if (ans == 1) { 26 | return "yesterday"; 27 | } else { 28 | return ans.toString() + " days ago"; 29 | } 30 | } 31 | } 32 | 33 | function dates() { 34 | var dt = document.getElementsByName('dated'); 35 | for (var i = 0; i < dt.length; i++) { 36 | dt[i].textContent = give(new Date(dt[i].id), new Date()) 37 | } 38 | } 39 | 40 | window.onload = dates; 41 | -------------------------------------------------------------------------------- /templates/404.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html' %} 2 | {%block body%} 3 |
4 |
5 |
6 |
7 | 8 | 9 | 10 | 21 |

22 | ERROR 404: PAGE NOT FOUND 23 |
24 |
25 |

Look like you lost in the void.

26 |

Go back to home

27 |
28 |
29 |
30 |
31 | {%endblock%} 32 | -------------------------------------------------------------------------------- /templates/about.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html' %} 2 | {%block body%} 3 |
4 |
5 |
6 |
7 | 8 |

9 | About Creator, Blue edge 10 |
11 |
12 |
13 |

Hi there! I'm an aspiring programmer (or atleast what i think so).

14 |

The few things that i like

15 |
16 |
    17 |
  • Competitive programming

  • 18 |
  • Game development and 3D graphic designing

  • 19 |
  • Linear algebra and Calculus

  • 20 |
  • Poetry and Literature

  • 21 |
22 |
23 |
24 |
25 |

If you like my Blog, you can follow me on github

26 |
27 |
28 |
29 |
30 | 31 | {%endblock%} 32 | -------------------------------------------------------------------------------- /templates/addvideo.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html' %} 2 | {%block body%} 3 | 4 |
5 |
6 |
7 |
8 | 9 |

10 | Hello Blue


11 |
12 | 13 |

14 | 15 |

16 | 17 |

18 | 19 |

20 | 21 |
22 |
23 |
24 | {%endblock%} 25 | -------------------------------------------------------------------------------- /templates/admin.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html' %} 2 | {%block body%} 3 | 4 | 64 | {%endblock%} 65 | -------------------------------------------------------------------------------- /templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Blue Blogs 11 | 12 | 18 | 19 | 20 | 21 |
22 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /templates/changepassword.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Change Password 6 | 7 | 8 | 9 | 10 | {% with messages = get_flashed_messages() %} 11 | {% if messages %} 12 | {% for msg in messages %} 13 | 14 | {% endfor %} 15 | {% endif %} 16 | {% endwith %} 17 |
18 |
19 | 22 |
23 |

Change Password

24 |
25 |
26 | 135 |
136 |
137 | 138 | Go Back 139 |
140 |
141 |
142 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /templates/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "para":{ 3 | "user":"Blue", 4 | "nofpost": 3 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /templates/createaccount.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Create Account 7 | 8 | 9 | 10 | 11 | 12 | {% with messages = get_flashed_messages() %} 13 | {% if messages %} 14 | {% for msg in messages %} 15 | 16 | {% endfor %} 17 | {% endif %} 18 | {% endwith %} 19 |
20 |
21 | 24 |
25 |

Welcome

26 |
27 |
28 | 140 |
141 | 145 |
146 |
147 | 166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /templates/delete.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html' %} 2 | {%block body%} 3 | 4 |
5 |
6 |
7 |
8 | {% set fname = 'img/post/'+post.image %} 9 | 13 | 14 |

{{post.title}}

15 |
16 |
{{post.content}}
17 |
18 |
19 |
20 |
21 | 22 |


23 | 24 |
25 |
26 |
27 | {%endblock%} 28 | -------------------------------------------------------------------------------- /templates/deleteaccount.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Login 6 | 7 | 8 | 9 | 10 | {% with messages = get_flashed_messages() %} 11 | {% if messages %} 12 | {% for msg in messages %} 13 | 14 | {% endfor %} 15 | {% endif %} 16 | {% endwith %} 17 |
18 |
19 | 22 |
23 |

Confirm Password

24 |
25 |
26 | 32 |
33 | 37 |
38 |
39 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /templates/deletegame.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html' %} 2 | {%block body%} 3 | 4 | 5 |
6 |
7 | {% set fname = 'img/games/' + game.nick + '.png' %} 8 | 14 |
15 |

16 | 17 |
18 |
19 |
20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /templates/deletevideo.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html' %} 2 | {%block body%} 3 | 4 | 5 |
6 | 12 |
13 |

14 | 15 |
16 |
17 | {%endblock%} 18 | -------------------------------------------------------------------------------- /templates/edit.html: -------------------------------------------------------------------------------- 1 | {%extends "base.html" %} 2 | {%block body%} 3 |
4 | {% for post in posts %} 5 |
6 |
7 | 10 | 11 | 12 | 13 |

{{post.title}}

14 |
15 |
16 | {% endfor %} 17 |
18 | 19 | {%endblock%} 20 | -------------------------------------------------------------------------------- /templates/editblog.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html' %} 2 | {%block body%} 3 | 4 |
5 |
6 | {% set fname = 'img/post/'+post.image %} 7 |
8 |
9 | 10 |

11 | Hello Blue


12 |
13 | 14 |

15 | 16 |

17 | 18 |

19 | 20 | 23 |

24 | 25 |
26 |
27 |
28 | {%endblock%} 29 | -------------------------------------------------------------------------------- /templates/editgame.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html' %} 2 | {%block body%} 3 | 4 |
5 |
6 |
7 |
8 | 9 |

10 | Hello Blue


11 |
12 | 13 |

14 | 15 |

16 | 17 |

18 | 19 |

20 | 21 |

22 | 23 | 26 |

27 | 28 |
29 | 30 | 31 |
32 |
33 | 34 | 35 |
36 |

37 | 38 |
39 |
40 |
41 | {%endblock%} 42 | -------------------------------------------------------------------------------- /templates/editor.html: -------------------------------------------------------------------------------- 1 | {%extends "base.html" %} 2 | {%block body%} 3 |
4 | {% for game in games %} 5 |
6 |
7 | 10 | 11 | 12 | 13 |

{{game.dis}}

14 |
15 |
16 | {% endfor %} 17 |
18 | 19 | {%endblock%} 20 | -------------------------------------------------------------------------------- /templates/editprofile.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html' %} 2 | {%block body%} 3 | 4 | 5 |
6 |
7 |
8 | 9 |
10 |
11 | {% set fname = 'img/profile/'+user.prof %} 12 |
13 |
14 |
15 | 16 | 17 |
18 |
19 |
20 |
21 |
22 |
23 | 39 |
40 | 41 | 42 |
43 |
44 |

45 |
46 | {{user.name}} 47 | 48 | 51 | 52 | 56 |
57 |
58 | 59 |
60 | 61 |
62 |
63 |
64 |
65 | 66 | {%endblock%} 67 | -------------------------------------------------------------------------------- /templates/editvideo.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html' %} 2 | {%block body%} 3 | 4 |
5 | {% for video in videos %} 6 |
7 |
8 | 9 |

{{video.title}}

10 |
11 |
12 | {% endfor %} 13 | 14 |
15 | {%endblock%} 16 | -------------------------------------------------------------------------------- /templates/games/fullsc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{game.name}} 7 | 8 | 9 | {% set fname='js/games/' + game.nick + '.js' %} 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /templates/games/playgame.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html' %} 2 | {%block body%} 3 | 7 |
8 |
9 |
10 |
11 | {{game.name}} 12 |
13 |
14 | 15 |
16 |
17 |
18 |
19 |

{{game.dis}}

20 |
21 |

Play in full screen

22 |
23 |
24 |
25 |
26 | {%endblock%} 27 | -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | {%extends "base.html" %} 2 | {%block body%} 3 |
4 | {% for post in posts %} 5 | {% set fname = 'img/post/'+post.image %} 6 |
7 |
8 | 9 | 13 | 14 | 15 |

{{post.title}}

16 |
17 |
{{post.content}}
18 |
19 |
20 |
21 | {% endfor %} 22 |
23 |
24 | Previous 25 | Next 26 | 35 |
36 | 37 | {%endblock%} 38 | -------------------------------------------------------------------------------- /templates/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Login 6 | 7 | 8 | 9 | 10 | {% with messages = get_flashed_messages() %} 11 | {% if messages %} 12 | {% for msg in messages %} 13 | 14 | {% endfor %} 15 | {% endif %} 16 | {% endwith %} 17 |
18 |
19 | 22 |
23 |

Welcome Back

24 |
25 |
26 | 50 |
51 | 55 |
56 |
57 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /templates/play.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html' %} 2 | {%block body%} 3 | 4 |
5 |
6 | {% for game in games %} 7 | {% set fname = 'img/games/' + game.nick + '.png' %} 8 | 14 | {% endfor %} 15 |
16 |
17 | {%endblock%} 18 | -------------------------------------------------------------------------------- /templates/postblog.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html' %} 2 | {%block body%} 3 | 4 | 5 |
6 |
7 |
8 |
9 |

Post image Upload

10 |
11 |
12 | 13 | 14 |
15 |
16 |
17 |
18 |
19 |
20 | 36 | 37 | 38 |

39 | Hello {{session["user"]}}

40 |
41 | 42 |

43 | 44 |

45 | 46 |

47 | 48 |

49 | 50 |
51 |
52 |
53 | {%endblock%} 54 | -------------------------------------------------------------------------------- /templates/profile.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html' %} 2 | {%block body%} 3 | 4 |
5 |
6 |
7 |
8 | {% set fname = 'img/profile/'+user.prof %} 9 | 10 |

11 |
12 | {{user.name}} 13 | {% if edit %} 14 | 15 | 16 | 17 | 18 | 19 | {% endif %} 20 |
21 |

{{user.about}}

22 |
23 | 27 |
28 |
29 |
30 | {% set len = posts|length%} 31 | {% if len > 0 %} 32 |

Recent Posts

33 | {% else %} 34 |


35 |

No Post

36 | {% endif %} 37 | {% for post in posts %} 38 | 51 | {% endfor %} 52 | 53 | 54 | 55 | 70 |
71 |
72 |
73 |
74 | 75 | {%endblock%} 76 | -------------------------------------------------------------------------------- /templates/upload.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html' %} 2 | {%block body%} 3 | 4 |
5 |
6 |
7 |
8 | 9 |

10 | Hello Blue


11 |
12 | 13 |

14 | 15 |

16 | 17 |

18 | 19 |

20 | 21 |

22 | 23 |

24 |
25 | 26 | 27 |
28 |
29 | 30 | 31 |
32 |

33 | 34 |
35 |
36 |
37 | {%endblock%} 38 | -------------------------------------------------------------------------------- /templates/video.html: -------------------------------------------------------------------------------- 1 | {%extends 'base.html' %} 2 | {%block body%} 3 | 4 |
5 |
6 |

Check Out my Youtube channel

7 |
8 | 9 | {% for video in videos%} 10 | 16 | {% endfor %} 17 | 18 |
19 | {%endblock%} 20 | --------------------------------------------------------------------------------