添加显示文章发布位置 & 自定义字段优化
This commit is contained in:
		
							parent
							
								
									9aa7c00c01
								
							
						
					
					
						commit
						c1f0c0d68b
					
				|  | @ -37,13 +37,16 @@ function themeConfig($form) { | |||
| } | ||||
| 
 | ||||
| function themeFields($layout) { | ||||
|     $headPic = new Typecho_Widget_Helper_Form_Element_Text('headPic', NULL, NULL, _t('文章头图地址'), _t('在这里填入一个图片 URL 地址, 就可以让文章加上头图。')); | ||||
|     $headPic = new Typecho_Widget_Helper_Form_Element_Text('headPic', NULL, NULL, _t('文章头图地址'), _t('仅对文章有效。在这里填入一个图片 URL 地址, 就可以让文章加上头图。留空则不显示头图。')); | ||||
|     $layout->addItem($headPic); | ||||
|      | ||||
|     $pageIcon = new Typecho_Widget_Helper_Form_Element_Text('pageIcon', NULL, NULL, _t('页面 icon'), _t('在这里为页面填入一个 fontawesome icon 代码,在菜单栏链接前会显示 icon。为页面填入一个 fontawesome icon 代码,在菜单栏链接前会显示 icon。对文章无效。Fontawesome 是 5.15 版本,参见:https://fontawesome.com/v5.15/icons')); | ||||
| 
 | ||||
|     $pubPlace = new Typecho_Widget_Helper_Form_Element_Text('pubPlace', NULL, NULL, _t('文章发布地点'), _t('仅对文章有效。在这里输入一个地点的名字,文章头部会显示。留空则不显示发布地点。')); | ||||
|     $layout->addItem($pubPlace); | ||||
| 
 | ||||
|     $pageIcon = new Typecho_Widget_Helper_Form_Element_Text('pageIcon', NULL, NULL, _t('页面图标'), _t('仅对非隐藏页面有效。在这里为页面填入一个 fontawesome icon 代码,在菜单栏链接前会显示图标。Fontawesome 是 5.15 版本,参见 <a href="https://fontawesome.com/v5.15/icons" target="_blank">FontAwesome 图标库</a>。留空则不显示图标。')); | ||||
|     $layout->addItem($pageIcon); | ||||
| 
 | ||||
|     $linkTo = new Typecho_Widget_Helper_Form_Element_Text('linkTo', NULL, NULL, _t('重定向至'), _t('在这里输入一个 URL,打开页面时会自动重定向到这个 URL,用于定制菜单栏。对文章无效')); | ||||
|     $linkTo = new Typecho_Widget_Helper_Form_Element_Text('linkTo', NULL, NULL, _t('页面重定向至'), _t('仅对页面有效。在这里输入一个 URL,打开该页面时会自动重定向到这个 URL,用于定制菜单栏。留空则不重定向。')); | ||||
|     $layout->addItem($linkTo); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										5
									
								
								post.php
								
								
								
								
							
							
						
						
									
										5
									
								
								post.php
								
								
								
								
							|  | @ -12,6 +12,11 @@ | |||
|                 <i class="far fa-calendar-alt ml-1 mr-1"></i> | ||||
|                 <time class="lately" datetime="<?php $this->date('c'); ?>" pubdate>Lately</time> |  | ||||
|                 <time datetime="<?php $this->date('c'); ?>"><?php $this->date('Y-m-d D h:iA'); ?></time>
 | ||||
|                 <?php if ($this->fields->pubPlace != ''): ?>
 | ||||
|                     <br> | ||||
|                     <i class="fas fa-map-marker-alt ml-1 mr-1"></i> | ||||
|                     <?php echo $this->fields->pubPlace; ?>
 | ||||
|                 <?php endif; ?>
 | ||||
|             </span> | ||||
|         </div> | ||||
|         <hr> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue