From 0e46ac59eef96ce0afb46553440f11eb9e7b9ea6 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 16 May 2020 16:27:03 +0200 Subject: [PATCH] improvement(textes): utilisation structure espace texte --- .../themes/blog/layout/_partial/archive.ejs | 8 +++--- .../blog/layout/_partial/article-preview.ejs | 15 +++++++++++ .../themes/blog/layout/_partial/article.ejs | 25 ++++++++++++------- .../blog/layout/_partial/post/title.ejs | 2 +- src/textes/themes/blog/layout/index.ejs | 6 ++++- src/textes/themes/blog/layout/layout.ejs | 4 +-- 6 files changed, 44 insertions(+), 16 deletions(-) create mode 100644 src/textes/themes/blog/layout/_partial/article-preview.ejs diff --git a/src/textes/themes/blog/layout/_partial/archive.ejs b/src/textes/themes/blog/layout/_partial/archive.ejs index f6cd056..a67cee8 100644 --- a/src/textes/themes/blog/layout/_partial/archive.ejs +++ b/src/textes/themes/blog/layout/_partial/archive.ejs @@ -1,7 +1,9 @@ <% if (pagination == 2){ %> +
<% page.posts.each(function(post){ %> - <%- partial('article', {post: post, index: true}) %> + <%- partial('article-preview', {post: post, index: true}) %> <% }) %> +
<% } else { %> <% var last; %> <% page.posts.each(function(post, i){ %> @@ -15,9 +17,9 @@

<%= year %>

-
+
<% } %> - <%- partial('article', {post: post, index: true}) %> + <%- partial('article-preview', {post: post, index: true}) %> <% }) %> <% if (page.posts.length){ %>
diff --git a/src/textes/themes/blog/layout/_partial/article-preview.ejs b/src/textes/themes/blog/layout/_partial/article-preview.ejs new file mode 100644 index 0000000..882784d --- /dev/null +++ b/src/textes/themes/blog/layout/_partial/article-preview.ejs @@ -0,0 +1,15 @@ + diff --git a/src/textes/themes/blog/layout/_partial/article.ejs b/src/textes/themes/blog/layout/_partial/article.ejs index 0df71c9..d35f95c 100644 --- a/src/textes/themes/blog/layout/_partial/article.ejs +++ b/src/textes/themes/blog/layout/_partial/article.ejs @@ -1,4 +1,4 @@ -
+
<%- partial('post/gallery') %> <% if (post.link || post.title){ %> @@ -6,10 +6,6 @@ <%- partial('post/title', {class_name: 'article-title'}) %> <% } %> -
<% if (post.excerpt && index){ %> <%- post.excerpt %> @@ -25,6 +21,21 @@
+<% if (!index){ %> + <%- partial('post/nav') %> +<% } %> + +
+
+ avatar + +
+ <%- partial('post/category') %> +
+
<% if (post.comments && config.disqus_shortname){ %> <%= __('comment') %> @@ -32,10 +43,6 @@ <%- partial('post/tag') %>
-<% if (!index){ %> - <%- partial('post/nav') %> -<% } %> - <% if (!index && post.comments && config.disqus_shortname){ %>
diff --git a/src/textes/themes/blog/layout/_partial/post/title.ejs b/src/textes/themes/blog/layout/_partial/post/title.ejs index 3ea30af..1187779 100644 --- a/src/textes/themes/blog/layout/_partial/post/title.ejs +++ b/src/textes/themes/blog/layout/_partial/post/title.ejs @@ -1 +1 @@ -

<%= post.title %>

+

<%= post.title %>

diff --git a/src/textes/themes/blog/layout/index.ejs b/src/textes/themes/blog/layout/index.ejs index 60a2c68..ffcdbac 100644 --- a/src/textes/themes/blog/layout/index.ejs +++ b/src/textes/themes/blog/layout/index.ejs @@ -1 +1,5 @@ -<%- partial('_partial/archive', {pagination: 2, index: true}) %> \ No newline at end of file +
+

Toutes mes derniers textes, j'espère qu'ils vous intéresseront !

+
+ +<%- partial('_partial/archive', {pagination: 2, index: true}) %> diff --git a/src/textes/themes/blog/layout/layout.ejs b/src/textes/themes/blog/layout/layout.ejs index 094edc5..318ddd2 100644 --- a/src/textes/themes/blog/layout/layout.ejs +++ b/src/textes/themes/blog/layout/layout.ejs @@ -3,11 +3,11 @@
<%- partial('_partial/header', null, {cache: !config.relative_link}) %> -
-
<%- body %>
+
<% if (theme.sidebar && theme.sidebar !== 'bottom'){ %> <%- partial('_partial/sidebar', null, {cache: !config.relative_link}) %> <% } %> +
<%- body %>
<%- partial('_partial/footer', null, {cache: !config.relative_link}) %>