@@ -31,6 +31,10 @@ import Ur.Jam exposing (isSig)
3131import Ur.Run
3232import Ur.Sub
3333import Ur.Types exposing (Noun(..))
34+import Url
35+import ElmEscapeHtml
36+import Json.Encode
37+import Hash
3438
3539url : String
3640url =
@@ -188,7 +192,18 @@ aboutView = row [ centerX, padding 10, spacing 10]
188192 , subtleLinkView "[Code]" "https://github.com/ilyakooo0/seax"
189193 ]
190194
191−
195+titleEmoji : String -> String
196+titleEmoji title =
197+ let maxUnicode = 0x1F3F0
198+ minUnicode = 0x1F300
199+ in title |> Hash.fromString
200+ |> Hash.toString
201+ |> String.toInt
202+ |> Maybe.withDefault 0
203+ |> (\x -> ((modBy (maxUnicode - minUnicode) x) + minUnicode))
204+ |> Char.fromCode
205+ |> String.fromChar
206+ |> (\x -> x ++ " ")
192207
193208
194209view : Model -> Element Msg
@@ -292,7 +307,7 @@ view model =
292307 |> Maybe.map Tuple.first
293308 |> Maybe.withDefault (Animator.init 0)
294309 )
295− (\i -> toFloat i * 47 |> Animator.at)
310+ (\i -> toFloat i * 0 |> Animator.at)
296311 |> String.fromFloat
297312 )
298313 ++ "px"
@@ -302,14 +317,26 @@ view model =
302317 , Html.Attributes.style "padding" "0.5em" |> htmlAttribute
303318 , Html.Attributes.class "result" |> htmlAttribute
304319 ]
305− [ text (stripTags title)
306− |> el
307− [ Font.size 16
320+ [ (Element.html
321+ (Html.a
322+ [ Html.Attributes.href link
323+ , Html.Attributes.class "result-title"
324+ , Html.Attributes.target "_blank"
308325 ]
326+ [ Html.text
327+ (Maybe.withDefault ""
328+ (Url.percentDecode
329+ (ElmEscapeHtml.unescape
330+ (stripTags
331+ ((titleEmoji title) ++ title)
332+ ))))
333+ ]
334+ )
335+ )
309336 , text link
310337 |> el
311− [ Font.size 12
312− , Font.color (rgb 0.7 0.7 0.7)
338+ [ Font.color (rgb 0.7 0.7 0.7)
339+ , Html.Attributes.class "result-link" |> htmlAttribute
313340 ]
314341 ]
315342 )