update
149
.gitignore
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
*.py,cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
cover/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
.pybuilder/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
||||
__pypackages__/
|
||||
|
||||
# Celery stuff
|
||||
celerybeat-schedule
|
||||
celerybeat.pid
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# pytype static type analyzer
|
||||
.pytype/
|
||||
|
||||
# Cython debug symbols
|
||||
cython_debug/
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
|
||||
# IDEs
|
||||
.idea/
|
||||
.vscode/
|
||||
*.swp
|
||||
*.swo
|
||||
BIN
app/static/favicon_io/android-chrome-192x192.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
app/static/favicon_io/android-chrome-512x512.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
app/static/favicon_io/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
app/static/favicon_io/favicon-16x16.png
Normal file
|
After Width: | Height: | Size: 500 B |
BIN
app/static/favicon_io/favicon-32x32.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
app/static/favicon_io/favicon.ico
Normal file
|
After Width: | Height: | Size: 15 KiB |
1
app/static/favicon_io/site.webmanifest
Normal file
@@ -0,0 +1 @@
|
||||
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
|
||||
49
app/static/js/favicon_animator.js
Normal file
@@ -0,0 +1,49 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
// Find the existing favicon link or create one
|
||||
let favicon = document.querySelector('link[rel="icon"]') || document.querySelector('link[rel="shortcut icon"]');
|
||||
|
||||
if (!favicon) {
|
||||
console.warn('No favicon link found to animate.');
|
||||
return;
|
||||
}
|
||||
|
||||
const image = new Image();
|
||||
image.crossOrigin = "anonymous";
|
||||
image.src = favicon.href;
|
||||
|
||||
image.onload = () => {
|
||||
const canvas = document.createElement('canvas');
|
||||
const size = 32; // Standard favicon size
|
||||
canvas.width = size;
|
||||
canvas.height = size;
|
||||
const ctx = canvas.getContext('2d');
|
||||
|
||||
let angle = 0;
|
||||
|
||||
// Animation loop
|
||||
setInterval(() => {
|
||||
// Clear canvas
|
||||
ctx.clearRect(0, 0, size, size);
|
||||
|
||||
// Save context
|
||||
ctx.save();
|
||||
|
||||
// Move to center, rotate, move back
|
||||
ctx.translate(size / 2, size / 2);
|
||||
ctx.rotate(angle * Math.PI / 180);
|
||||
ctx.translate(-size / 2, -size / 2);
|
||||
|
||||
// Draw image
|
||||
ctx.drawImage(image, 0, 0, size, size);
|
||||
|
||||
// Restore context
|
||||
ctx.restore();
|
||||
|
||||
// Update favicon
|
||||
favicon.href = canvas.toDataURL('image/png');
|
||||
|
||||
// Increment angle
|
||||
angle = (angle + 10) % 360;
|
||||
}, 100); // 100ms = 10fps
|
||||
};
|
||||
});
|
||||
@@ -6,6 +6,10 @@
|
||||
<link href="https://cdn.jsdelivr.net/npm/flowbite@2.5.2/dist/flowbite.min.css" rel="stylesheet" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/flowbite@2.5.2/dist/flowbite.min.js"></script>
|
||||
<script src="https://webgl2fundamentals.org/webgl/resources/webgl-utils.js"></script>
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ url_for('static', path='favicon_io/apple-touch-icon.png') }}">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', path='favicon_io/favicon-32x32.png') }}">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ url_for('static', path='favicon_io/favicon-16x16.png') }}">
|
||||
<link rel="manifest" href="{{ url_for('static', path='favicon_io/site.webmanifest') }}">
|
||||
<title>{% block title %}My FastAPI App{% endblock %}</title>
|
||||
{% block css %}
|
||||
{% endblock %}
|
||||
@@ -49,6 +53,7 @@
|
||||
<p>© 2025 EKSTRAH Security Application</p>
|
||||
</footer>
|
||||
|
||||
<script src="{{ url_for('static', path='js/favicon_animator.js') }}"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||