diff --git a/src/Main.elm b/src/Main.elm index 1c56d98da5c72209173db9b163887305b76020fc..9b45a3222b9974c737443cff3e15b4fb881f5ab7 100644 --- a/src/Main.elm +++ b/src/Main.elm @@ -169,15 +169,15 @@ viewNav ( global, _ ) = [ text "Schengen Visa Statistics" ] , div [ Html.Attributes.class "navbar-view-icons" ] [ button [ activeClass MapView |> Html.Attributes.class, ViewChange MapView |> onClick ] - [ i [ Html.Attributes.class "fa-solid fa-map fa-xl" ] [] ] + [ MapView.icon ] , button [ activeClass ForceDirectedGraph |> Html.Attributes.class, ViewChange ForceDirectedGraph |> onClick ] - [ i [ Html.Attributes.class "fa-solid fa-hexagon-nodes fa-xl" ] [] ] + [ ForceDirectedGraphView.icon ] , button [ activeClass BarPlot |> Html.Attributes.class, ViewChange BarPlot |> onClick ] - [ i [ Html.Attributes.class "fa-solid fa-chart-simple fa-xl" ] [] ] + [ BarPlotView.icon ] , button [ activeClass LinePlot |> Html.Attributes.class, ViewChange LinePlot |> onClick ] - [ i [ Html.Attributes.class "fa-solid fa-chart-line fa-xl" ] [] ] + [ LinePlotView.icon ] , button [ activeClass DataTable |> Html.Attributes.class, ViewChange DataTable |> onClick ] - [ i [ Html.Attributes.class "fa-solid fa-table fa-xl" ] [] ] + [ DataTableView.icon ] ] ] diff --git a/src/Views/BarPlot.elm b/src/Views/BarPlot.elm index 427098990d8c139db6f464f94a2a3d270890dde2..37f0ac1bd978ae864e66b13ae89a46da38e1df5e 100644 --- a/src/Views/BarPlot.elm +++ b/src/Views/BarPlot.elm @@ -1,4 +1,4 @@ -module Views.BarPlot exposing (view, init, update) +module Views.BarPlot exposing (view, init, update, icon) import Config.BarPlotConfig as Local exposing (Model) @@ -20,6 +20,9 @@ import TypedSvg.Types exposing (AnchorAlignment(..), Transform(..)) import Utils exposing (codeToName) +icon : Html Msg +icon = + Html.i [ Html.Attributes.class "fa-solid fa-chart-simple fa-xl" ] [] -- Constants for width and height w : Float diff --git a/src/Views/DataTableView.elm b/src/Views/DataTableView.elm index 39e494d2bc6caad3d11b91050b901d9800e7356c..44eb9bf19676d3993050501f92ef0c28b496cd26 100644 --- a/src/Views/DataTableView.elm +++ b/src/Views/DataTableView.elm @@ -1,4 +1,4 @@ -module Views.DataTableView exposing (view, update, subscriptions, init) +module Views.DataTableView exposing (view, update, subscriptions, init, icon) import Html exposing (Html, div, button, i, input, text, table, thead, tbody, tr, th, td) import Html.Attributes @@ -9,6 +9,10 @@ import Data.DataLoader exposing (Entry) import Config.DataTableConfig as Local exposing (Model) import Utils exposing (codeToName) +icon : Html Msg +icon = + i [ Html.Attributes.class "fa-solid fa-table fa-xl" ] [] + propagate : Local.Msg -> Msg propagate msg = GotDataTable msg diff --git a/src/Views/ForceDirectedGraph.elm b/src/Views/ForceDirectedGraph.elm index 2c5842e916606f44fa79a4df83adde1b63d0fa76..deb39b69b0a75916c6b433da9608605bc90579db 100644 --- a/src/Views/ForceDirectedGraph.elm +++ b/src/Views/ForceDirectedGraph.elm @@ -26,6 +26,9 @@ import TypedSvg.Core exposing (Attribute, Svg, text) import TypedSvg.Types exposing (AlignmentBaseline(..), AnchorAlignment(..), Paint(..), ShapeRendering(..), TextRendering(..), px) import Utils exposing (flag) +icon : Html Msg +icon = + Html.i [ Html.Attributes.class "fa-solid fa-hexagon-nodes fa-xl" ] [] w : Float w = diff --git a/src/Views/LinePlot.elm b/src/Views/LinePlot.elm index 2c431e875ff42939f24b52cc3793e4149b5ea6cb..43c279cc07626a8923353ee87c53dfcacc553b8c 100644 --- a/src/Views/LinePlot.elm +++ b/src/Views/LinePlot.elm @@ -1,4 +1,4 @@ -module Views.LinePlot exposing (view, init, update) +module Views.LinePlot exposing (view, init, update, icon) import Model exposing (Global, View(..)) import Msg exposing (Msg(..)) import Data.DataLoader exposing (Entry) @@ -18,6 +18,10 @@ import Axis import Config.LinePlotConfig as Local exposing (Model) import Utils exposing (codeToName) +icon : Html Msg +icon = + Html.i [ Html.Attributes.class "fa-solid fa-chart-line fa-xl" ] [] + init : Model init = { pointAnnotation = Nothing , vLineAnnotation = Nothing } diff --git a/src/Views/MapView.elm b/src/Views/MapView.elm index c5f823d56dc1afa8248a99075e6c0589859262d2..7237fbcf7de94e2b928fe99cc4fe2ce8c2d0f0a5 100644 --- a/src/Views/MapView.elm +++ b/src/Views/MapView.elm @@ -1,4 +1,4 @@ -module Views.MapView exposing (view, update, init, subscriptions, getMapData) +module Views.MapView exposing (view, update, init, subscriptions, getMapData, icon) import Http import Html exposing (Html, div, text, select, option, span) @@ -30,6 +30,10 @@ import Svg.Events exposing (onMouseOver, onMouseOut, onClick) import Zoom import Task +icon : Html Msg +icon = + Html.i [ Html.Attributes.class "fa-solid fa-map fa-xl" ] [] + w : Float w = 1200