diff --git a/src/Main.elm b/src/Main.elm index 8b631c59ed8604a495aea87fd056d74f05f59ad0..9fae85d24aefd81bb93af72470bd251352a3faeb 100644 --- a/src/Main.elm +++ b/src/Main.elm @@ -157,10 +157,12 @@ update msg ( global, local ) = -- VIEW + icon : Html Msg icon = i [ Html.Attributes.class "fa-solid fa-house fa-xl" ] [] + viewNav : Model -> Html Msg viewNav ( global, _ ) = let @@ -175,31 +177,43 @@ viewNav ( global, _ ) = nav [ Html.Attributes.class "navbar" ] [ button [ Html.Attributes.title "Home" - , activeClass Home |> Html.Attributes.class, ViewChange Home |> onClick - ] [ icon ] + , activeClass Home |> Html.Attributes.class + , ViewChange Home |> onClick + ] + [ icon ] , div [ Html.Attributes.class "navbar-title" ] [ text "Schengen Visa Statistics" ] , div [ Html.Attributes.class "navbar-view-icons" ] [ button [ Html.Attributes.title "Map" - , activeClass MapView |> Html.Attributes.class, ViewChange MapView |> onClick - ] [ MapView.icon ] + , activeClass MapView |> Html.Attributes.class + , ViewChange MapView |> onClick + ] + [ MapView.icon ] , button [ Html.Attributes.title "Force" - , activeClass ForceDirectedGraph |> Html.Attributes.class, ViewChange ForceDirectedGraph |> onClick - ] [ ForceDirectedGraphView.icon ] + , activeClass ForceDirectedGraph |> Html.Attributes.class + , ViewChange ForceDirectedGraph |> onClick + ] + [ ForceDirectedGraphView.icon ] , button [ Html.Attributes.title "BarPlot" - , activeClass BarPlot |> Html.Attributes.class, ViewChange BarPlot |> onClick - ] [ BarPlotView.icon ] + , activeClass BarPlot |> Html.Attributes.class + , ViewChange BarPlot |> onClick + ] + [ BarPlotView.icon ] , button [ Html.Attributes.title "LinePlot" - , activeClass LinePlot |> Html.Attributes.class, ViewChange LinePlot |> onClick - ] [ LinePlotView.icon ] + , activeClass LinePlot |> Html.Attributes.class + , ViewChange LinePlot |> onClick + ] + [ LinePlotView.icon ] , button [ Html.Attributes.title "Table" - , activeClass DataTable |> Html.Attributes.class, ViewChange DataTable |> onClick - ] [ DataTableView.icon ] + , activeClass DataTable |> Html.Attributes.class + , ViewChange DataTable |> onClick + ] + [ DataTableView.icon ] ] ] diff --git a/src/Views/ForceDirectedGraph.elm b/src/Views/ForceDirectedGraph.elm index 8d28287de72f316a46b2c302cdec8cedf40b6cae..aa95bb787fe51b397a076e81d6a02a8391c6c172 100644 --- a/src/Views/ForceDirectedGraph.elm +++ b/src/Views/ForceDirectedGraph.elm @@ -527,15 +527,14 @@ nodeElement local dat node = |> List.map (\e -> Maybe.withDefault 1 <| e.totalVisasApplied) |> List.sum - baseFontSize = - 15 + visasApplied / 1000000 - highlightFontSize = - if local.highlight == node.label.value then - 2 * baseFontSize + 15 + visasApplied / 900000 + + (if List.member node.label.value countryNames then + 5 - else - baseFontSize + else + 0 + ) in g [] [ text_