From 7bee5b1adbc54cf430586160a4483f130a1df351 Mon Sep 17 00:00:00 2001 From: Techit Thawiang Date: Sun, 26 Oct 2025 18:25:24 +0700 Subject: [PATCH] Add dismissable banner --- app/assets/css/style.css | 25 +++++++- .../web-dismissable-global-banner.vue | 58 +++++++++++++++++++ 2 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 app/components/web-dismissable-global-banner.vue diff --git a/app/assets/css/style.css b/app/assets/css/style.css index c43175b..e5610ea 100644 --- a/app/assets/css/style.css +++ b/app/assets/css/style.css @@ -95,7 +95,7 @@ h6 { font-size: 0.90em; } .material-symbols-outlined { font-variation-settings: 'FILL' 0, - 'wght' 100, + 'wght' 400, 'GRAD' 0, 'opsz' 24 } @@ -623,7 +623,6 @@ button.btn, a.btn { cursor: pointer; } - .btn { all: unset; display: flex; @@ -635,6 +634,10 @@ a.btn { padding-inline: calc(var(--ui-spacing)*4); border-radius: calc(var(--ui-spacing)*5); } +.btn.btn-secondary { + background: var(--color-secondary); + color: var(--color-on-secondary); +} .btn.btn-sm { height: calc(var(--ui-spacing)*9); } @@ -722,4 +725,22 @@ a.btn { } .toc .toc-link-indent-4 { margin-left: calc(var(--ui-spacing)*6); +} +.web-dismissable-banner { + position: sticky; + width: 100%; + text-align: center; + padding: 0.75rem; + background: var(--color-primary); + color: var(--color-on-primary); +} +.web-dismissable-banner > .web-dismissable-banner-content { + display: flex; + justify-content: center; + align-items: center; + gap: 1rem; + max-width: var(--ui-container); + padding: 0 calc(var(--ui-spacing)*4); + margin: 0 auto; + justify-content: space-between; } \ No newline at end of file diff --git a/app/components/web-dismissable-global-banner.vue b/app/components/web-dismissable-global-banner.vue new file mode 100644 index 0000000..d438942 --- /dev/null +++ b/app/components/web-dismissable-global-banner.vue @@ -0,0 +1,58 @@ + + + \ No newline at end of file