I was doing a refurbishment for my personal website right here. The idea came from Felix Wong.
In the hover panel, first thing first, there is the area for the menu. Below the menu, there is a search bar. Under the search bar, there is an area for widgets. In the end, there is the menu for switching languages.
The button itself is the picture used as the Site Icon for Twenty Twenty Theme. The width of the hover panel is 76% or 38.2 (the golden ratio) depending on the screen size. The opacity is 0.9, which is “semi-transparent”.
Felix proposed a good question that for some devices, the position of the notch might affect the visibility of the hover panel button.
To resolve this, I am thinking about the following solution:
First: I need to write some script to detect the position and shape of the notch. I hope that I can do it with JavaScript only.
Second, I need to check if the notch influences the visibility of the hover panel.
Lastly, if the notch doesn’t exist or it doesn’t matter at all, no action is required. Otherwise, I need to adjust the padding-top of the hover panel to prevent it from being overlapped.
Leave a Reply