on master help sign in
Made captcha full screen (#31)
commitc707f22717af148f7205386105a2559d6f8acca7 authoriko <ilyakooo0@gmail.com> dateMon 21 Nov 2022, 16:06 (4 years ago) parentb9843c6
2 files changed+21−3
frontend/Page.elm+5 frontend/Pages/Captcha.elm+16−3
frontend/Page.elm+5
@@ -25,3 +25,8 @@ page { init, view, update } =
2525 Just msg ->
2626 update msg model
2727 }
28+
29+
30+noUpdate : a -> model -> ( model, Cmd msg )
31+noUpdate _ model =
32+ ( model, Cmd.none )
frontend/Pages/Captcha.elm+16−3
@@ -1,4 +1,4 @@
1−module Pages.Captcha exposing (HCaptchSiteKey, Model, init, title, view)
1+module Pages.Captcha exposing (HCaptchSiteKey, Model, init, main, title, view)
22
33import Html exposing (..)
44import Html.Attributes as Attr
@@ -6,6 +6,15 @@ import Page exposing (..)
66import Utils exposing (..)
77
88
9+main : Program () Model (Maybe (Maybe ()))
10+main =
11+ page
12+ { init = init "10000000-ffff-ffff-ffff-000000000001"
13+ , view = view
14+ , update = noUpdate
15+ }
16+
17+
918type alias HCaptchSiteKey =
1019 String
1120
@@ -27,6 +36,10 @@ init siteKey =
2736
2837view : Model -> List (Html msg)
2938view { siteKey } =
30− [ div [ Attr.class "u-embedded-media" ]
31− [ iframe [ Attr.src ("https://iko.soy/warden/hcaptcha.html?" ++ siteKey) ] [] ]
39+ [ iframe
40+ [ Attr.src ("https://iko.soy/warden/hcaptcha.html?" ++ siteKey)
41+ , Attr.style "width" "100%"
42+ , Attr.style "height" "80vh"
43+ ]
44+ []
3245 ]