feat: added static for main page, added views.py: index, get_condig, websocket_endpoint (functionality for receiving commands from the frontend), added main.py: creating an application, connecting static and connecting a router, added Settings.py: class Settings with model_config and stream_url
This commit is contained in:
57
static/index.html
Normal file
57
static/index.html
Normal file
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ title }}</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
<script src="/static/command.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container mt-5">
|
||||
<h1 class="text-center mb-4">Управление роботом {{ name_robot }}</h1>
|
||||
|
||||
<!-- Видеопоток -->
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-7 px-0">
|
||||
<div class="card">
|
||||
<div class="card-body text-center">
|
||||
<img src="" class="img-fluid" id="video-stream" alt="Видеопоток">
|
||||
</div>
|
||||
|
||||
<div class="line"></div>
|
||||
|
||||
<!-- Кнопки -->
|
||||
<div class="col-md-12 d-flex align-items-center px-0">
|
||||
<div class="card-command card d-flex flex-column justify-content-center align-items-center">
|
||||
<!-- Вверх -->
|
||||
<button class="btn btn-warning m-1" id="forward-button">
|
||||
<i class="bi bi-arrow-up"></i>
|
||||
</button>
|
||||
<div class="d-flex">
|
||||
<!-- Влево -->
|
||||
<button class="btn btn-warning m-1" id="left-button">
|
||||
<i class="bi bi-arrow-left"></i>
|
||||
</button>
|
||||
<!-- Вниз -->
|
||||
<button class="btn btn-warning m-1" id="backward-button">
|
||||
<i class="bi bi-arrow-down"></i>
|
||||
</button>
|
||||
<!-- Вправо -->
|
||||
<button class="btn btn-warning m-1" id="right-button">
|
||||
<i class="bi bi-arrow-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user