Загрузить файлы в «/»
This commit is contained in:
parent
de4bf06883
commit
21c7bc53cd
5 changed files with 227 additions and 0 deletions
18
IndexHtml.hs
Normal file
18
IndexHtml.hs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{-# LANGUAGE OverloadedStrings #-}
|
||||
module IndexHtml where
|
||||
import Lucid.Base
|
||||
import Lucid.Html5
|
||||
import qualified Data.Text as T
|
||||
import Common (Students, layout)
|
||||
|
||||
index :: Students -> (Html())
|
||||
index students = layout $ do
|
||||
h1_ "Каждому по заслугам"
|
||||
h2_ "Сервис записи работ студентов"
|
||||
h3_ "Выберите студента"
|
||||
form_ [method_ "GET", action_ "./student" ]$ do
|
||||
input_ [type_ "search", name_ "student_id", list_ listId]
|
||||
datalist_ [id_ listId] $ do
|
||||
mapM_ (\x -> option_ [value_ $ fst x] (toHtml $ snd x)) students
|
||||
input_ [type_ "submit"]
|
||||
where listId = "students"
|
||||
Loading…
Add table
Add a link
Reference in a new issue