Template/FeaturedContent:修订间差异

来自Age Of History 2 Chinese Wiki
跳转至:导航、​搜索
无编辑摘要
无编辑摘要
标签已被回退
第4行: 第4行:
     <div class="feature-content">
     <div class="feature-content">
       <dpl>
       <dpl>
        category = 精选人物
  category = 精选人物
        randomcount = 1
  count = 3 # 显示最多3个,方便查看
        allowcachedresults = true
</dpl>
        dplcache = featuredperson_formatted # 更改缓存名称以避免冲突
        dplcacheperiod = 86400
        addauthor = true
        addeditdate = true
        # userdateformat = Y年n月j日 H:i  # 可选:自定义日期显示格式
        ordermethod = firstedit
        # 包含页面的第一段作为节选
        include = {Page}:1
        # 定义输出格式
        format = <div class="dpl-results-list">, <div class="dpl-item" style="border: 1px solid #ccc; padding: 10px; margin-bottom: 10px; overflow: hidden;">
                  <div class="dpl-image" style="float: left; margin-right: 10px; width: 120px; height: 120px; overflow: hidden; display: flex; align-items: center; justify-content: center;">
                    [[File:%IMAGE%|120x120px|link=%PAGE%]]
                  </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>
     </div>
     </div>
     <div class="see-more">
     <div class="see-more">

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