This commit is contained in:
2025-12-10 09:10:34 +01:00
parent edb1aadf04
commit 9a83198e85
11 changed files with 204 additions and 0 deletions

149
.gitignore vendored Normal file
View 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

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View 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"}

View 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
};
});

View File

@@ -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>&copy; 2025 EKSTRAH Security Application</p>
</footer>
<script src="{{ url_for('static', path='js/favicon_animator.js') }}"></script>
</body>
</html>