feat(easel): add widget mode support

This commit is contained in:
2026-06-12 00:39:54 +03:00
parent f368e6717c
commit 315838604e
3 changed files with 408 additions and 202 deletions

View File

@@ -19,9 +19,11 @@
{% endblock %}
</head>
<body>
<body class="{{ is_widget and 'widget' or ''}}">
<div class="app col-lg-8 mx-auto p-3 py-md-5">
{% if not is_widget %}
<header class="app-header pb-3 mb-5 border-bottom">
<div>{{request.query_params.widget}}</div>
<div class="link-list">
<app-link href="/"
icon="gear">API Gallery</app-link>
@@ -105,22 +107,16 @@
</li>
</ul>
</header>
{% endif %}
<main>
{% block content %}{% endblock %}
</main>
{% if not is_widget %}
<footer class="pt-5 my-5 text-muted border-top">
Created by shmyga &middot; &copy; 2026
</footer>
{% endif %}
</div>
{# <script>
(function () {
const params = new URLSearchParams(window.location.search);
const widget = params.get('widget') || window.location.hostname.startsWith('weather');
if (widget) {
document.body.classList.add('widget');
}
}());
</script> #}
</body>
</html>