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

View File

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