:::

5-5 templates/op_index.tpl 列出所有文章

{foreach $all_news.data as $news}
  <!-- 水平線 -->
  <hr style="height: 4px; background-color: rgb(202, 199, 199)" />
  <!-- 卡片內容 -->
  <div class="card mb-3 border-0 py-4">
    <div class="row g-0">
      <!-- 卡片內容文字區 -->
      <div class="col-md-8">
        <div class="card-body">
          <h5 class="card-title">
            <a href="{$url}/index.php?op=show&id={$news.id}">{$news.title}</a>
          </h5>
          
          <p class="card-text">
            <small>{$news.info} </small>
          </p>
          
          <p class="card-text">
            <small class="text-muted">{$news.date} <i class="far fa-eye"></i> {$news.counter}</small>
          </p>
          <p class="card-text">
            {$news.summary}
          </p>
        </div>
      </div>
      <!-- 卡片內容圖片區 -->
      <div class="col-md-4">
        {if $news.files}
          <a href="{$url}/index.php?op=show&id={$news.id}"><img src="{$url}/uploads/{$news.id}/thumbs/{$news.files|reset}" alt="..."
          class="img-fluid img-thumbnail" /></a>
        {else} 
          <a href="{$url}/index.php?op=show&id={$news.id}"><img src="{$url}/images/none.png" alt="..."
        class="img-fluid img-thumbnail" /></a>  
        {/if}    
      </div>
    </div>
  </div>
{foreachelse}
  <div class="alert alert-warning">
    <h1>尚無文章</h1>
  </div>
{/foreach}

<nav>
  <ul class="pagination justify-content-center">
    <li class="page-item {if !$all_news.prev_pages}disabled{/if}">
      <a class="page-link" href="{$all_news.prev_pages}">上一頁</a>
    </li>
      {foreach $all_news.pages as $page}
          <li class="page-item {if $page.isCurrent}active{/if}">
            <a class="page-link" href="{$page.url}">{$page.num}</a>
          </li>
      {/foreach}
    <li class="page-item {if !$all_news.next_pages}disabled{/if}">
      <a class="page-link" href="{$all_news.next_pages}">下一頁</a>
    </li>
  </ul>
</nav>

 


:::

書籍目錄

展開 | 闔起

http%3A%2F%2Fcampus-xoops.tn.edu.tw%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbsn%3D53%26tbdsn%3D1871

計數器

今天: 637637637
昨天: 2455245524552455
總計: 6115334611533461153346115334611533461153346115334