From b4ed72ca4d80fa289fc99ee00603c918dafa1cf2 Mon Sep 17 00:00:00 2001 From: Ourai Lin Date: Wed, 29 Mar 2023 15:56:30 +0800 Subject: [PATCH] feat(hexo): basic layouts for pages and posts --- .../lime/layout/_ksio/layouts/default.ejs | 10 ++++ .../themes/lime/layout/_ksio/layouts/page.ejs | 54 +++++++++++++++++++ src/hexo/themes/lime/layout/layout.ejs | 14 +---- src/hexo/themes/lime/layout/page.ejs | 1 + src/hexo/themes/lime/layout/post.ejs | 1 + 5 files changed, 67 insertions(+), 13 deletions(-) create mode 100644 src/hexo/themes/lime/layout/_ksio/layouts/default.ejs create mode 100644 src/hexo/themes/lime/layout/_ksio/layouts/page.ejs create mode 100644 src/hexo/themes/lime/layout/page.ejs create mode 100644 src/hexo/themes/lime/layout/post.ejs diff --git a/src/hexo/themes/lime/layout/_ksio/layouts/default.ejs b/src/hexo/themes/lime/layout/_ksio/layouts/default.ejs new file mode 100644 index 0000000..2d1fa56 --- /dev/null +++ b/src/hexo/themes/lime/layout/_ksio/layouts/default.ejs @@ -0,0 +1,10 @@ + + + + <%- partial('_ksio/partials/head') %> + <%- css('stylesheets/global') %> + <%- js('javascripts/ksio/vendors/jquery-1.11.3.min') %> + <%- js('javascripts/ksio/vendors/bootstrap.min') %> + + <%- body %> + diff --git a/src/hexo/themes/lime/layout/_ksio/layouts/page.ejs b/src/hexo/themes/lime/layout/_ksio/layouts/page.ejs new file mode 100644 index 0000000..b85539a --- /dev/null +++ b/src/hexo/themes/lime/layout/_ksio/layouts/page.ejs @@ -0,0 +1,54 @@ +<%- partial(theme.header && theme.header.partial || '_ksio/partials/header') %> +
+ <% if (page.banner) { %> + + + <% } %> + +
+
+
+

<%= page.title %>

+
+
<%- page.content %>
+ <% if (page.siblings === true) { %> + + + <% } %> + <% if (page.comments === true) { %> + +
+ <% } %> +
+
+
+<%- partial(theme.footer && theme.footer.partial || '_ksio/partials/footer') %> diff --git a/src/hexo/themes/lime/layout/layout.ejs b/src/hexo/themes/lime/layout/layout.ejs index b194959..2db445c 100644 --- a/src/hexo/themes/lime/layout/layout.ejs +++ b/src/hexo/themes/lime/layout/layout.ejs @@ -1,13 +1 @@ - - - - <%- partial('_ksio/partials/head') %> - <%- css('stylesheets/global') %> - <% if (page.__index) { %> - - <% } %> - <%- js('javascripts/ksio/vendors/jquery-1.11.3.min') %> - <%- js('javascripts/ksio/vendors/bootstrap.min') %> - - <%- body %> - +<%- partial('_ksio/layouts/default') %> diff --git a/src/hexo/themes/lime/layout/page.ejs b/src/hexo/themes/lime/layout/page.ejs new file mode 100644 index 0000000..43687fc --- /dev/null +++ b/src/hexo/themes/lime/layout/page.ejs @@ -0,0 +1 @@ +<%- partial('_ksio/layouts/page') %> diff --git a/src/hexo/themes/lime/layout/post.ejs b/src/hexo/themes/lime/layout/post.ejs new file mode 100644 index 0000000..43687fc --- /dev/null +++ b/src/hexo/themes/lime/layout/post.ejs @@ -0,0 +1 @@ +<%- partial('_ksio/layouts/page') %>