feat(post): 增加隐藏图片名称的配置,#26
This commit is contained in:
		
							parent
							
								
									50596ec29d
								
							
						
					
					
						commit
						7d6563a7d0
					
				| @ -453,6 +453,15 @@ spec: | ||||
|           label: 正文长图折叠 | ||||
|           placeholder: '请输入高度数值(px)' | ||||
|           help: '图片高度超出指定高度(px)后默认进行折叠,指定的高度需大于等于 400px。' | ||||
|         - $formkit: radio | ||||
|           name: show_img_name | ||||
|           label: 显示图片名称 | ||||
|           value: true | ||||
|           options: | ||||
|             - value: true | ||||
|               label: 开启 | ||||
|             - value: false | ||||
|               label: 关闭 | ||||
|         - $formkit: text | ||||
|           name: invalid_tips_day | ||||
|           label:  文章失效提示 | ||||
|  | ||||
| @ -62,7 +62,7 @@ const commonContext = { | ||||
|     $('.main-content img:not(.not-gallery)').each(function () { | ||||
|       if ($(this).parents('[data-fancybox],mew-photos').length === 0) { | ||||
|         $(this).wrap(`<div class="gallery-item"><div data-fancybox="gallery" ${this.alt ? `data-caption="${this.alt}"` : ''} href="${$(this).attr('src') | ||||
|         }"></div>${this.alt ? `<p>${this.alt}</p>` : ''}</div>`) | ||||
|         }"></div>${(this.alt && DreamConfig.show_img_name) ? `<p>${this.alt}</p>` : ''}</div>`) | ||||
|       } | ||||
|     }) | ||||
|   }, | ||||
|  | ||||
							
								
								
									
										2
									
								
								templates/assets/js/common.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								templates/assets/js/common.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -80,6 +80,7 @@ | ||||
|       [(${theme.config.enhance.effects_circle_magic_mode != 'none'?'DreamConfig["effects_circle_magic_mode"] = "' + theme.config.enhance.effects_circle_magic_mode + '";': ''})] | ||||
|       [(${theme.config.enhance.enable_baidu_push?'DreamConfig["enable_baidu_push"] = true;': ''})] | ||||
|       [(${theme.config.enhance.enable_toutiao_push?'DreamConfig["enable_toutiao_push"] = true;': ''})] | ||||
|       [(${theme.config.post.show_img_name?'DreamConfig["show_img_name"] = true;': ''})] | ||||
|       [(${theme.config.basic_style.load_progress != 'none'?'DreamConfig["load_progress"] = "' + theme.config.basic_style.load_progress + '";': ''})] | ||||
|       [(${!#strings.isEmpty(theme.config.page_config.journals_share_image)?'DreamConfig["journals_share_image"] = "' + theme.config.page_config.journals_share_image + '";': ''})] | ||||
|       [(${!#strings.isEmpty(theme.config.sidebar.meting_api)?'var meting_api = "' + theme.config.sidebar.meting_api + '";': ''})] | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user