diff --git a/Web/Controller/StaticPages.hs b/Web/Controller/StaticPages.hs new file mode 100644 index 0000000..23ed04d --- /dev/null +++ b/Web/Controller/StaticPages.hs @@ -0,0 +1,18 @@ +module Web.Controller.StaticPages where + +-- WP-0015 — Public-facing intro and tutorial pages (no auth required) + +import Web.Types +import Generated.Types +import IHP.Prelude +import IHP.ControllerPrelude +import Web.View.StaticPages.Landing +import Web.View.StaticPages.Capabilities +import Web.View.StaticPages.Tutorial +import Web.View.StaticPages.ExtensionGuide + +instance Controller StaticPagesController where + action LandingAction = render LandingView + action CapabilitiesAction = render CapabilitiesView + action TutorialAction = render TutorialView + action ExtensionGuideAction = render ExtensionGuideView diff --git a/Web/FrontController.hs b/Web/FrontController.hs index 424c51d..0f03fee 100644 --- a/Web/FrontController.hs +++ b/Web/FrontController.hs @@ -70,6 +70,8 @@ import Web.Controller.LineageEnrichment () import Web.Controller.LearningDashboard () import Web.Controller.Api.V2.Learning () import Web.Controller.Sessions () +-- WP-0015 — Public intro / tutorial pages +import Web.Controller.StaticPages () instance FrontController WebApplication where controllers = @@ -135,6 +137,8 @@ instance FrontController WebApplication where , parseRoute @LineageEnrichmentController , parseRoute @LearningDashboardController , parseRoute @ApiV2LearningController + -- WP-0015 — Public intro / tutorial pages (must be last; catches "/" root) + , parseRoute @StaticPagesController ] instance InitControllerContext WebApplication where @@ -165,7 +169,11 @@ defaultLayout inner = [hsx|