Remove some more hardcoding.

This commit is contained in:
Dillon Kearns 2020-08-22 22:25:58 -07:00
parent 3983c06006
commit 8978187ca6
2 changed files with 15 additions and 15 deletions

View File

@ -29,23 +29,18 @@ type alias Model =
type TemplateModel
= ModelBlogPost Template.BlogPost.Model
| ModelShowcase Template.Showcase.Model
| ModelPage Template.Page.Model
| ModelDocumentation Template.Documentation.Model
| ModelBlogIndex Template.BlogIndex.Model
= ${templates.map(name => `Model${name} Template.${name}.Model\n`).join(" | ")}
type Msg
= MsgBlogPost Template.BlogPost.Msg
| MsgBlogIndex Template.BlogIndex.Msg
| MsgGlobal Global.Msg
= MsgGlobal Global.Msg
| OnPageChange
{ path : PagePath Pages.PathKey
, query : Maybe String
, fragment : Maybe String
, metadata : Metadata
}
| ${templates.map(name => `Msg${name} Template.${name}.Msg\n`).join(" | ")}
type alias View =

View File

@ -143,23 +143,28 @@ type alias Model =
type TemplateModel
= ModelBlogPost Template.BlogPost.Model
| ModelShowcase Template.Showcase.Model
| ModelPage Template.Page.Model
= ModelBlogIndex Template.BlogIndex.Model
| ModelBlogPost Template.BlogPost.Model
| ModelDocumentation Template.Documentation.Model
| ModelBlogIndex Template.BlogIndex.Model
| ModelPage Template.Page.Model
| ModelShowcase Template.Showcase.Model
type Msg
= MsgBlogPost Template.BlogPost.Msg
| MsgBlogIndex Template.BlogIndex.Msg
| MsgGlobal Global.Msg
= MsgGlobal Global.Msg
| OnPageChange
{ path : PagePath Pages.PathKey
, query : Maybe String
, fragment : Maybe String
, metadata : Metadata
}
| MsgBlogIndex Template.BlogIndex.Msg
| MsgBlogPost Template.BlogPost.Msg
| MsgDocumentation Template.Documentation.Msg
| MsgPage Template.Page.Msg
| MsgShowcase Template.Showcase.Msg
type alias View =