From 35513509089817b36912f8e8e875fe34cb05cb8c Mon Sep 17 00:00:00 2001 From: Josha von Gizycki Date: Sun, 24 Mar 2019 16:18:34 +0100 Subject: [PATCH] custom css for reactor --- src/frontend/Explore.elm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/frontend/Explore.elm b/src/frontend/Explore.elm index 3c60976..2a8f3b0 100644 --- a/src/frontend/Explore.elm +++ b/src/frontend/Explore.elm @@ -1,7 +1,8 @@ module Explore exposing (Msg(..), main, update, view) import Browser -import Html exposing (Html, button, div, text) +import Html exposing (Html, button, div, node, text) +import Html.Attributes exposing (type_) import Html.Events exposing (onClick) @@ -23,9 +24,19 @@ update msg model = model - 1 +withStyle html = + div [] + [ node "style" + [ type_ "text/css" ] + [ text "@import url(/resources/public/css/app.css)" ] + , html + ] + + view model = div [] [ button [ onClick Decrement ] [ text "-" ] , div [] [ text (String.fromInt model) ] , button [ onClick Increment ] [ text "+" ] ] + |> withStyle