-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
167 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!-- templates/base.html --> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>{% block title %}My Flask App{% endblock %}</title> | ||
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}"> | ||
</head> | ||
<body> | ||
|
||
<!-- Header Section --> | ||
<header> | ||
<h1>Welcome to the Configuration Manager</h1> | ||
|
||
<div class="tabs"> | ||
<ul> | ||
<li><a href="{{ url_for('home') }}">Home</a></li> | ||
<li><a href="{{ url_for('journal') }}">Journal</a></li> | ||
<li><a href="{{ url_for('videos') }}">Videos</a></li> | ||
</ul> | ||
</div> | ||
|
||
</header> | ||
|
||
<!-- Main Content Block --> | ||
<main> | ||
{% block content %} | ||
{% endblock %} | ||
</main> | ||
|
||
<!-- Footer Section --> | ||
<footer> | ||
<p>© 2024 My Flask App</p> | ||
</footer> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,33 @@ | ||
<!-- templates/journal.html --> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Journal Logs</title> | ||
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}"> | ||
<script> | ||
function startStream() { | ||
const eventSource = new EventSource("/stream"); | ||
const logBox = document.getElementById("logBox"); | ||
|
||
eventSource.onmessage = function(event) { | ||
logBox.value += event.data + "\n"; | ||
logBox.scrollTop = logBox.scrollHeight; // Auto-scroll to the bottom | ||
}; | ||
{% extends "base.html" %} | ||
|
||
eventSource.onerror = function() { | ||
console.error("EventSource failed."); | ||
eventSource.close(); | ||
}; | ||
} | ||
{% block content %} | ||
<div class="content"> | ||
<h2>Journal Logs</h2> | ||
<textarea id="logBox" rows="20" cols="100" readonly></textarea> | ||
</div> | ||
|
||
window.onload = startStream; | ||
</script> | ||
</head> | ||
<body> | ||
<h1>Welcome to the Configuration Manager</h1> | ||
|
||
|
||
<!-- Include the JavaScript file --> | ||
<script> | ||
function startStream() { | ||
const eventSource = new EventSource("/stream"); | ||
const logBox = document.getElementById("logBox"); | ||
|
||
<div class="tabs"> | ||
<ul> | ||
<li><a href="{{ url_for('home') }}">Home</a></li> | ||
<li><a href="{{ url_for('journal') }}">Journal</a></li> | ||
<li><a href="{{ url_for('videos') }}">Videos</a></li> | ||
</ul> | ||
</div> | ||
eventSource.onmessage = function(event) { | ||
logBox.value += event.data + "\n"; | ||
logBox.scrollTop = logBox.scrollHeight; // Auto-scroll to the bottom | ||
}; | ||
|
||
eventSource.onerror = function() { | ||
console.error("EventSource failed."); | ||
eventSource.close(); | ||
}; | ||
} | ||
|
||
window.onload = startStream; | ||
</script> | ||
<!-- <script src="{{ url_for('static', filename='js/script.js') }}"></script> --> | ||
|
||
<div class="content"> | ||
<h2>Journal Logs</h2> | ||
<textarea id="logBox" rows="20" cols="100" readonly></textarea> | ||
</div> | ||
{% include 'footer.html' %} | ||
</body> | ||
</html> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,11 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Play Video</title> | ||
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}"> | ||
</head> | ||
<body> | ||
<h1>Welcome to the Configuration Manager</h1> | ||
|
||
<div class="tabs"> | ||
<ul> | ||
<li><a href="{{ url_for('home') }}">Home</a></li> | ||
<li><a href="{{ url_for('journal') }}">Journal</a></li> | ||
<li><a href="{{ url_for('videos') }}">Videos</a></li> | ||
</ul> | ||
</div> | ||
|
||
<!-- templates/play.html --> | ||
{% extends "base.html" %} | ||
|
||
{% block content %} | ||
<div class="container"> | ||
<h1>Playing Video: {{ filename }}</h1> | ||
<video controls> | ||
<source src="{{ url_for('static', filename=filename) }}" type="video/mp4"> | ||
Your browser does not support the video tag. | ||
<video controls autoplay width="80%" src="{{ url_for('play', filename=filename) }}" type="video/mp4"> | ||
Your browser does not support the video tag. | ||
</video> | ||
<br> | ||
<a href="{{ url_for('videos') }}">Back to Videos</a> | ||
|
||
{% include 'footer.html' %} | ||
</body> | ||
</html> | ||
</div> | ||
{% endblock %} |
Oops, something went wrong.