chore: 适配
This commit is contained in:
		
							parent
							
								
									eab9b0e18e
								
							
						
					
					
						commit
						c696129458
					
				| @ -1,5 +1,5 @@ | |||||||
| <head xmlns:th="https://www.thymeleaf.org" th:fragment="head" | <head xmlns:th="https://www.thymeleaf.org" th:fragment="head" | ||||||
| th:with="description=${isPost ? post != null ? post.spec.excerpt.raw : singlePage.spec.excerpt.raw : site.seo.description}"> | th:with="description=${isPost ? post != null ? post.spec.excerpt.raw : singlePage != null ? singlePage.spec.excerpt.raw : site.seo.description : site.seo.description}"> | ||||||
|   <title th:text="${title + (#strings.isEmpty(site.subtitle) ? '' : '|' + site.subtitle)}"></title> |   <title th:text="${title + (#strings.isEmpty(site.subtitle) ? '' : '|' + site.subtitle)}"></title> | ||||||
|   <script th:if="${(theme.config.enhance.enable_sw != 'false')}" th:src="${(theme.config.enhance.enable_sw == 'uninstall')? #theme.assets('/assets/js/sw.min.js') + '?mew=0.0.1' : '/sw.min.js?mew=0.0.1' + theme.config.enhance.enable_sw}"></script> |   <script th:if="${(theme.config.enhance.enable_sw != 'false')}" th:src="${(theme.config.enhance.enable_sw == 'uninstall')? #theme.assets('/assets/js/sw.min.js') + '?mew=0.0.1' : '/sw.min.js?mew=0.0.1' + theme.config.enhance.enable_sw}"></script> | ||||||
|   <meta charset="utf-8"/> |   <meta charset="utf-8"/> | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| <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> | ||||||
|     <script th:if="${isFirstIndex && !#strings.isEmpty(theme.config.basic_style.carousel_options)}" data-pjax |     <script th:if="${isFirstIndex == true && !#lists.isEmpty(theme.config.basic_style.carousel_options)}" 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> | ||||||
|     <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> | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										30
									
								
								templates/error/error.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								templates/error/error.html
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,30 @@ | |||||||
|  | <!DOCTYPE html> | ||||||
|  | <th:block xmlns:th="https://www.thymeleaf.org" | ||||||
|  |           th:insert="~{common/layout :: layout (title = ${error.status + ' - ' + #strings.defaultString(error.title, 'Internal server error')}, | ||||||
|  |        canonical = ${site.url + '/' + error.status}, content = ~{::content}, isPost = true)}"> | ||||||
|  |     <th:block th:fragment="content" | ||||||
|  |     th:with="posts = ${postFinder.list(1,6)}, isEmpty = ${#lists.isEmpty(posts)}"> | ||||||
|  |         <div class="card"> | ||||||
|  |             <div class="title card-content main-title" th:text="${error.status + '错误 - ' + site.title}"></div> | ||||||
|  |         </div> | ||||||
|  |         <div class="card"> | ||||||
|  |             <div class="card-content"> | ||||||
|  |                 <div class="main-content"> | ||||||
|  |                     <div style="margin: 20px 0; text-align: center; "> | ||||||
|  |                         <i style="font-size: 7rem" th:text="${error.status}"></i> | ||||||
|  |                         <p th:if="${error.status == 404}" style="font-size: 1.4em;text-indent: 2em;">找不到网页,可能已被删除,去<a th:href='${site.url}'>首页</a>看看吧。</p> | ||||||
|  |                         <p th:unless="${error.status == 404}" style="font-size: 1.4em;text-indent: 2em;">围观群众太过热情,服务器繁忙,请稍后访问。</p> | ||||||
|  |                     </div> | ||||||
|  |                     <pre th:if="${not #strings.isEmpty(error.detail)}"><code class="|异常信息">[(${#strings.defaultString(error.title, 'Internal server error')} + ': | ||||||
|  | ' + ${error.detail})]</code></pre> | ||||||
|  |                 </div> | ||||||
|  |             </div> | ||||||
|  |         </div> | ||||||
|  |         <th:block th:if="${!isEmpty}"> | ||||||
|  |             <div class="card"> | ||||||
|  |                 <div class="title card-content main-title">最新文章推荐</div> | ||||||
|  |             </div> | ||||||
|  |             <th:block th:replace="~{main/article_list :: articleList (${posts.items})}"/> | ||||||
|  |         </th:block> | ||||||
|  |     </th:block> | ||||||
|  | </th:block> | ||||||
| @ -15,7 +15,7 @@ | |||||||
|   </th:block> |   </th:block> | ||||||
| 
 | 
 | ||||||
|   <th:block th:if="${posts.first}" th:fragment="firstIndex" |   <th:block th:if="${posts.first}" th:fragment="firstIndex" | ||||||
|             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:with="moduleSize = ${#lists.isEmpty(theme.config.basic_style.module_options) ? 0 : #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}"> |     <th:block th:if="${isModule}"> | ||||||
|       <div class="model model-index"> |       <div class="model model-index"> | ||||||
|         <th:block th:replace="~{::carousel}"/> |         <th:block th:replace="~{::carousel}"/> | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user