@@ -56,7 +56,7 @@ module ViewComponents =
5656 prop.children [
5757 Html.input [
5858 prop.className
59- " shadow appearance-none border rounded w-full py-2 px-3 outline-none focus:ring-2 ring-teal-300 text-grey-darker"
59+ " shadow appearance-none border rounded w-full py-2 px-3 outline-none focus:ring-2 ring-teal-300 text-grey-darker text-sm sm:text-base "
6060 prop.value model.Input
6161 prop.placeholder " What needs to be done?"
6262 prop.autoFocus true
@@ -67,7 +67,7 @@ module ViewComponents =
6767 ]
6868 Html.button [
6969 prop.className
70- " flex-no-shrink p-2 px-12 rounded bg-teal-600 outline-none focus:ring-2 ring-teal-300 font-bold text-white hover:bg-teal disabled:opacity-30 disabled:cursor-not-allowed"
70+ " flex-no-shrink p-2 px-12 rounded bg-teal-600 outline-none focus:ring-2 ring-teal-300 font-bold text-white hover:bg-teal disabled:opacity-30 disabled:cursor-not-allowed text-sm sm:text-base "
7171 prop.disabled ( Todo.isValid model.Input |> not )
7272 prop.onClick ( fun _ -> dispatch ( SaveTodo( Start model.Input)))
7373 prop.text " Add"
@@ -77,18 +77,21 @@ module ViewComponents =
7777
7878 let todoList model dispatch =
7979 Html.div [
80- prop.className " bg-white/80 rounded-md shadow-md p-4 w-5/6 lg:w-3/4 lg:max-w-2xl "
80+ prop.className " rounded-md p-2 sm:p-4 w-full "
8181 prop.children [
8282 Html.ol [
83- prop.className " list-decimal ml-6"
83+ prop.className " list-decimal ml-4 sm:ml- 6"
8484 prop.children [
8585 match model.Todos with
8686 | NotStarted -> Html.text " Not Started."
8787 | Loading None -> Html.text " Loading..."
8888 | Loading ( Some todos)
8989 | Loaded todos ->
9090 for todo in todos do
91- Html.li [ prop.className " my-1" ; prop.text todo.Description ]
91+ Html.li [
92+ prop.className " my-1 text-black text-base sm:text-lg break-words"
93+ prop.text todo.Description
94+ ]
9295 ]
9396 ]
9497
@@ -98,29 +101,53 @@ module ViewComponents =
98101
99102let view model dispatch =
100103 Html.section [
101- prop.className " h-screen w-screen"
102- prop.style [
103- style.backgroundSize " cover"
104- style.backgroundImageUrl " https://unsplash.it/1200/900?random"
105- style.backgroundPosition " no-repeat center center fixed"
106- ]
107-
104+ prop.className " h-screen w-screen relative overflow-hidden"
108105 prop.children [
109- Html.a [
110- prop.href " https://safe-stack.github.io/"
111- prop.className " absolute block ml-12 h-12 w-12 bg-teal-300 hover:cursor-pointer hover:bg-teal-400"
112- prop.children [ Html.img [ prop.src " /favicon.png" ; prop.alt " Logo" ] ]
106+ // Meta viewport tag for proper mobile scaling
107+ Html.meta [
108+ prop.name " viewport"
109+ prop.content " width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
110+ ]
111+
112+ // Background div with image and glass effect
113+ Html.div [
114+ prop.className " absolute inset-0 bg-cover bg-center bg-fixed bg-no-repeat
115+ bg-white/20 backdrop-blur-sm"
116+ prop.style [
117+ style.backgroundImageUrl " https://unsplash.it/1200/900?random"
118+ ]
113119 ]
114120
121+ // Content container (the rest of your UI)
115122 Html.div [
116- prop.className " flex flex-col items-center justify-center h -full"
123+ prop.className " relative z-10 h-full w -full"
117124 prop.children [
118- Html.h1 [
119- prop.className " text-center text-5xl font-bold text-white mb-3 rounded-md p-4"
120- prop.text " SAFE.App"
125+ // Your existing content here
126+ Html.a [
127+ prop.href " https://safe-stack.github.io/"
128+ prop.className " absolute block ml-4 sm:ml-12 h-10 w-10 sm:h-12 sm:w-12 bg-teal-300 hover:cursor-pointer hover:bg-teal-400"
129+ prop.children [
130+ Html.img [ prop.src " /favicon.png" ; prop.alt " Logo" ]
131+ ]
132+ ]
133+
134+
135+ Html.div [
136+ prop.className " flex flex-col items-center justify-center h-full"
137+ prop.children [
138+ Html.div [
139+ prop.className " bg-white/20 backdrop-blur-lg p-4 sm:p-8 rounded-xl shadow-lg border border-white/30 mx-4 sm:mx-0 max-w-full sm:max-w-2xl"
140+ prop.children [
141+ Html.h1 [
142+ prop.className " text-center text-3xl sm:text-5xl font-bold mb-3 p-2 sm:p-4"
143+ prop.text " SAFE.App"
144+ ]
145+ ViewComponents.todoList model dispatch
146+ ]
147+ ]
148+ ]
121149 ]
122- ViewComponents.todoList model dispatch
123150 ]
124151 ]
125152 ]
126- ]
153+ ]
0 commit comments