diff --git a/apps/silk/Router.lua b/apps/silk/Router.lua index 45bbbe8..1bfaf2a 100644 --- a/apps/silk/Router.lua +++ b/apps/silk/Router.lua @@ -83,7 +83,7 @@ function Router:delegate() self:error(o) end else - self:error(e) + self:error("The index page is not found for layout: "..self.registry.layout) end end diff --git a/apps/views/admin/index.ls b/apps/views/admin/index.ls new file mode 100644 index 0000000..deaa5f6 --- /dev/null +++ b/apps/views/admin/index.ls @@ -0,0 +1,11 @@ +") + local views = args[1] + for k, v in pairs(views) do + echo(k.." -> ") + v:render() + echo("
") + end + --views.__main__:render() +?> \ No newline at end of file diff --git a/apps/views/default/post/edit.ls b/apps/views/admin/post/edit.ls similarity index 100% rename from apps/views/default/post/edit.ls rename to apps/views/admin/post/edit.ls diff --git a/apps/views/default/index.ls b/apps/views/default/index.ls new file mode 100644 index 0000000..ce19292 --- /dev/null +++ b/apps/views/default/index.ls @@ -0,0 +1,27 @@ + + + Application pages + + + +
+ ") + v:render() + echo("
") + end + --views.__main__:render() + ?> +
+ + \ No newline at end of file