From a29cefe7d252fce9518240f0ed8d2a23db15ebe8 Mon Sep 17 00:00:00 2001 From: SJost Date: Wed, 7 Mar 2018 14:16:08 +0100 Subject: [PATCH 1/4] MV: generic_form.hamlet -> formPage.hamlet --- src/Handler/Course.hs | 2 +- src/Handler/Term.hs | 4 ++-- templates/{generic_form.hamlet => formPage.hamlet} | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename templates/{generic_form.hamlet => formPage.hamlet} (100%) diff --git a/src/Handler/Course.hs b/src/Handler/Course.hs index c8ca18323..28250fb7d 100644 --- a/src/Handler/Course.hs +++ b/src/Handler/Course.hs @@ -221,7 +221,7 @@ courseEditHandler course = do let formActions = defaultFormActions defaultLayout $ do setTitle [shamlet| #{formTitle} |] - $(widgetFile "generic_form") + $(widgetFile "formPage") data CourseForm = CourseForm diff --git a/src/Handler/Term.hs b/src/Handler/Term.hs index e41e24fc3..a78362fb1 100644 --- a/src/Handler/Term.hs +++ b/src/Handler/Term.hs @@ -113,7 +113,7 @@ termEditHandler term = do let formActions = defaultFormActions defaultLayout $ do setTitle [shamlet| #{formTitle} |] - $(widgetFile "generic_form") + $(widgetFile "formPage") {- wdgtTermForm :: (ToWidget UniWorX a) => a -> Enctype -> Handler Html @@ -123,7 +123,7 @@ wdgtTermForm formWidget formEnctype = do let formActions = defaultFormActions defaultLayout $ do setTitle [shamlet| #{formTitle} |] - $(widgetFile "generic_form") + $(widgetFile "formPage") -} newTermForm :: Maybe Term -> Form Term diff --git a/templates/generic_form.hamlet b/templates/formPage.hamlet similarity index 100% rename from templates/generic_form.hamlet rename to templates/formPage.hamlet From bb4d6a0df88832cf1779b5b4d587f5df33b23555 Mon Sep 17 00:00:00 2001 From: SJost Date: Wed, 7 Mar 2018 14:38:13 +0100 Subject: [PATCH 2/4] =?UTF-8?q?Minor:=20Nutzlose=20templates=20gel=C3=B6sc?= =?UTF-8?q?ht.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/homepage.hamlet | 139 -------------------------------------- templates/homepage.julius | 34 ---------- templates/homepage.lucius | 13 ---- 3 files changed, 186 deletions(-) delete mode 100644 templates/homepage.hamlet delete mode 100644 templates/homepage.julius delete mode 100644 templates/homepage.lucius diff --git a/templates/homepage.hamlet b/templates/homepage.hamlet deleted file mode 100644 index fb799652d..000000000 --- a/templates/homepage.hamlet +++ /dev/null @@ -1,139 +0,0 @@ -
-
-
-

- Yesod—a modern framework for blazing fast websites -

- Fast, stable & spiced with great community - - Read the Book - -
- -
-
-
-
-

Starting - -

- Now that you have a working project you should use the - Yesod book to learn more. -

- You can also use this scaffolded site to explore some concepts, and best practices. - -

    - -
  • - This page was generated by the #{handlerName} handler in - Handler/Home.hs. - -
  • - The #{handlerName} handler is set to generate your - site's home screen in Routes file - config/routes - -
  • - We can link to other handlers, like the Profile. - Try it out as an anonymous user and see the access denied. - Then, try to login with the dummy authentication added - while in development. - -
  • - The HTML you are seeing now is actually composed by a number of widgets, # - most of them are brought together by the defaultLayout function which # - is defined in the Foundation.hs module, and used by #{handlerName}. # - All the files for templates and wigdets are in templates. - -
  • - A Widget's Html, Css and Javascript are separated in three files with the - .hamlet, .lucius and .julius extensions. - -
  • - If you had javascript enabled then you wouldn't be seeing this. - -
    - - -
    -
    -
    -
    -

    Forms - -

    - This is an example of a form. Read the - Forms chapter # - on the yesod book to learn more about them. - -

    -
    -
    -
    - ^{formWidget} - -