Template/FeaturedContent:修订间差异

来自Age Of History 2 Chinese Wiki
跳转至:导航、​搜索
无编辑摘要
无编辑摘要
第1行: 第1行:
<div class="featured-content-container">
<div class="featured-content-container">
  <!-- 精选人物区域 -->
   <div class="feature-item person">
   <div class="feature-item person">
     <div class="section-title">精选人物</div>
     <div class="section-title">精选人物</div>
     <div class="feature-content">
     <div class="feature-content">
       <dpl>
       <dpl>
         category=精选人物
         category = 精选人物
         randomcount=1
         randomcount = 1
         allowcachedresults=true
         allowcachedresults = true
         dplcache=featuredperson
         dplcache = featuredperson_formatted  # 更改缓存名称以避免冲突
         dplcacheperiod=86400
         dplcacheperiod = 86400
         addauthor=true
         addauthor = true
         addeditdate=true
         addeditdate = true
         ordermethod=firstedit
        # userdateformat = Y年n月j日 H:i  # 可选:自定义日期显示格式
         mode=gallery
         ordermethod = firstedit
         imagewidth=120
         # 包含页面的第一段作为节选
        imageheight=120
        include = {Page}:1
        galleryshowfilename=true
        # 定义输出格式
        galleryshowfilesize=false
         format = <div class="dpl-results-list">, <div class="dpl-item" style="border: 1px solid #ccc; padding: 10px; margin-bottom: 10px; overflow: hidden;">
         imagesperrow=3
                  <div class="dpl-image" style="float: left; margin-right: 10px; width: 120px; height: 120px; overflow: hidden; display: flex; align-items: center; justify-content: center;">
         gallerycaption=精选人物
                    [[File:%IMAGE%|120x120px|link=%PAGE%]]
         escapelinks=false
                  </div>
                  <div class="dpl-content">
                    <div class="dpl-title" style="font-weight: bold; font-size: 1.1em;">[[%PAGE%]]</div>
                    <div class="dpl-meta" style="font-size: 0.9em; color: #555;">作者: %AUTHOR% | 创建/编辑日期: %DATE%</div>
                    <div class="dpl-excerpt" style="font-size: 0.9em; margin-top: 5px; max-height: 80px; overflow: hidden;">%SECTION%</div>
                  </div>
                </div>,
                </div>
         # (可选) 如果没有找到页面时显示的消息
         # noresultsheader = 未找到符合条件的精选人物。
         escapelinks = false
       </dpl>
       </dpl>
     </div>
     </div>
第28行: 第37行:
   </div>
   </div>


  <!-- 精选团体区域 -->
   <div class="feature-item group">
   <div class="feature-item group">
     <div class="section-title">精选团体</div>
     <div class="section-title">精选团体</div>
     <div class="feature-content">
     <div class="feature-content">
       <dpl>
       <dpl>
         category=精选团体
         category = 精选团体
         randomcount=1
         randomcount = 1
         allowcachedresults=true
         allowcachedresults = true
         dplcache=featuredgroup
         dplcache = featuredgroup_formatted # 更改缓存名称
         dplcacheperiod=86400
         dplcacheperiod = 86400
         addauthor=true
         addauthor = true
         addeditdate=true
         addeditdate = true
         ordermethod=firstedit
        # userdateformat = Y-m-d H:i
         mode=gallery
         ordermethod = firstedit
         imagewidth=120
         include = {Page}:1
        imageheight=120
         format = <div class="dpl-results-list">,
        galleryshowfilename=true
                <div class="dpl-item" style="border: 1px solid #ccc; padding: 10px; margin-bottom: 10px; overflow: hidden;">
        galleryshowfilesize=false
                  <div class="dpl-image" style="float: left; margin-right: 10px; width: 120px; height: 120px; overflow: hidden; display: flex; align-items: center; justify-content: center;">
        imagesperrow=3
                    [[File:%IMAGE%|120x120px|link=%PAGE%]]
         gallerycaption=精选团体
                  </div>
         escapelinks=false
                  <div class="dpl-content">
                    <div class="dpl-title" style="font-weight: bold; font-size: 1.1em;">[[%PAGE%]]</div>
                    <div class="dpl-meta" style="font-size: 0.9em; color: #555;">作者: %AUTHOR% | 创建/编辑日期: %DATE%</div>
                    <div class="dpl-excerpt" style="font-size: 0.9em; margin-top: 5px; max-height: 80px; overflow: hidden;">%SECTION%</div>
                  </div>
                </div>,
                </div>
         # noresultsheader = 未找到符合条件的精选团体。
         escapelinks = false
       </dpl>
       </dpl>
     </div>
     </div>

2025年5月2日 (五) 20:52的版本