|
4 | 4 | {% import "components/textbox.html" as components %} |
5 | 5 | {% import "components/motor_heat.html" as heat_components %} |
6 | 6 | {% import "components/icon_footer.html" as icon_components %} |
| 7 | +{% import "components/behavior_stack.html" as behavior_stack_component %} |
7 | 8 |
|
8 | 9 |
|
9 | 10 |
|
|
44 | 45 |
|
45 | 46 | {{ components.textbox("Willkommen!", "Klicke auf eine der Boxen oder eines der Icons in der Leiste, um mehr Informationen zu bekommen.", true, true, true) }} |
46 | 47 |
|
47 | | -<div class="grid grid-cols-2 gap-3 py-12 px-6 auto-rows-fr"> |
| 48 | +<div class="grid grid-cols-2 gap-3 py-12 px-6 auto-rows-fr" |
| 49 | +x-data="{ width: window.innerWidth, height: window.innerHeight, |
| 50 | + get isMobileDevice() { return ((this.width <= 800) || (this.height <= 600)); } }" |
| 51 | +x-resize="width = $width; height = $height"> |
48 | 52 | <a href="imu" class="flex justify-center flex-col border-2 border-zinc-800 rounded-2xl bg-zinc-100 shadow-md"> |
49 | 53 | <div class="flex justify-between flex-col h-full"> |
50 | 54 | <div class="flex justify-center"> |
|
62 | 66 | </div> |
63 | 67 | </a> |
64 | 68 | <a href="motors" class="flex justify-center flex-col border-2 border-zinc-800 rounded-2xl bg-zinc-100 shadow-md"> |
65 | | - <div class="flex justify-between flex-col h-full"> |
66 | | - <div class="flex justify-center h-full flex-col"> |
| 69 | + <div class="flex justify-between flex-col h-full" > |
| 70 | + <div class="flex justify-center h-full flex-col" x-show="isMobileDevice"> |
67 | 71 | {{ heat_components.motor_heat_component(true) }} |
68 | 72 | </div> |
| 73 | + <div class="flex justify-center h-full flex-col" x-show="!isMobileDevice"> |
| 74 | + {{ heat_components.motor_heat_component(false) }} |
| 75 | + </div> |
69 | 76 | <p class="pb-4 px-2 text-center font-medium">Motoren</p> |
70 | 77 | </div> |
71 | 78 | </a> |
72 | 79 | <a href="behavior" class="flex justify-center flex-col border-2 border-zinc-800 rounded-2xl bg-zinc-100 shadow-md"> |
73 | 80 | <div class="flex justify-between flex-col h-full"> |
74 | 81 | <div class="flex justify-center h-full flex-col"> |
75 | | - <div class="border-2 border-zinc-800 rounded-2xl p-2 m-6 bg-sky-100 to-teal-200"> |
| 82 | + <div class="border-2 border-zinc-800 rounded-2xl p-2 m-6 bg-sky-100 to-teal-200" x-show="isMobileDevice"> |
76 | 83 | {{ current_action_components.current_action_component() }} |
77 | 84 | </div> |
| 85 | + <div x-show="!isMobileDevice"> |
| 86 | + {{ behavior_stack_component.behavior_stack_component(true) }} |
| 87 | + </div> |
78 | 88 | </div> |
79 | 89 | <p class="pb-4 px-2 text-center font-medium">Verhalten</p> |
80 | 90 | </div> |
|
0 commit comments