add: Single Page routing
This commit is contained in:
78
Modules/Website/src/Files.elm
Normal file
78
Modules/Website/src/Files.elm
Normal file
@@ -0,0 +1,78 @@
|
||||
module Files exposing (..)
|
||||
|
||||
import Element exposing (..)
|
||||
import Element.Background as Background
|
||||
import Element.Border as Border
|
||||
import Element.Font as Font
|
||||
import Element.Input as Input
|
||||
import Element.Region as Region
|
||||
import Http
|
||||
import MainPage exposing (Msg)
|
||||
|
||||
|
||||
type alias File =
|
||||
{ name : String
|
||||
, source : String
|
||||
, id : Int
|
||||
, status : String
|
||||
}
|
||||
|
||||
|
||||
|
||||
-- Model --
|
||||
|
||||
|
||||
type alias Model =
|
||||
{ files : List File
|
||||
, filter : String
|
||||
}
|
||||
|
||||
|
||||
initModel : Model
|
||||
initModel =
|
||||
{ files = []
|
||||
, filter = ""
|
||||
}
|
||||
|
||||
|
||||
|
||||
-- Messages --
|
||||
|
||||
|
||||
type Msg
|
||||
= Reload
|
||||
|
||||
|
||||
|
||||
-- | QueryRequestResult (Result Http.Error _)
|
||||
-- Request --
|
||||
-- Update --
|
||||
|
||||
|
||||
update : Msg -> Model -> ( Model, Cmd Msg )
|
||||
update msg model =
|
||||
case msg of
|
||||
_ ->
|
||||
( model, Cmd.none )
|
||||
|
||||
|
||||
|
||||
-- View --
|
||||
|
||||
|
||||
view : Model -> Element Msg
|
||||
view model =
|
||||
Element.column
|
||||
[ width (px 800)
|
||||
, height shrink
|
||||
, centerX
|
||||
, spacing 36
|
||||
, padding 10
|
||||
]
|
||||
[ el
|
||||
[ Region.heading 1
|
||||
, alignLeft
|
||||
, Font.size 36
|
||||
]
|
||||
(text "Files")
|
||||
]
|
||||
Reference in New Issue
Block a user