From a9c77294f88d086c670872171fcc2b38eeafde07 Mon Sep 17 00:00:00 2001 From: XPoet Date: Fri, 13 Mar 2020 22:37:38 +0800 Subject: [PATCH] Add: article.ejs file, render the details of the article --- layout/article.ejs | 7 +++++++ layout/post.ejs | 7 ++++++- source/css/style.styl | 9 +++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 layout/article.ejs diff --git a/layout/article.ejs b/layout/article.ejs new file mode 100644 index 0000000..ff1acdc --- /dev/null +++ b/layout/article.ejs @@ -0,0 +1,7 @@ + +<% if (is_post()) { %> +

文章标题:<%= page.title %>

+
本文作者: <%= config.author %>
+
发布时间:<%= date(page.date, 'YYYY-MM-DD HH:MM:SS') %>
+
<%- page.content %>
+<% } %> \ No newline at end of file diff --git a/layout/post.ejs b/layout/post.ejs index 9527940..e261d7d 100644 --- a/layout/post.ejs +++ b/layout/post.ejs @@ -1,7 +1,7 @@ <% if (!is_post()) { %>
  • -

    文章标题:<%= post.title %>

    +

    文章标题:<%= post.title %>

    生成日期:<%= post.date %>

    文章路径:<%= post.path %>

    文章分类: @@ -15,4 +15,9 @@ <% }); %>

  • +<% } %> + + +<% if (is_post()) { %> + <%- partial('article') %> <% } %> \ No newline at end of file diff --git a/source/css/style.styl b/source/css/style.styl index 46f5466..eb1a05b 100644 --- a/source/css/style.styl +++ b/source/css/style.styl @@ -38,3 +38,12 @@ .tag-link-item, .category-link-item { margin 0 5px } + +.article-title { + color: lightseagreen +} +.article-content { + border 2px solid #ccc + padding 10px + margin 10px +}