Enhance Telegram WebApp theme integration and update favicon
All checks were successful
CI / lint-and-test (push) Successful in 15s
All checks were successful
CI / lint-and-test (push) Successful in 15s
- Introduced a new function `applyThemeParamsToCss` to map Telegram theme parameters to CSS variables, improving theme customization. - Updated the `applyTheme` function to utilize the new theme parameters and set background/header colors accordingly. - Added a favicon to the project by linking `favicon.png` in `index.html`. - Modified CSS for the light theme to use CSS variables for better flexibility and maintainability. - Enhanced styling for light theme elements, including container borders and calendar sticky behavior.
This commit is contained in:
@@ -11,14 +11,15 @@
|
||||
--error: #f7768e;
|
||||
}
|
||||
|
||||
/* Light theme: prefer Telegram themeParams (--tg-theme-*), fallback to Telegram-like palette */
|
||||
[data-theme="light"] {
|
||||
--bg: #d5d6db;
|
||||
--surface: #b8b9c4;
|
||||
--text: #343b58;
|
||||
--muted: #6b7089;
|
||||
--accent: #2e7de0;
|
||||
--bg: var(--tg-theme-bg-color, #f0f1f3);
|
||||
--surface: var(--tg-theme-secondary-bg-color, #e0e2e6);
|
||||
--text: var(--tg-theme-text-color, #343b58);
|
||||
--muted: var(--tg-theme-hint-color, #6b7089);
|
||||
--accent: var(--tg-theme-link-color, #2e7de0);
|
||||
--duty: #587d0a;
|
||||
--today: #7847b3;
|
||||
--today: var(--tg-theme-link-color, var(--tg-theme-accent-text-color, #2481cc));
|
||||
--unavailable: #b8860b;
|
||||
--vacation: #0d6b9e;
|
||||
--error: #c43b3b;
|
||||
@@ -56,6 +57,10 @@ body {
|
||||
padding-bottom: env(safe-area-inset-bottom, 12px);
|
||||
}
|
||||
|
||||
[data-theme="light"] .container {
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -114,6 +119,10 @@ body {
|
||||
box-shadow: 0 4px 6px -4px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
[data-theme="light"] .calendar-sticky.is-scrolled {
|
||||
box-shadow: 0 4px 6px -4px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.calendar {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(7, 1fr);
|
||||
|
||||
Reference in New Issue
Block a user