Difference between revisions of "How to Make the Template Mobile Friendly"

From ImpVis Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
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:[[File:Grid display.png|951x951px]]
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:
 
<syntaxhighlight lang="css" line>
.hotspot-manager{
display: grid;
grid-template-areas: "topleft top topright" "left . right" "bottomleft bottom bottomright";
height: 100%;
width: 100%;
pointer-events: none;
position: absolute;
}
 
</syntaxhighlight>
 


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.
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.
[[Category:Maintaining ImpVis]]
[[Category:Maintaining ImpVis]]

Latest revision as of 09:51, 18 July 2022

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.