feat(pjax): 支持配置关闭pjax
This commit is contained in:
		
							parent
							
								
									0da46f418c
								
							
						
					
					
						commit
						6e0a72ad93
					
				| @ -915,6 +915,16 @@ spec: | ||||
|               label:  开启全站离线 | ||||
|             - value: "uninstall" | ||||
|               label:  卸载 | ||||
|         - $formkit: radio | ||||
|           name: enable_pjax | ||||
|           label:  Pjax加载 | ||||
|           value: false | ||||
|           help: '使用Pjax加载可极大提升页面跳转的速度,但可能和部分插件不兼容。' | ||||
|           options: | ||||
|             - value: true | ||||
|               label:  开启 | ||||
|             - value: false | ||||
|               label:  关闭 | ||||
|         - $formkit: radio | ||||
|           name: effects_sakura_mode | ||||
|           label:  樱花飘落特效显示模式 | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| <head xmlns:th="https://www.thymeleaf.org" th:fragment="head" | ||||
| th:with="description=${isPost ? post != null ? post.status.excerpt : singlePage != null ? singlePage.status.excerpt : site.seo.description : site.seo.description}"> | ||||
|   <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}" 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 name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/> | ||||
|   <meta http-equiv="x-dns-prefetch-control" content="on"> | ||||
|  | ||||
| @ -19,9 +19,11 @@ | ||||
| 
 | ||||
|     <script th:src="@{/assets/js/mew-custom.min.js(mew=${theme.spec.version})}"></script> | ||||
| 
 | ||||
|     <script th:src="@{/assets/lib/jquery-pjax@2.0.1/jquery.pjax.min.js}"></script> | ||||
|     <script th:if="${theme.config.basic_style.load_progress != 'none'}" th:src="@{/assets/js/dprogress.min.js(mew=${theme.spec.version})}"></script> | ||||
|     <script th:src="@{/assets/js/pjax.min.js(mew=${theme.spec.version})}"></script> | ||||
|     <th:block th:if="${theme.config.enhance.enable_pjax}"> | ||||
|         <script th:src="@{/assets/lib/jquery-pjax@2.0.1/jquery.pjax.min.js}"></script> | ||||
|         <script th:src="@{/assets/js/pjax.min.js(mew=${theme.spec.version})}"></script> | ||||
|     </th:block> | ||||
|     <script async th:src="@{/assets/lib/qmsg/qmsg.min.js}"></script> | ||||
| 
 | ||||
|     <script th:if="${isPost}" data-pjax async th:src="@{/assets/lib/fancybox@5.3.7/jquery.fancybox.min.js}"></script> | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user