chore: 适配
This commit is contained in:
		
							parent
							
								
									e12c10ca27
								
							
						
					
					
						commit
						869aa61d4b
					
				
							
								
								
									
										121
									
								
								settings.yaml
									
									
									
									
									
								
							
							
						
						
									
										121
									
								
								settings.yaml
									
									
									
									
									
								
							| @ -197,12 +197,54 @@ spec: | |||||||
|               label:  模块化(左侧) |               label:  模块化(左侧) | ||||||
|             - value: 'module-right' |             - value: 'module-right' | ||||||
|               label:  模块化(右侧) |               label:  模块化(右侧) | ||||||
| #        - $formkit: text |         - $formkit: repeater | ||||||
| #          name: module_links |           name: carousel_options | ||||||
| #              label:  模块化布局链接 |           label: 首页大图轮播选项 | ||||||
| #      type: textarea |           children: | ||||||
| #          placeholder: '标签|文字说明|是否新界面打开(true/false)|背景图链接|跳转链接地址' |             - $formkit: text | ||||||
| #          help: '以标签|文字说明|是否新界面打开(true/false)|背景图链接|跳转链接地址格式填写内容,一行表示一个模块链接,可填写 1~6 个链接。' |               name: title | ||||||
|  |               label: 标题 | ||||||
|  |             - $formkit: text | ||||||
|  |               name: url | ||||||
|  |               label: 地址 | ||||||
|  |             - $formkit: attachment | ||||||
|  |               name: image | ||||||
|  |               label: 背景图 | ||||||
|  |             - $formkit: radio | ||||||
|  |               name: target | ||||||
|  |               label:  打开方式 | ||||||
|  |               value: '_blank' | ||||||
|  |               options: | ||||||
|  |                 - value: '_blank' | ||||||
|  |                   label:  新窗口 | ||||||
|  |                 - value: '_self' | ||||||
|  |                   label:  原窗口 | ||||||
|  |         - $formkit: repeater | ||||||
|  |           name: module_options | ||||||
|  |           label: 模块化布局选项 | ||||||
|  |           help: 可填写 1~6 个链接。 | ||||||
|  |           children: | ||||||
|  |             - $formkit: text | ||||||
|  |               name: tag | ||||||
|  |               label: 标签 | ||||||
|  |             - $formkit: text | ||||||
|  |               name: title | ||||||
|  |               label: 标题 | ||||||
|  |             - $formkit: text | ||||||
|  |               name: url | ||||||
|  |               label: 地址 | ||||||
|  |             - $formkit: attachment | ||||||
|  |               name: image | ||||||
|  |               label: 背景图 | ||||||
|  |             - $formkit: radio | ||||||
|  |               name: target | ||||||
|  |               label:  打开方式 | ||||||
|  |               value: '_blank' | ||||||
|  |               options: | ||||||
|  |                 - value: '_blank' | ||||||
|  |                   label:  新窗口 | ||||||
|  |                 - value: '_self' | ||||||
|  |                   label:  原窗口 | ||||||
|         - $formkit: radio |         - $formkit: radio | ||||||
|           name: left_sidebar_sticky |           name: left_sidebar_sticky | ||||||
|           label:  左侧边栏悬浮 |           label:  左侧边栏悬浮 | ||||||
| @ -472,15 +514,9 @@ spec: | |||||||
|           label: 侧边栏展示 |           label: 侧边栏展示 | ||||||
|           help: 配置侧边栏展示方式,三列布局时不能在右侧显示音乐模块。 |           help: 配置侧边栏展示方式,三列布局时不能在右侧显示音乐模块。 | ||||||
|           value: |           value: | ||||||
|             - name: notice |             - type: notice | ||||||
|               position: left |               position: left | ||||||
|               hide: is-not-hidden |               hide: is-not-hidden | ||||||
|             - name: notice |  | ||||||
|               position: right |  | ||||||
|               hide: is-not-hidden |  | ||||||
|             - name: notice |  | ||||||
|               position: right |  | ||||||
|               hide: is-not-hidden |  | ||||||
|           children: |           children: | ||||||
|             - $formkit: select |             - $formkit: select | ||||||
|               name: type |               name: type | ||||||
| @ -544,6 +580,7 @@ spec: | |||||||
|           name: color_character |           name: color_character | ||||||
|           label: 侧边栏信息-彩字内容 |           label: 侧边栏信息-彩字内容 | ||||||
|           placeholder: 请输入彩字内容 |           placeholder: 请输入彩字内容 | ||||||
|  |           rows: 4 | ||||||
|           help: "按行输入彩字消息内容,一行一条。" |           help: "按行输入彩字消息内容,一行一条。" | ||||||
|         - $formkit: text |         - $formkit: text | ||||||
|           name: profile_location |           name: profile_location | ||||||
| @ -554,39 +591,31 @@ spec: | |||||||
|           label: 侧边栏信息-主题按钮 |           label: 侧边栏信息-主题按钮 | ||||||
|           placeholder: '按钮名称|按钮地址' |           placeholder: '按钮名称|按钮地址' | ||||||
|           help: '需要按钮名称和按钮地址两个参数,参数间用 “|” 分隔,放空则不显示主题按钮。' |           help: '需要按钮名称和按钮地址两个参数,参数间用 “|” 分隔,放空则不显示主题按钮。' | ||||||
|         - $formkit: text |         - $formkit: repeater | ||||||
|           name: social_github |           name: custom_options | ||||||
|           label: 侧边栏信息-Github |           label: 社交渠道 | ||||||
|           placeholder: '请输入 Github 用户名' |           help: 图标目前仅支持 FontAwesome 4.7。 | ||||||
|         - $formkit: text |           value: | ||||||
|           name: social_qq |             - name: QQ聊天 | ||||||
|           label: 侧边栏信息-QQ |               icon: 'fa-qq' | ||||||
|           placeholder: '请输入 QQ 号' |               url: tencent://message/?uin=${qq}&Site=&Menu=yes | ||||||
|         - $formkit: text |             - name: 给我发邮件 | ||||||
|           name: social_weibo |               icon: 'fa-envelope' | ||||||
|           label: 侧边栏信息-微博 |               url: mailto:邮箱地址 | ||||||
|           placeholder: '请输入微博用户名' |           children: | ||||||
|         - $formkit: text |             - $formkit: text | ||||||
|           name: social_twitter |               name: name | ||||||
|           label: 侧边栏信息-Twitter |               label: 名称 | ||||||
|           placeholder: '请输入 Twitter 用户名' |               value: "" | ||||||
|         - $formkit: text |             - $formkit: text | ||||||
|           name: social_facebook |               name: icon | ||||||
|           label: 侧边栏信息-Facebook |               label: 图标 | ||||||
|           placeholder: '请输入 Facebook 用户名' |               value: "" | ||||||
|         - $formkit: text |             - $formkit: textarea | ||||||
|           name: social_email |               rows: 2 | ||||||
|           label: '侧边栏信息-邮箱' |               name: url | ||||||
|           placeholder: '请输入邮箱地址' |               label: 地址 | ||||||
|         - $formkit: text |               value: "" | ||||||
|           name: social_telegram |  | ||||||
|           label: 侧边栏信息-Telegram |  | ||||||
|           placeholder: '请输入 Telegram 用户名' |  | ||||||
|         - $formkit: textarea |  | ||||||
|           name: custom_social_options |  | ||||||
|           label: 侧边栏信息-自定义社交渠道选项 |  | ||||||
|           placeholder: "名称|图标|链接地址" |  | ||||||
|           help: 一行表示一个社交渠道,每个社交渠道需要名称、图标和链接地址三个参数,参数之间使用 “|” 分隔,主题内置图标采用 <a href="https://fontawesome.uihtm.com/icons.html" target="_blank">FontAwesome 4.7</a>'。 |  | ||||||
|         - $formkit: textarea |         - $formkit: textarea | ||||||
|           name: notice_content |           name: notice_content | ||||||
|           label: 侧边栏公告-博客公告 |           label: 侧边栏公告-博客公告 | ||||||
|  | |||||||
| @ -14,7 +14,7 @@ | |||||||
|           <li th:text="${category.spec.displayName}"></li> |           <li th:text="${category.spec.displayName}"></li> | ||||||
|         </ul> |         </ul> | ||||||
|       </div> |       </div> | ||||||
|       <th:block th:replace="~{main/article_list :: articleList (${posts.items}, false)}"/> |       <th:block th:replace="~{main/article_list :: articleList (${posts.items})}"/> | ||||||
|       <th:block th:replace="~{main/pagination :: pagination (${posts}, ${category.status.permalink})}"/> |       <th:block th:replace="~{main/pagination :: pagination (${posts}, ${category.status.permalink})}"/> | ||||||
|     </th:block> |     </th:block> | ||||||
|   </th:block> |   </th:block> | ||||||
|  | |||||||
| @ -1,9 +1,8 @@ | |||||||
| <th:block xmlns:th="https://www.thymeleaf.org"> | <th:block xmlns:th="https://www.thymeleaf.org"> | ||||||
|     <script th:src="@{/assets/js/utils.min.js(mew=${theme.spec.version})}"></script> |     <script th:src="@{/assets/js/utils.min.js(mew=${theme.spec.version})}"></script> | ||||||
|     <script th:src="@{/assets/js/btoc.min.js(mew=${theme.spec.version})}"></script> |     <script th:src="@{/assets/js/btoc.min.js(mew=${theme.spec.version})}"></script> | ||||||
|     <!--<#if is_carousel??>--> |     <script th:if="${isFirstIndex && !#strings.isEmpty(theme.config.basic_style.carousel_options)}" data-pjax | ||||||
|     <!--    <script data-pjax th:src="@{/assets/lib/swiper@8.4.6/swiper-bundle.min.js}"></script>--> |             th:src="@{/assets/lib/swiper@8.4.6/swiper-bundle.min.js}"></script> | ||||||
|     <!--</#if>--> |  | ||||||
|     <script th:src="@{/assets/js/common.min.js(mew=${theme.spec.version})}"></script> |     <script th:src="@{/assets/js/common.min.js(mew=${theme.spec.version})}"></script> | ||||||
| 
 | 
 | ||||||
|     <th:block th:if="${isPost}"> |     <th:block th:if="${isPost}"> | ||||||
|  | |||||||
| @ -1,6 +1,7 @@ | |||||||
| <!DOCTYPE html> | <!DOCTYPE html> | ||||||
| <th:block xmlns:th="https://www.thymeleaf.org" | <th:block xmlns:th="https://www.thymeleaf.org" | ||||||
|           th:insert="~{common/layout :: layout (title = ${site.title}, canonical = ${site.url}, content = ~{::content}, isPost = false)}"> |           th:insert="~{common/layout :: layout (title = ${site.title}, canonical = ${site.url}, content = ~{::content}, isPost = false)}" | ||||||
|  |           th:with="isFirstIndex = ${posts.first}"> | ||||||
|   <th:block th:fragment="content" th:with="isEmpty = ${#lists.isEmpty(posts)}"> |   <th:block th:fragment="content" th:with="isEmpty = ${#lists.isEmpty(posts)}"> | ||||||
|     <div th:if="${isEmpty}" class="card card-empty"> |     <div th:if="${isEmpty}" class="card card-empty"> | ||||||
|       <i class="fa fa-inbox"></i> |       <i class="fa fa-inbox"></i> | ||||||
| @ -8,91 +9,63 @@ | |||||||
|     </div> |     </div> | ||||||
|     <th:block th:unless="${isEmpty}"> |     <th:block th:unless="${isEmpty}"> | ||||||
|       <th:block th:replace="~{::firstIndex}"/> |       <th:block th:replace="~{::firstIndex}"/> | ||||||
|       <th:block th:replace="~{main/article_list :: articleList (${posts.items}, ${posts.first})}"/> |       <th:block th:replace="~{main/article_list :: articleList (${posts.items})}"/> | ||||||
|       <th:block th:replace="~{main/pagination :: pagination (${posts}, '/index')}"/> |       <th:block th:replace="~{main/pagination :: pagination (${posts}, '/index')}"/> | ||||||
|     </th:block> |     </th:block> | ||||||
|   </th:block> |   </th:block> | ||||||
| 
 | 
 | ||||||
|   <th:block th:if="${posts.first}" th:fragment="firstIndex"> |   <th:block th:if="${posts.first}" th:fragment="firstIndex" | ||||||
|     <th:block th:replace="~{::carousel}"/> |             th:with="moduleSize = ${#lists.size(theme.config.basic_style.module_options)}, isModule = ${(theme.config.basic_style.sidebar_column=='module-left' || theme.config.basic_style.sidebar_column=='module-right') && moduleSize > 0}"> | ||||||
|  |     <th:block th:if="${isModule}"> | ||||||
|  |       <div class="model model-index"> | ||||||
|  |         <th:block th:replace="~{::carousel}"/> | ||||||
|  |         <div class="model model-index-side"> | ||||||
|  |           <th:block th:each="index : ${#numbers.sequence(0, 1)}"> | ||||||
|  |             <th:block th:if="${index < moduleSize}"> | ||||||
|  |               <th:block th:replace="~{::buildModule (${theme.config.basic_style.module_options.get(index)})}"/> | ||||||
|  |             </th:block> | ||||||
|  |           </th:block> | ||||||
|  |         </div> | ||||||
|  |       </div> | ||||||
|  |       <div th:if="${moduleSize > 2}" class="'model model-attach model-attach-' + ${moduleSize - 2}"> | ||||||
|  |         <th:block th:each="index : ${#numbers.sequence(2, 5)}"> | ||||||
|  |           <th:block th:if="${index < moduleSize}"> | ||||||
|  |             <th:block th:replace="~{::buildModule (${theme.config.basic_style.module_options.get(index)})}"/> | ||||||
|  |           </th:block> | ||||||
|  |         </th:block> | ||||||
|  |       </div> | ||||||
|  |     </th:block> | ||||||
|  |     <th:block th:unless="${isModule}"> | ||||||
|  |       <th:block th:replace="~{::carousel}"/> | ||||||
|  |     </th:block> | ||||||
|     <div th:if="${!#strings.isEmpty(theme.config.basic_info.index_inform)}" class="card tips brightness" |     <div th:if="${!#strings.isEmpty(theme.config.basic_info.index_inform)}" class="card tips brightness" | ||||||
|          th:text="${theme.config.basic_info.index_inform}"></div> |          th:text="${theme.config.basic_info.index_inform}"></div> | ||||||
|   </th:block> |   </th:block> | ||||||
| 
 | 
 | ||||||
|   <th:block th:fragment="carousel"> |   <th:block th:fragment="buildModule (option)"> | ||||||
|  |     <a th:class="'card widget brightness ' + ${option.title != ''? 'bg-shadow' : ''}" | ||||||
|  |        th:target="${option.target}" | ||||||
|  |        th:style="'background-image: url(' + ${option.image} + ')'" | ||||||
|  |        th:href="${option.url}"> | ||||||
|  |       <div class="title" th:href="${option.title}"></div> | ||||||
|  |       <div class="tag" th:text="${option.tag}"></div> | ||||||
|  |     </a> | ||||||
|   </th:block> |   </th:block> | ||||||
| </th:block> | 
 | ||||||
| <!--    <#if is_first_index!false>--> |   <th:block th:fragment="carousel"> | ||||||
| <!--        <#local carousel_content>--> |     <div th:if="${!#lists.isEmpty(theme.config.basic_style.carousel_options)}" class="card widget swiper"> | ||||||
| <!--          <#list posts as post>--> |       <div class="swiper-wrapper"> | ||||||
| <!--              <#if post.topPriority!=1>--> |         <a th:each="option :${theme.config.basic_style.carousel_options}" class="swiper-slide bg-shadow cover-image" | ||||||
| <!--                  <#break>--> |            th:style="'background-image: url(' + ${option.image} + ')'" th:target="${option.target}" | ||||||
| <!--              </#if>--> |            th:href="${option.url}"> | ||||||
| <!--              <#if !post.metas?? || (post.metas.index_carousel!'false')=='false'>--> |           <div class="swiper-slide-details" data-swiper-parallax="200" data-swiper-parallax-duration="600"> | ||||||
| <!--                  <#continue>--> |             <p class="swiper-slide-details-title" th:text="${option.title}"></p> | ||||||
| <!--              </#if>--> |           </div> | ||||||
| <!--              <#local thumbnail = (post.thumbnail?? && post.thumbnail!='')?then(post.thumbnail!, (settings.default_thumbnail?? && settings.default_thumbnail!='')?then(settings.default_thumbnail + settings.default_thumbnail?contains('?')?then("&","?") + "postId=" + post.id?c, ''))>--> |         </a> | ||||||
| <!--              <#if thumbnail != ''>--> |       </div> | ||||||
| <!--                <a class="swiper-slide bg-shadow cover-image" style="background-image: url(${thumbnail})" href="${post.fullPath!}">--> |       <div class="swiper-pagination"></div> | ||||||
| <!--                    <div class="swiper-slide-details" data-swiper-parallax="200" data-swiper-parallax-duration="600">--> |       <div class="swiper-button-prev"></div> | ||||||
| <!--                        <p class="swiper-slide-details-title">${post.title!}</p>--> |       <div class="swiper-button-next"></div> | ||||||
| <!--                        <ul class="breadcrumb">--> |     </div> | ||||||
| <!--                            <li><@global.timeline datetime=post.createTime/></li>--> |   </th:block> | ||||||
| <!--                            <li><i class="fa fa-eye"></i>${post.visits?c}</li>--> | </th:block> | ||||||
| <!--                            <#if !post.disallowComment!false>--> |  | ||||||
| <!--                                <li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if>--> |  | ||||||
| <!--                            <li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li>--> |  | ||||||
| <!--                            <#local heat= (24+post.visits*0.1+post.likes*2+post.commentCount*3) />--> |  | ||||||
| <!--                            <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) />--> |  | ||||||
| <!--                            <li style="color: ${heatColor}">${heat}℃</li>--> |  | ||||||
| <!--                        </ul>--> |  | ||||||
| <!--                    </div>--> |  | ||||||
| <!--                </a>--> |  | ||||||
| <!--              </#if>--> |  | ||||||
| <!--          </#list>--> |  | ||||||
| <!--        </#local>--> |  | ||||||
| <!--        <#if settings.sidebar_column=='module-left' || settings.sidebar_column=='module-right'>--> |  | ||||||
| <!--          <#if settings.module_links?? && settings.module_links?trim != ''>--> |  | ||||||
| <!--              <#local module_links=settings.module_links?split('\n')>--> |  | ||||||
| <!--          <#else>--> |  | ||||||
| <!--              <#local module_links=[]>--> |  | ||||||
| <!--              <#list 0..1 as i>--> |  | ||||||
| <!--                <#local post=posts[i]>--> |  | ||||||
| <!--                <#local module_links=module_links+["推荐|${post.title!}|false|${post.thumbnail!}|${post.fullPath!}"]>--> |  | ||||||
| <!--              </#list>--> |  | ||||||
| <!--          </#if>--> |  | ||||||
| <!--          <div class="model model-index">--> |  | ||||||
| <!--            <div class="card widget swiper">--> |  | ||||||
| <!--              <div class="swiper-wrapper">${carousel_content}</div>--> |  | ||||||
| <!--              <div class="swiper-pagination"></div>--> |  | ||||||
| <!--              <div class="swiper-button-prev"></div>--> |  | ||||||
| <!--              <div class="swiper-button-next"></div>--> |  | ||||||
| <!--            </div>--> |  | ||||||
| <!--            <div class="model model-index-side">--> |  | ||||||
| <!--              <#list 0..1 as i>--> |  | ||||||
| <!--                <#if i < module_links?size >--> |  | ||||||
| <!--                    <@model_build module_links[i]/>--> |  | ||||||
| <!--                </#if>--> |  | ||||||
| <!--              </#list>--> |  | ||||||
| <!--            </div>--> |  | ||||||
| <!--          </div>--> |  | ||||||
| <!--            <#if module_links?size > 2 && module_links?size<=6>--> |  | ||||||
| <!--              <div class="model model-attach model-attach-${module_links?size-2}">--> |  | ||||||
| <!--                <#list 2..5 as i>--> |  | ||||||
| <!--                    <#if i < module_links?size >--> |  | ||||||
| <!--                        <@model_build module_links[i]/>--> |  | ||||||
| <!--                    </#if>--> |  | ||||||
| <!--                </#list>--> |  | ||||||
| <!--              </div>--> |  | ||||||
| <!--            </#if>--> |  | ||||||
| <!--          <#assign is_carousel=true />--> |  | ||||||
| <!--        <#elseif carousel_content != ''>--> |  | ||||||
| <!--          <div class="card widget swiper">--> |  | ||||||
| <!--            <div class="swiper-wrapper">${carousel_content}</div>--> |  | ||||||
| <!--            <div class="swiper-pagination"></div>--> |  | ||||||
| <!--            <div class="swiper-button-prev"></div>--> |  | ||||||
| <!--            <div class="swiper-button-next"></div>--> |  | ||||||
| <!--          </div>--> |  | ||||||
| <!--          <#assign is_carousel=true />--> |  | ||||||
| <!--        </#if>--> |  | ||||||
| <!--    </#if>--> |  | ||||||
| @ -1,5 +1,5 @@ | |||||||
| <th:block xmlns:th="https://www.thymeleaf.org" | <th:block xmlns:th="https://www.thymeleaf.org" | ||||||
|      th:fragment="articleList (posts, isFirstIndex)"> |           th:fragment="articleList (posts)"> | ||||||
|   <th:block th:each="post : ${posts}" |   <th:block th:each="post : ${posts}" | ||||||
|             th:with="thumbnail = ${#strings.isEmpty(post.spec.cover) ? #strings.isEmpty(theme.config.post.default_thumbnail) ? '' : theme.config.post.default_thumbnail + '?id=' + postStat.index : post.spec.cover}, |             th:with="thumbnail = ${#strings.isEmpty(post.spec.cover) ? #strings.isEmpty(theme.config.post.default_thumbnail) ? '' : theme.config.post.default_thumbnail + '?id=' + postStat.index : post.spec.cover}, | ||||||
|             thumbnail_mode = ${(theme.config.post.top_thumbnail_mode == 'grid' || (!post.spec.pinned && theme.config.post.thumbnail_mode == 'grid'))? 'grid' : !#strings.isEmpty(post.metadata.annotations.get('thumbnail_mode'))? post.metadata.annotations.get('thumbnail_mode') : post.spec.pinned ? theme.config.post.top_thumbnail_mode : theme.config.post.thumbnail_mode}"> |             thumbnail_mode = ${(theme.config.post.top_thumbnail_mode == 'grid' || (!post.spec.pinned && theme.config.post.thumbnail_mode == 'grid'))? 'grid' : !#strings.isEmpty(post.metadata.annotations.get('thumbnail_mode'))? post.metadata.annotations.get('thumbnail_mode') : post.spec.pinned ? theme.config.post.top_thumbnail_mode : theme.config.post.thumbnail_mode}"> | ||||||
| @ -90,13 +90,16 @@ | |||||||
|       </a> |       </a> | ||||||
|     </div> |     </div> | ||||||
| 
 | 
 | ||||||
|     <a th:if="${post.spec.pinned && thumbnail_mode == 'fold'}" class="card widget card-fold" href="${post.fullPath!}"> |     <a th:if="${post.spec.pinned && thumbnail_mode == 'fold'}" class="card widget card-fold" | ||||||
|  |        th:href="${post.status.permalink}"> | ||||||
|       <h2 class="title"><span class="top">置顶</span> |       <h2 class="title"><span class="top">置顶</span> | ||||||
|         <p th:text="${post.spec.title}"></p></h2> |         <p th:text="${post.spec.title}"></p></h2> | ||||||
|       <p th:text="${#dates.format(post.spec.publishTime, 'yyyy-MM-dd')}"></p> |       <p th:text="${#dates.format(post.spec.publishTime, 'yyyy-MM-dd')}"></p> | ||||||
|     </a> |     </a> | ||||||
| 
 | 
 | ||||||
|     <div th:if="${(#strings.isEmpty(thumbnail) && !(post.spec.pinned && thumbnail_mode == 'fold')) || #strings.isEmpty(thumbnail_mode) ||  thumbnail_mode == 'default'}" class="card widget"> |     <div | ||||||
|  |       th:if="${(#strings.isEmpty(thumbnail) && !(post.spec.pinned && thumbnail_mode == 'fold')) || #strings.isEmpty(thumbnail_mode) ||  thumbnail_mode == 'default'}" | ||||||
|  |       class="card widget"> | ||||||
|       <a th:if="${!#strings.isEmpty(thumbnail)}" class="thumbnail" th:href="${post.status.permalink}"> |       <a th:if="${!#strings.isEmpty(thumbnail)}" class="thumbnail" th:href="${post.status.permalink}"> | ||||||
|         <div class="thumbnail-image" th:style="'background-image: url(' + ${thumbnail} + ')'"> |         <div class="thumbnail-image" th:style="'background-image: url(' + ${thumbnail} + ')'"> | ||||||
|         </div> |         </div> | ||||||
| @ -127,60 +130,33 @@ | |||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
|   </th:block> |   </th:block> | ||||||
| <th:block/> |   <div th:if="${theme.config.post.top_thumbnail_mode == 'grid' || theme.config.post.thumbnail_mode == 'grid'}" | ||||||
| 
 |        class="column-main-grid"> | ||||||
| <!--<#elseif thumbnail_mode == "grid">--> |     <th:block th:each="post : ${posts}" | ||||||
| <!--<div class="column-main-grid">--> |               th:with="thumbnail = ${#strings.isEmpty(post.spec.cover) ? #strings.isEmpty(theme.config.post.default_thumbnail) ? '' : theme.config.post.default_thumbnail + '?id=' + postStat.index : post.spec.cover}"> | ||||||
| <!--  <#list post_index..(posts?size-1) as i>--> |       <div | ||||||
| <!--  <#local gradPost=posts[i]>--> |         th:if="${(theme.config.post.top_thumbnail_mode == 'grid' || (!post.spec.pinned && theme.config.post.thumbnail_mode == 'grid'))}" | ||||||
| <!--  <#local thumbnail = (gradPost.thumbnail?? && gradPost.thumbnail!='')?then(gradPost.thumbnail!,--> |         class="card widget"> | ||||||
| <!--  (settings.default_thumbnail?? && settings.default_thumbnail!='')?then(settings.default_thumbnail +--> |         <a class="thumbnail" th:href="${post.status.permalink}"> | ||||||
| <!--  settings.default_thumbnail?contains('?')?then("&","?") + "postId=" + gradPost.id?c, ''))>--> |           <div class="thumbnail-image" th:style="'background-image: url(' + ${thumbnail} + ')'"></div> | ||||||
| <!--  <#if is_first_index?? && thumbnail != '' && !(gradPost.topPriority!=1 || !gradPost.metas?? ||--> |         </a> | ||||||
| <!--  (gradPost.metas.index_carousel!'false')=='false')>--> |         <ul class="breadcrumb"> | ||||||
| <!--  <#continue>--> |           <li th:text="${#dates.format(post.spec.publishTime, 'yyyy-MM-dd HH:mm')}"></li> | ||||||
| <!--</#if>--> |           <li><i class="fa fa-eye"></i>[[${post.stats.visit}]]</li> | ||||||
| <!--<div class="card widget">--> |           <li th:if="${post.spec.allowComment}" class="is-hidden-mobile"><i class="fa fa-comments-o"></i>[[${post.stats.comment}]] | ||||||
| <!--  <a class="thumbnail" href="${gradPost.fullPath!}">--> |           </li> | ||||||
| <!--    <div class="thumbnail-image" style="background-image: url(${thumbnail!})">--> |           <li class="is-hidden-mobile"><i class="fa fa-thumbs-o-up"></i>[[${post.stats.upvote}]]</li> | ||||||
| <!--    </div>--> |           <li | ||||||
| <!--  </a>--> |             th:with="heat= ${24+post.stats.visit*0.1+post.stats.upvote*2+post.stats.comment*3}, heatColor= '#'+${(heat < 37)? 'ffa87e' : (heat < 120)? 'fb734a' : 'e0081c'}" | ||||||
| <!--  <ul class="breadcrumb">--> |             th:style="'color: ' + ${heatColor}">[[${heat}]]℃ | ||||||
| <!--    <li><@global.timeline datetime=gradPost.createTime/></li>--> |           </li> | ||||||
| <!--    <li><i class="fa fa-eye"></i>${gradPost.visits?c}</li>--> |         </ul> | ||||||
| <!--    <#if !gradPost.disallowComment!false>--> |         <h2 class="title"> | ||||||
| <!--    <li class="is-hidden-mobile"><i class="fa fa-comments-o"></i>${gradPost.commentCount?c}</li>--> |           <span class="top" th:if="${post.spec.pinned}">置顶</span> | ||||||
| <!--  </--> |           <a | ||||||
| <!--  #if>--> |             th:href="${post.status.permalink}" th:text="${post.spec.title}"></a> | ||||||
| <!--  <li class="is-hidden-mobile"><i class="fa fa-thumbs-o-up"></i>${gradPost.likes?c}</li>--> |         </h2> | ||||||
| <!--  <#local heat= (24+gradPost.visits*0.1+gradPost.likes*2+gradPost.commentCount*3) />--> |       </div> | ||||||
| <!--  <#local heatColor= '#'+(heat < 37)?string('ffa87e',(heat < 120)?string('fb734a','e0081c')) />--> |     </th:block> | ||||||
| <!--  <li style="color: ${heatColor}">${heat}℃</li>--> |   </div> | ||||||
| <!--  </ul>--> | </th:block> | ||||||
| <!--  <h2 class="title">--> |  | ||||||
| <!--    <#if gradPost.topPriority==1><span class="top">置顶</span></#if><a--> |  | ||||||
| <!--  href="${gradPost.fullPath!}">${gradPost.title!}</a>--> |  | ||||||
| <!--  </h2>--> |  | ||||||
| <!--</div>--> |  | ||||||
| <!--</#list>--> |  | ||||||
| <!--</div>--> |  | ||||||
| <!--<#break/>--> |  | ||||||
| <!--<#else>--> |  | ||||||
| <!--</#if>--> |  | ||||||
| <!--</#list>--> |  | ||||||
| <!--</div>--> |  | ||||||
| <!--<#macro model_build content>--> |  | ||||||
| <!--    <#if content == ''>--> |  | ||||||
| <!--      <#return>--> |  | ||||||
| <!--    </#if>--> |  | ||||||
| <!--    <#local content_option=content?split('|')>--> |  | ||||||
| <!--    <#local tag=(content_option[0]!'')?trim>--> |  | ||||||
| <!--    <#local content=((content_option[1]!'')?trim != '')?then('<div class="title">${content_option[1]?trim}</div>', '')>--> |  | ||||||
| <!--    <#local target=((content_option[2]!'false')?trim == 'true')?then('target="_blank"', '')>--> |  | ||||||
| <!--    <#local imageUrl=((content_option[3]!'')?trim != '')?then('style="background-image: url(${content_option[3]?trim})"', '')>--> |  | ||||||
| <!--    <#local targetUrl=((content_option[4]!'')?trim != '')?then('href="${content_option[4]?trim}"', '')>--> |  | ||||||
| <!--  <a class="card widget brightness ${(content!='')?then('bg-shadow', '')}" ${target} ${imageUrl} ${targetUrl}>${content}<div class="tag">${tag}</div></a>--> |  | ||||||
| <!--</#macro>--> |  | ||||||
| <!--<#macro article_list posts>--> |  | ||||||
| 
 |  | ||||||
| <!--</#macro>--> |  | ||||||
| @ -14,7 +14,7 @@ | |||||||
|           <li th:text="${tag.spec.displayName}"></li> |           <li th:text="${tag.spec.displayName}"></li> | ||||||
|         </ul> |         </ul> | ||||||
|       </div> |       </div> | ||||||
|       <th:block th:replace="~{main/article_list :: articleList (${posts.items}, false)}"/> |       <th:block th:replace="~{main/article_list :: articleList (${posts.items})}"/> | ||||||
|       <th:block th:replace="~{main/pagination :: pagination (${posts}, ${tag.status.permalink})}"/> |       <th:block th:replace="~{main/pagination :: pagination (${posts}, ${tag.status.permalink})}"/> | ||||||
|     </th:block> |     </th:block> | ||||||
|   </th:block> |   </th:block> | ||||||
|  | |||||||
| @ -1,99 +1,55 @@ | |||||||
| <div xmlns:th="https://www.thymeleaf.org" | <div xmlns:th="https://www.thymeleaf.org" | ||||||
|      th:fragment="widget (hide)" |      th:fragment="widget (hide)" | ||||||
|      th:class="'card widget profile ' + ${hide}"> |      th:class="'card widget profile ' + ${hide}"> | ||||||
|     <div class="card-content"> |   <div class="card-content"> | ||||||
|         <nav class="level"> |     <nav class="level"> | ||||||
|             <div class="level-item" style="flex-direction: column;"> |       <div class="level-item" style="flex-direction: column;"> | ||||||
|               <figure class="image"> |         <figure class="image"> | ||||||
|                 <img class="avatar" th:src="${contributor.avatar}" th:alt="${contributor.displayName}"> |           <img class="avatar" th:src="${contributor.avatar}" th:alt="${contributor.displayName}"> | ||||||
|               </figure> |         </figure> | ||||||
|               <p class="nickname" th:text="${contributor.displayName}"></p> |         <p class="nickname" th:text="${contributor.displayName}"></p> | ||||||
|               <p class="motto spark-input" th:text="${contributor.bio}"></p> |         <p class="motto spark-input" th:text="${contributor.bio}"></p> | ||||||
|                 <p th:if="${!#strings.isEmpty(theme.config.sidebar.profile_location)}" class="address"> |         <p th:if="${!#strings.isEmpty(theme.config.sidebar.profile_location)}" class="address"> | ||||||
|                     <i class="fa fa-map-marker"></i> |           <i class="fa fa-map-marker"></i> | ||||||
|                     <span th:text="${theme.config.sidebar.profile_location}"></span> |           <span th:text="${theme.config.sidebar.profile_location}"></span> | ||||||
|                 </p> |         </p> | ||||||
|             </div> |       </div> | ||||||
|         </nav> |     </nav> | ||||||
|         <nav class="level"> |     <nav class="level"> | ||||||
|             <div class="level-item"> |       <div class="level-item"> | ||||||
|                 <div> |         <div> | ||||||
|                     <p class="heading">文章</p> |           <p class="heading">文章</p> | ||||||
|                     <p class="value" th:text="${stats.post}"></p> |           <p class="value" th:text="${stats.post}"></p> | ||||||
|                 </div> |         </div> | ||||||
|             </div> |       </div> | ||||||
|             <div class="level-item has-text-centered is-marginless"> |       <div class="level-item has-text-centered is-marginless"> | ||||||
|                 <div> |         <div> | ||||||
|                     <p class="heading">分类</p> |           <p class="heading">分类</p> | ||||||
|                     <p class="value" th:text="${stats.category}"></p> |           <p class="value" th:text="${stats.category}"></p> | ||||||
|                 </div> |         </div> | ||||||
|             </div> |       </div> | ||||||
|             <div class="level-item"> |       <div class="level-item"> | ||||||
|                 <div> |         <div> | ||||||
|                     <p class="heading">评论</p> |           <p class="heading">评论</p> | ||||||
|                     <p class="value" th:text="${stats.comment}"></p> |           <p class="value" th:text="${stats.comment}"></p> | ||||||
|                 </div> |         </div> | ||||||
|             </div> |       </div> | ||||||
|         </nav> |     </nav> | ||||||
| <!--        <#if settings.profile_theme_button?? && settings.profile_theme_button!=''>--> |     <div th:if="${!#strings.isEmpty(theme.config.sidebar.profile_theme_button)}" class="level" | ||||||
| <!--            <#assign profile_theme_button=settings.profile_theme_button?split('|')>--> |          th:with="content = ${#strings.arraySplit(theme.config.sidebar.profile_theme_button,'|')}"> | ||||||
| <!--            <div class="level">--> |       <a class="level-item button is-link is-rounded" | ||||||
| <!--                <a class="level-item button is-link is-rounded" href="${profile_theme_button[1]!}" target="_blank" rel="nofollow noopener noreferrer">${profile_theme_button[0]!}</a>--> |          th:href="${content[1]}" target="_blank" rel="nofollow noopener noreferrer" | ||||||
| <!--            </div>--> |          th:text="${content[0]}"></a> | ||||||
| <!--        </#if>--> |  | ||||||
| <!--        <div class="level"><#if settings.social_github?? && settings.social_github!=''>--> |  | ||||||
| <!--                <a class="level-item button is-transparent" target="_blank" title="Github主页" href="https://github.com/${settings.social_github}" rel="nofollow noopener noreferrer">--> |  | ||||||
| <!--                    <i class="fa fa-github"></i>--> |  | ||||||
| <!--                </a>--> |  | ||||||
| <!--            </#if>--> |  | ||||||
| <!--            <#if settings.social_qq?? && settings.social_qq!=''>--> |  | ||||||
| <!--                <a class="level-item button is-transparent" target="_blank" title="QQ聊天" href="tencent://message/?uin=${settings.social_qq}&Site=&Menu=yes" rel="nofollow noopener noreferrer">--> |  | ||||||
| <!--                    <i class="fa fa-qq"></i>--> |  | ||||||
| <!--                </a>--> |  | ||||||
| <!--            </#if>--> |  | ||||||
| <!--            <#if settings.social_weibo?? && settings.social_weibo!=''>--> |  | ||||||
| <!--                <a class="level-item button is-transparent" target="_blank" title="Weibo" href="https://weibo.com/${settings.social_weibo}" rel="nofollow noopener noreferrer">--> |  | ||||||
| <!--                    <i class="fa fa-weibo"></i>--> |  | ||||||
| <!--                </a>--> |  | ||||||
| <!--            </#if>--> |  | ||||||
| <!--            <#if settings.social_twitter?? && settings.social_twitter!=''>--> |  | ||||||
| <!--                <a class="level-item button is-transparent" target="_blank" title="Twitter" href="https://twitter.com/${settings.social_twitter}" rel="nofollow noopener noreferrer">--> |  | ||||||
| <!--                    <i class="fa fa-twitter"></i>--> |  | ||||||
| <!--                </a>--> |  | ||||||
| <!--            </#if>--> |  | ||||||
| <!--            <#if settings.social_facebook?? && settings.social_facebook!=''>--> |  | ||||||
| <!--                <a class="level-item button is-transparent" target="_blank" title="Facebook" href="https://www.facebook.com/${settings.social_facebook}" rel="nofollow noopener noreferrer">--> |  | ||||||
| <!--                    <i class="fa fa-facebook"></i>--> |  | ||||||
| <!--                </a>--> |  | ||||||
| <!--            </#if>--> |  | ||||||
| <!--            <#if settings.social_email?? && settings.social_email!=''>--> |  | ||||||
| <!--                <a class="level-item button is-transparent" target="_blank" title="给我发邮件" href="mailto:${settings.social_email}" rel="nofollow noopener noreferrer">--> |  | ||||||
| <!--                    <i class="fa fa-envelope"></i>--> |  | ||||||
| <!--                </a>--> |  | ||||||
| <!--            </#if>--> |  | ||||||
| <!--            <#if settings.social_telegram?? && settings.social_telegram!=''>--> |  | ||||||
| <!--                <a class="level-item button is-transparent" target="_blank" title="Telegram" href="https://t.me/${settings.social_telegram}" rel="nofollow noopener noreferrer">--> |  | ||||||
| <!--                    <i class="fa fa-telegram"></i>--> |  | ||||||
| <!--                </a>--> |  | ||||||
| <!--            </#if>--> |  | ||||||
| <!--            <#if settings.custom_social_options?? && settings.custom_social_options!=''>--> |  | ||||||
| <!--                <#assign custom_social_options=settings.custom_social_options?split('\n')>--> |  | ||||||
| <!--                <#list custom_social_options as custom_social_option>--> |  | ||||||
| <!--                    <#assign social_option=custom_social_option?split('|')>--> |  | ||||||
| <!--                    <#assign social_name=(social_option[0]?? && social_option[0]?trim!='')?then(social_option[0]?trim,'')>--> |  | ||||||
| <!--                    <#assign social_logo=(social_option[1]?? && social_option[1]?trim!='')?then(social_option[1]?trim,'')>--> |  | ||||||
| <!--                    <#assign social_link=(social_option[2]?? && social_option[2]?trim!='')?then(social_option[2]?trim,'')>--> |  | ||||||
| <!--                    <#if social_name!='' || social_logo!='' || social_link!=''>--> |  | ||||||
| <!--                      <a class="level-item button is-transparent" target="_blank" title="${social_name}" href="${social_link}" rel="nofollow noopener noreferrer">--> |  | ||||||
| <!--                        <i class="${social_logo}"></i>--> |  | ||||||
| <!--                      </a>--> |  | ||||||
| <!--                    </#if>--> |  | ||||||
| <!--                </#list>--> |  | ||||||
| <!--            </#if>--> |  | ||||||
| <!--            <#if settings.social_rss!true >--> |  | ||||||
| <!--                <a class="level-item button is-transparent" target="_blank" title="RSS订阅" href="${rss_url!}">--> |  | ||||||
| <!--                    <i class="fa fa-rss"></i>--> |  | ||||||
| <!--                </a>--> |  | ||||||
| <!--            </#if></div>--> |  | ||||||
|     </div> |     </div> | ||||||
|  |     <div th:if="${!#lists.isEmpty(theme.config.sidebar.custom_options)}" class="level"> | ||||||
|  |       <a th:each="option :${theme.config.sidebar.custom_options}" | ||||||
|  |          class="level-item button is-transparent" | ||||||
|  |          target="_blank" | ||||||
|  |          th:title="${option.name}" | ||||||
|  |          th:href="${option.url}" | ||||||
|  |          rel="nofollow noopener noreferrer"> | ||||||
|  |         <i th:class="'fa ' + ${option.icon}"></i> | ||||||
|  |       </a> | ||||||
|  |     </div> | ||||||
|  |   </div> | ||||||
| </div> | </div> | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user