/
BespredeL
/
CVCounter
Обзор
Документация
Войти
/
BespredeL
/
CVCounter
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
1
Аналитика
Безопасность
master
templates/base.html
206 строк
14 KB
BespredeL
Introduce modular object detection (YOLO/OpenCV/ONNX) through the registry, transfer
09 июн 2026, 11:14
09 июн 2026, 11:14
d6eec0c
Код
Авторство
О чём код?
<!DOCTYPE html> <html lang="{{ config.get('general.default_language', 'ru') }}" class="h-100" data-bs-theme="dark"> <head> <!-- Developer: Aleksandr Kireev (https://bespredel.name) Created: 01.11.2023 --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="robots" content="noindex, nofollow"> <meta name="theme-color" content="#16181d"> <title>{% if request.path != '/' %}CVCounter - {% endif %}{% block title %}{% endblock %}</title> <!-- Styles --> <link rel="icon" href="{{ url_for('static', filename='icons/icon.svg') }}" type="image/svg+xml"> <link rel="shortcut icon" href="{{ url_for('static', filename='icons/favicon.ico') }}"> <link rel="apple-touch-icon" sizes="180x180" href="{{ url_for('static', filename='icons/apple-touch-icon.png') }}"> <link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='icons/favicon-32x32.png') }}"> <link rel="icon" type="image/png" sizes="16x16" href="{{ url_for('static', filename='icons/favicon-16x16.png') }}"> <link rel="manifest" href="{{ url_for('static', filename='site.webmanifest') }}"> <link href="{{ url_for('static', filename='assets/bootstrap5/css/bootstrap.min.css') }}" rel="stylesheet"> <link href="{{ url_for('static', filename='assets/css/style.css') }}" rel="stylesheet"> <!-- Scripts --> <script src="{{ url_for('static', filename='assets/socketio/socket.io.min.js') }}"></script> <script> window.SOCKETIO_OPTIONS = { path: "/socket.io", transports: {{ socketio_transports|tojson }}, upgrade: {{ socketio_upgrade|tojson }}, reconnection: true//, //reconnectionAttempts: 20, //timeout: 20000 }; </script> <!-- START: Head block --> {% block head_assets %}{% endblock %} <!-- END: Head block --> </head> <body class="d-flex flex-column h-100 app-body {% block body_class %}{% endblock %}"> <div class="container-fluid app-shell {% block shell_class %}{% endblock %}"> <div class="toast-container position-fixed bottom-0 start-0 p-3" id="toast-container"></div> <!-- START: Top bar --> {% if self.header() or self.breadcrumb() %} <header class="app-topbar{% if request.endpoint == 'main.index' %} app-topbar--home{% endif %}"> <div class="app-topbar__inner"> {% if self.header() %} {% block header %}{% endblock %} {% endif %} {% if self.breadcrumb() %} <div class="app-topbar__breadcrumb"> {% block breadcrumb %}{% endblock %} </div> {% endif %} </div> </header> {% endif %} <!-- END: Top bar --> <!-- START: Alert block --> <div id="alert-container"></div> <!-- END: Alert block --> <!-- START: NoScript block --> <noscript> <div class="row"> <div class="col-12 align-middle"> <div class="alert alert-danger text-center my-3" role="alert"> <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="bi bi-exclamation-triangle-fill text-warning me-2" viewBox="0 0 16 16"> <path d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5m.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2"></path> </svg> <span class="me-2">{{ trans('JavaScript is required for full functionality of this site. Please enable JavaScript in your browser.') }}</span> <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="bi bi-exclamation-triangle-fill text-warning me-2" viewBox="0 0 16 16"> <path d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5m.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2"></path> </svg> </div> </div> </div> </noscript> <!-- END: NoScript block --> <!-- START: Content block --> {% block content %}{% endblock %} <!-- END: Content block --> </div> <!-- START: App toolbar --> <div class="footer-links app-toolbar bg-body border-top"> <div class="px-3 py-2 d-flex flex-wrap align-items-center justify-content-between user-select-none gap-2"> <div class="d-flex justify-content-start gap-1"> {% if config.get('general.button_change_theme') %} <button type="button" class="btn toolbar-btn d-flex align-items-center justify-content-center" id="theme-switch" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="{{ trans('Switch theme color') }}"> {% set currentTheme = (request.cookies.get('theme')|striptags|trim) or 'dark' %} <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-brightness-high {{ currentTheme == 'light' and 'd-none' or '' }}" viewBox="0 0 16 16"> <path d="M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6m0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8M8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0m0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13m8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5M3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8m10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0m-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707M4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"></path> </svg> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-moon-stars {{ currentTheme == 'light' and '' or 'd-none' }}" viewBox="0 0 16 16"> <path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278M4.858 1.311A7.269 7.269 0 0 0 1.025 7.71c0 4.02 3.279 7.276 7.319 7.276a7.316 7.316 0 0 0 5.205-2.162c-.337.042-.68.063-1.029.063-4.61 0-8.343-3.714-8.343-8.29 0-1.167.242-2.278.681-3.286z"></path> <path d="M10.794 3.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387a1.734 1.734 0 0 0-1.097 1.097l-.387 1.162a.217.217 0 0 1-.412 0l-.387-1.162A1.734 1.734 0 0 0 9.31 6.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387a1.734 1.734 0 0 0 1.097-1.097l.387-1.162zM13.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.156 1.156 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.156 1.156 0 0 0-.732-.732l-.774-.258a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732L13.863.1z"></path> </svg> </button> {% endif %} {% if config.get('general.button_fullscreen') %} <button type="button" class="btn toolbar-btn d-flex align-items-center justify-content-center" id="toggle-fullscreen" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="{{ trans('Switch fullscreen mode') }}"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrows-angle-expand" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M5.828 10.172a.5.5 0 0 0-.707 0l-4.096 4.096V11.5a.5.5 0 0 0-1 0v3.975a.5.5 0 0 0 .5.5H4.5a.5.5 0 0 0 0-1H1.732l4.096-4.096a.5.5 0 0 0 0-.707m4.344-4.344a.5.5 0 0 0 .707 0l4.096-4.096V4.5a.5.5 0 1 0 1 0V.525a.5.5 0 0 0-.5-.5H11.5a.5.5 0 0 0 0 1h2.768l-4.096 4.096a.5.5 0 0 0 0 .707"></path> </svg> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrows-angle-contract d-none" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M.172 15.828a.5.5 0 0 0 .707 0l4.096-4.096V14.5a.5.5 0 1 0 1 0v-3.975a.5.5 0 0 0-.5-.5H1.5a.5.5 0 0 0 0 1h2.768L.172 15.121a.5.5 0 0 0 0 .707M15.828.172a.5.5 0 0 0-.707 0l-4.096 4.096V1.5a.5.5 0 1 0-1 0v3.975a.5.5 0 0 0 .5.5H14.5a.5.5 0 0 0 0-1h-2.768L15.828.879a.5.5 0 0 0 0-.707"></path> </svg> </button> {% endif %} {% if config.get('general.button_backward') %} <a href="/" class="btn toolbar-btn d-flex align-items-center justify-content-center" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="{{ trans('Back to homepage') }}"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-return-left" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M14.5 1.5a.5.5 0 0 1 .5.5v4.8a2.5 2.5 0 0 1-2.5 2.5H2.707l3.347 3.346a.5.5 0 0 1-.708.708l-4.2-4.2a.5.5 0 0 1 0-.708l4-4a.5.5 0 1 1 .708.708L2.707 8.3H12.5A1.5 1.5 0 0 0 14 6.8V2a.5.5 0 0 1 .5-.5"></path> </svg> </a> {% endif %} {% if config.get('general.button_save_capture') and request.path.startswith('/counter/') and request.path.endswith('/video') %} <button type="button" class="btn toolbar-btn d-flex align-items-center justify-content-center" id="save-capture" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="{{ trans('Save capture to disk') }}"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-floppy" viewBox="0 0 16 16"> <path d="M11 2H9v3h2z"/> <path d="M1.5 0h11.586a1.5 1.5 0 0 1 1.06.44l1.415 1.414A1.5 1.5 0 0 1 16 2.914V14.5a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 0 14.5v-13A1.5 1.5 0 0 1 1.5 0M1 1.5v13a.5.5 0 0 0 .5.5H2v-4.5A1.5 1.5 0 0 1 3.5 9h9a1.5 1.5 0 0 1 1.5 1.5V15h.5a.5.5 0 0 0 .5-.5V2.914a.5.5 0 0 0-.146-.353l-1.415-1.415A.5.5 0 0 0 13.086 1H13v4.5A1.5 1.5 0 0 1 11.5 7h-7A1.5 1.5 0 0 1 3 5.5V1H1.5a.5.5 0 0 0-.5.5m3 4a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5V1H4zM3 15h10v-4.5a.5.5 0 0 0-.5-.5h-9a.5.5 0 0 0-.5.5z"/> </svg> </button> {% endif %} </div> <div class="translate-middle-x d-none d-md-block"></div> <div class="d-flex align-items-center justify-content-end py-1 toolbar-brand text-body-secondary"> {% if request.path == '/' %} <a href="https://createdby.ru" class="d-none d-sm-block text-body-secondary text-decoration-none lh-1" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-html="true" data-bs-title="Computer Vision Counter" target="_blank">CVCounter</a> {% else %} <a href="{{ url_for('main.index') }}" class="d-none d-sm-block text-body-secondary text-decoration-none lh-1" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-html="true" data-bs-title="Computer Vision Counter">CVCounter</a> {% endif %} <span class="d-none d-sm-block lh-1 opacity-50"> · </span> <a href="https://bespredel.name" class="text-body-secondary text-decoration-none lh-1" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-html="true" data-bs-title="Разработчик системы: <br><b>Александр Киреев</b>" target="_blank">Dev: Александр Киреев</a> </div> </div> </div> <!-- END: Footer links --> <!-- START: Scripts --> <script> window.APP_I18N = {{ translations|tojson }}; </script> <script src="{{ url_for('static', filename='assets/js/i18n.js') }}"></script> <script src="{{ url_for('static', filename='assets/bootstrap5/js/bootstrap.bundle.min.js') }}"></script> <script src="{{ url_for('static', filename='assets/js/main.js') }}"></script> <!-- END: Scripts --> <!-- START: Toast content --> {% with messages = get_flashed_messages() %} {% if messages %} <div class="toast-container position-fixed bottom-0 end-0 p-3"> {% for message in messages %} <div class="toast align-items-center text-bg-primary border-0 toast-show user-select-none" role="alert" aria-live="assertive" aria-atomic="true"> <div class="d-flex"> <div class="toast-body"> {{ message }} </div> <button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button> </div> </div> {% endfor %} </div> {% endif %} {% endwith %} <!-- END: Toast content --> <!-- START: Footer block --> {% block footer_assets %}{% endblock %} <!-- END: Footer block --> </body> </html>