change font weight, improve interface styles

This commit is contained in:
DieMyst 2020-12-02 17:55:07 +03:00
parent 8c12811303
commit ce51aee1d5
4 changed files with 10 additions and 10 deletions

View File

@ -3,7 +3,7 @@
<head>
<link rel="favicon" type="image/ico" href="favicon.ico" />
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@100;200&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@200;200&display=swap" rel="stylesheet">
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">

View File

@ -6,7 +6,7 @@ import Dict exposing (Dict)
import Html exposing (Html, article, div, h3, span, text)
import Html.Events exposing (onClick)
import Instances.View
import Interface.View exposing (instanceView)
import Interface.View exposing (interfaceView)
import Model exposing (Model)
import Modules.Model exposing (Module)
import Msg exposing (Msg(..))
@ -92,9 +92,9 @@ viewInfo blueprintInfo =
viewToggledInterface : Bool -> String -> Interface -> Html Msg
viewToggledInterface isOpen name interface =
let
interfaceView =
interfaceViewEl =
if isOpen then
[ div [ classes "fl w-100 ph4" ] (instanceView interface) ]
[ div [ classes "fl w-100 ph4" ] (interfaceView interface) ]
else
[]
@ -111,5 +111,5 @@ viewToggledInterface isOpen name interface =
]
]
]
++ interfaceView
++ interfaceViewEl
)

View File

@ -6,8 +6,8 @@ import Service.Model exposing (Interface, Record, Signature)
import String.Interpolate exposing (interpolate)
instanceView : Interface -> List (Html msg)
instanceView interface =
interfaceView : Interface -> List (Html msg)
interfaceView interface =
recordsView interface.record_types ++ signaturesView interface.function_signatures
@ -38,7 +38,7 @@ signaturesView signatures =
signatureView : Signature -> Html msg
signatureView signature =
div [ classes "i fl w-100 mv2" ]
[ text (interpolate "fn {0}({1}) -> {2}" [ signature.name, argumentsToString signature.arguments, outputToString signature.output_types ]) ]
[ text "fn ", span [classes "b"] [text signature.name], text (interpolate "({0}) -> {1}" [ argumentsToString signature.arguments, outputToString signature.output_types ]) ]
argumentsToString : List (List String) -> String

View File

@ -3,7 +3,7 @@ module ModulePage.View exposing (..)
import Dict exposing (Dict)
import Html exposing (Html, article, div, h3, span, text)
import Instances.View
import Interface.View exposing (instanceView)
import Interface.View exposing (interfaceView)
import Model exposing (Model)
import ModulePage.Model exposing (ModuleViewInfo)
import Modules.Model exposing (Module)
@ -77,5 +77,5 @@ viewInfo moduleInfo =
, div [ classes "fl w-30 gray mv1" ] [ text "DESCRIPTION" ]
, div [ classes "fl w-70 mv1" ] [ span [ classes "fl w-100 black" ] [ text moduleInfo.description ] ]
, div [ classes "fl w-30 gray mv1" ] [ text "INTERFACE" ]
, div [ classes "fl w-70 mv1" ] [ span [ classes "fl w-100 black" ] (instanceView moduleInfo.moduleInfo.interface) ]
, div [ classes "fl w-70 mv1" ] [ span [ classes "fl w-100 black" ] (interfaceView moduleInfo.moduleInfo.interface) ]
]