:::

3-3 設計管理界面

  1. 發布區可以將 index.html 另存為 admin.html,並將文章區刪除,改為發布區,例如:
    <!DOCTYPE html>
    <html lang="en">
    
    <head>
      <title>校園日誌</title>
      <!-- Required meta tags -->
      <meta charset="utf-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
    
      ...略...
    </head>
    
    <body>
      <header>
        <!-- place navbar here -->
        <nav class="navbar navbar-expand-md navbar-dark bg-info mb-5">
            ...略...
        </nav>
      </header>
      <main>
        <div class="container">
          <h3>管理界面</h3>
          <div class="row">
            <div class="col-md-9">
                發布區
            </div>
            <div class="col-md-3">
              ...略...
            </div>
          </div>
        </div>
      </main>
      <footer>
        <!-- place footer here -->
      </footer>
    </body>
    
    </html>

     

  2. 當然這是一個蠻蠢的作法,畢竟 index.htmladmin.html 有太多語法是重複的,未來要維護修改會相當麻煩。
  3. 所以,我們只是暫時這樣做,未來做成樣板就只要維護一份檔案即可。
  4. 網址列輸入 http://localhost/admin.html 即可觀看結果

:::

書籍目錄

展開 | 闔起

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

計數器

今天: 2458245824582458
昨天: 4745474547454745
總計: 7712419771241977124197712419771241977124197712419