File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
1
<%
2
2
const home_category_limit_number = 3
3
3
const home_tag_limit_number = 5
4
- const home_post_block_datetime = theme .home ? .post_datetime === ' created' ? post .date : post .updated
5
- const home_post_block_datetime_icon = theme .home ? .post_datetime === ' created' ? ' fa-solid fa-file-circle-plus' : ' fa-solid fa-history'
4
+
6
5
const show_home_post_block_datetime = theme .home .hasOwnProperty (' post_datetime' ) ? !! theme .home .post_datetime : true
6
+ const post_datetime_value = (theme .home .hasOwnProperty (' post_datetime' ) ? theme .home ? .post_datetime : ' updated' ) || ' updated'
7
+
8
+ const post_datetime_split_list = post_datetime_value? .split (' ||' )
9
+ const post_datetime_type = post_datetime_split_list[0 ]? .trim ()? .toLowerCase ()
10
+ const post_datetime_icon = post_datetime_split_list[1 ]? .trim ()? .toLowerCase ()
11
+
12
+ const post_datetime_created_icon = post_datetime_icon || ' fa-solid fa-file-circle-plus'
13
+ const post_datetime_updated_icon = post_datetime_icon || ' fa-solid fa-history'
14
+
15
+ const home_post_block_datetime_icon = post_datetime_type === ' created' ? post_datetime_created_icon : post_datetime_updated_icon
16
+ const home_post_block_datetime = post_datetime_type === ' created' ? post .date : post .updated
7
17
% >
8
18
9
19
< div class = " post-meta-info-container border-box <%= page_type %>" >
You can’t perform that action at this time.
0 commit comments