@@ -27,7 +27,6 @@ import Ur.Sub
2727import Ur.Types exposing (Noun(..))
2828import Html.String
2929import List
30−import Css
3130import Html.Styled.Attributes exposing (css)
3231import Html.Parser
3332import String.Extra exposing (stripTags)
@@ -107,9 +106,16 @@ main =
107106 , body =
108107 [ view model
109108 |> layout
110− [ Font.family
109+ [ Font.family
111110 [ Font.typeface "monospace"
112− , Font.typeface "Apple Color Emoji"
111+ , Font.typeface "system-ui"
112+ , Font.typeface "-apple-system"
113+ , Font.typeface "BlinkMacSystemFont"
114+ , Font.typeface "Segoe UI"
115+ , Font.typeface "Roboto"
116+ , Font.typeface "Helvetica"
117+ , Font.typeface "Arial"
118+ , Font.sansSerif
113119 ]
114120 , clipX
115121 ]
@@ -154,6 +160,29 @@ logoView attributes =
154160 Element.image (List.append [ Html.Attributes.id "tilt" |> htmlAttribute ] attributes)
155161 { src = "assets/img/logo.png", description = "%seax logo" }
156162
163+noSearchResultsView : Element Msg
164+noSearchResultsView = Element.el
165+ [ Html.Attributes.style "padding" "1em" |> htmlAttribute
166+ , width (px 500)
167+ , Font.size 15
168+ , Html.Attributes.class "wavy" |> htmlAttribute
169+ ]
170+ (Element.text """No results found... :)
171+We'll try and find you something.
172+Just come back later.""")
173+
174+subtleLink : String -> String -> Element Msg
175+subtleLink text href =
176+ Element.el
177+ [ Font.size 15
178+ , pointer
179+ , mouseOver
180+ [ Font.color (rgb 0.7 0.7 0.7)
181+ ]
182+ ]
183+ (Element.html (Html.a [ Html.Attributes.href href ] [ Html.text text ]))
184+
185+
157186view : Model -> Element Msg
158187view model =
159188 case model.initiatedSearch of
@@ -214,8 +243,10 @@ view model =
214243 ]
215244 )
216245 ]
217− , Element.html (Html.hr [Html.Attributes.style "width" "95%"] [])
218− , Keyed.column [ width (minimum 0 fill), padding 8 ]
246+ , (if List.isEmpty model.searchResults then
247+ noSearchResultsView
248+ else
249+ Keyed.column [ width (minimum 0 fill), padding 8 ]
219250 (model.searchResults
220251 |> List.filter
221252 (\{ engines } ->
@@ -274,9 +305,13 @@ view model =
274305 ]
275306 )
276307 )
277− )
308+ ))
278309 , Element.html (Html.hr [Html.Attributes.style "width" "95%"] [])
310+ , row [ centerX, padding 10, spacing 10]
311+ [ subtleLink "[About]" "https://vagos.github.io/seax"
312+ , subtleLink "[Code]" "https://github.com/ilyakooo0/seax"
279313 ]
314+ ]
280315
281316
282317searchView : { a | search : String } -> Element Msg