From 97d5c977fc3bf8fd5307ee043357d7d2bde5388f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=91=E8=8B=8D=E7=8B=97?= Date: Fri, 23 Sep 2022 16:48:18 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E5=88=86=E7=B1=BB=E9=A1=B5?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=98=BE=E7=A4=BA=E6=9B=B4=E5=B0=91=E6=96=87?= =?UTF-8?q?=E7=AB=A0=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/hexo-theme-async/_config.yml | 4 ++ .../layout/_partial/page/archive.ejs | 44 ++++++++++++------- .../source/css/_components/timeline.less | 5 +++ 3 files changed, 36 insertions(+), 17 deletions(-) diff --git a/package/hexo-theme-async/_config.yml b/package/hexo-theme-async/_config.yml index 7921b200..bf484f06 100644 --- a/package/hexo-theme-async/_config.yml +++ b/package/hexo-theme-async/_config.yml @@ -159,6 +159,10 @@ footer: # custom_text: +# archive +archive: + type: more # less more + # Reward (Donate) # If enable true, reward would be displayed in every posts and pages by default. # You can show or hide reward in a specific page throuth `reward: true | false` in Front Matter. diff --git a/package/hexo-theme-async/layout/_partial/page/archive.ejs b/package/hexo-theme-async/layout/_partial/page/archive.ejs index 0cc170cb..0fd4c292 100644 --- a/package/hexo-theme-async/layout/_partial/page/archive.ejs +++ b/package/hexo-theme-async/layout/_partial/page/archive.ejs @@ -42,30 +42,40 @@
-
-
-
+
+ <% if(theme.archive.type === 'less'){ %> +
<%= element.title %>
-
-
    -
  • <%= date(element.date,'MM/DD') %>
  • -
  • <%= date(element.date,'hh:mm') %>
  • - <% if(theme.wordcount.enable && theme.wordcount.count){ %> -
  • <%= wordcount(element.content) %>
  • - <% } %> -
-
-
- <%if(element.excerpt){%> -
- <%- element.excerpt %> + <% } else {%> +
+
+
+ + <%= element.title %> + +
+
+
    +
  • <%= date(element.date,'MM/DD') %>
  • +
  • <%= date(element.date,'hh:mm') %>
  • + <% if(theme.wordcount.enable && theme.wordcount.count){ %> +
  • <%= wordcount(element.content) %>
  • + <% } %> +
+
+
- <%}%> + <%if(element.excerpt){%> +
+ <%- element.excerpt %> +
+ <%}%> + <% } %>
<% }) %> diff --git a/package/hexo-theme-async/source/css/_components/timeline.less b/package/hexo-theme-async/source/css/_components/timeline.less index 89311962..7bcfe3ff 100644 --- a/package/hexo-theme-async/source/css/_components/timeline.less +++ b/package/hexo-theme-async/source/css/_components/timeline.less @@ -92,5 +92,10 @@ margin-bottom: 0; } } + + &.less { + padding : 20px 30px; + margin-bottom: 20px; + } } } \ No newline at end of file