A bunch of work getting blueprints working
This commit is contained in:
0
blueprints/__init__.py
Normal file
0
blueprints/__init__.py
Normal file
40
blueprints/home/home.html
Normal file
40
blueprints/home/home.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Video Commander</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../static/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1 class="text-center">Sanctuary Commander</h1>
|
||||
<hr>
|
||||
<h3 class="text-center">Common Tools</h3>
|
||||
<div class="row">
|
||||
<button class="col-sm-4 btn btn-secondary p-3 my-1">Toggle TVs On/Off</button>
|
||||
<button class="col-sm-4 btn btn-secondary p-3 my-1">Disable Video</button>
|
||||
<button class="col-sm-4 btn btn-secondary p-3 my-1">Blackout Screen</button>
|
||||
</div>
|
||||
<hr>
|
||||
<h3 class="text-center">Play Something</h3>
|
||||
<div class="row">
|
||||
<button class="col-sm-4 btn btn-secondary p-3 my-1">Show Static Image</button>
|
||||
<button class="col-sm-4 btn btn-secondary p-3 my-1">Play a Stream</button>
|
||||
<button class="col-sm-4 btn btn-secondary p-3 my-1">Play a Video</button>
|
||||
</div>
|
||||
<hr>
|
||||
<h3 class="text-center">Add Something</h3>
|
||||
<div class="row">
|
||||
<a class="col-sm-4 btn btn-secondary p-3 my-1" href="/upload/photo">Upload a Static Image</a>
|
||||
<button class="col-sm-4 btn btn-secondary p-3 my-1">Configure a Stream</button>
|
||||
<button class="col-sm-4 btn btn-secondary p-3 my-1">Upload a Slideshow of Images</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<button class="col-sm-4 btn btn-secondary p-3 my-1">Upload a Video</button>
|
||||
<button class="col-sm-4 btn btn-secondary p-3 my-1">Get Video from YouTube</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
11
blueprints/home/home.py
Normal file
11
blueprints/home/home.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from flask import Blueprint, request, render_template
|
||||
|
||||
home_bp = Blueprint('home', __name__, template_folder='.')
|
||||
|
||||
@home_bp.route("/")
|
||||
def root_route():
|
||||
if request.method == "GET":
|
||||
return render_get(), 200
|
||||
|
||||
def render_get():
|
||||
return render_template('home.html')
|
||||
15
blueprints/upload_photo/upload_photo.html
Normal file
15
blueprints/upload_photo/upload_photo.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Video Commander</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../static/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1 class="text-center">Upload a Static Photo</h1>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
11
blueprints/upload_photo/upload_photo.py
Normal file
11
blueprints/upload_photo/upload_photo.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from flask import Blueprint, request, render_template
|
||||
|
||||
upload_photo_bp = Blueprint('upload_photo', __name__, url_prefix='/upload', template_folder='.')
|
||||
|
||||
@upload_photo_bp.route('/photo')
|
||||
def get_page():
|
||||
if request.method == "GET":
|
||||
return render_get(), 200
|
||||
|
||||
def render_get():
|
||||
return render_template('upload_photo.html')
|
||||
Reference in New Issue
Block a user