Hide header but on hover show #258
-
Hello Is it possible for all users to hide the header and make it appear on hover? I currently have it set up for users and it works as expected: kiosk_mode:
non_admin_settings:
hide_header: true
ignore_entity_settings: true I tried to solve with card_mod:
style: |
.header {
opacity: 0;
}
.header:hover {
opacity: 1;
} I don't know where in the card (yaml) I have to put the above written for it to work? Is there some setting in kiosk mode that I've overlooked to make it work, because as an administrator I occasionally need the header, but most of the time it occupies the visible space unnecessarily?? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @Trzinka,
your-custom-theme:
card-mod-theme: your-custom-theme
card-mod-root-yaml: |
.: |
#view {
min-height: 100vh !important;
--header-height: 0px;
}
.header {
opacity: 0;
transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out !important;
transform: translateY(-60%);
position: fixed;
}
.header .toolbar {
pointer-events: none;
}
.header:hover {
opacity: 1;
transform: translateY(0%);
}
.header:hover .toolbar {
pointer-events: all;
}
Regards
|
Beta Was this translation helpful? Give feedback.
Hi @Trzinka,
As I mentioned, what you want is a very specific use case and for that the best is to use card-mod as you were trying.
Forget about
kiosk-mode
for that, because what you want is a personalised use case, so usecard-mod
which gives you all the flexibility that you need, take the example that I gave you and tweak it to match what you are searching for.If you want to hide the header for all the users excluding a set of users for which you want to show the header on rollover, just use Jinja templates for that. You can add
display: none
to the header only if the user is not in the specific list of users that you want to show the header on rollover.