From 11a8e5efc00a416bf86f983935ae600810d4574f Mon Sep 17 00:00:00 2001 From: DieMyst Date: Wed, 9 Dec 2020 15:32:35 +0300 Subject: [PATCH] wip --- images/link.svg | 20 ++++++++++++++++++++ src/BlueprintPage/View.elm | 6 ++++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 images/link.svg diff --git a/images/link.svg b/images/link.svg new file mode 100644 index 0000000..c691202 --- /dev/null +++ b/images/link.svg @@ -0,0 +1,20 @@ + + + + Group 2 + Created with Sketch. + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/BlueprintPage/View.elm b/src/BlueprintPage/View.elm index 0918231..e9f3e70 100644 --- a/src/BlueprintPage/View.elm +++ b/src/BlueprintPage/View.elm @@ -3,7 +3,8 @@ module BlueprintPage.View exposing (..) import BlueprintPage.Model exposing (BlueprintViewInfo) import Blueprints.Model exposing (Blueprint) import Dict exposing (Dict) -import Html exposing (Html, article, div, span, text) +import Html exposing (Html, a, article, div, img, span, text) +import Html.Attributes exposing (attribute) import Html.Events exposing (onClick) import Instances.View import Interface.View exposing (interfaceView) @@ -78,7 +79,7 @@ viewInfo blueprintInfo = [ span [ classes "fl w-100 black b" ] [ text blueprintInfo.author ] ] , div [ classes "fl w-100 w-20-ns gray-font mv3" ] [ text "DESCRIPTION" ] , div [ classes "fl w-100 w-80-ns mv3" ] [ span [ classes "fl w-100 black lucida pv1" ] [ text blueprintInfo.description ] ] - , div [ classes "fl w-100 w-20-ns gray-font mv3" ] [ text "INTERFACE" ] + , div [ classes "fl w-100 w-20-ns gray-font mv3" ] [ text "MODULES" ] , div [ classes "fl w-100 w-80-ns mv3" ] (blueprintInfo.modules |> List.map (\m -> viewToggledInterface (checkToggle m.name) m.name m.interface) @@ -99,6 +100,7 @@ viewToggledInterface isOpen name interface = div [] ([ div [ classes "fl w-100 light-shadow bg-near-white pa2 mv2 pointer", onClick (ToggleInterface name) ] [ span [ classes "fl mh2 pv1 tl" ] [ text name ] + , div [ attribute "href" ("/module/" ++ name), classes "fl" ] [ img [ attribute "src" "/images/link.svg" ] [ ] ] , div [ classes "o-40 f4 tr pr3" ] [ if isOpen then text "▲"