How to Make the Template Mobile Friendly

From ImpVis Wiki
Jump to navigation Jump to search

The current template is using CSS grid style, the position of the hotspots are set to be in specific grid areas. To see this, go to the visualisation component under the layout folder and scroll down to css style:

.hotspot-manager{
	display: grid;
	grid-template-areas: "topleft top topright" "left . right" "bottomleft bottom bottomright";
	height: 100%;
	width: 100%;
	pointer-events: none;
	position: absolute;
}


If we want to make it mobile friendly, one thing we can do is to have different grid settings in different type of screens (differ by maximum width). An example of this can be found at https://dodung1221.medium.com/best-way-to-design-web-responsive-with-grid-view-in-css-ad44cb5974a4 . In the example, the grod layout was only specified by columns. However, given the hotspot we want to implement, we need both row and column to be written in percentages.