layout.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1">
  6. <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
  7. <meta name="renderer" content="webkit">
  8. <title>{:isset($title)?$title:'首页'} - {$site.name}</title>
  9. <meta name="keywords" content="{:isset($keywords)?$keywords:''}"/>
  10. <meta name="description" content="{:isset($description)?$description:''}"/>
  11. <link rel="shortcut icon" href="__CDN__/assets/img/favicon.ico" type="image/x-icon"/>
  12. <link rel="stylesheet" media="screen" href="__ADDON__/default/bootstrap/css/bootstrap.min.css"/>
  13. <!--<link rel="stylesheet" media="screen" href="__CDN__/assets/libs/bootstrap/dist/css/bootstrap.min.css"/>-->
  14. <link rel="stylesheet" media="screen" href="__CDN__/assets/libs/font-awesome/css/font-awesome.min.css"/>
  15. <link rel="stylesheet" media="screen" href="__ADDON__/default/css/common.css?v={$site.version}"/>
  16. {__STYLE__}
  17. </head>
  18. <body>
  19. <div class="cl-header container-fluid">
  20. <div class="header-content container px-0">
  21. <nav class="navbar navbar-expand-lg navbar-light">
  22. <a class="navbar-brand" href="{:addon_url('blog/index/index','',false)}">
  23. <img src="{$config.logo|cdnurl}" height="72">
  24. </a>
  25. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
  26. <span class="navbar-toggler-icon"></span>
  27. </button>
  28. <div class="collapse navbar-collapse justify-content-end" id="navbarNav">
  29. <ul class="navbar-nav">
  30. <li class="nav-item {:request()->controller()=='index'?'active':''}">
  31. <a class="nav-link" href="{:addon_url('blog/index/index','',false)}">首页</a>
  32. </li>
  33. <li class="nav-item dropdown {:request()->controller()=='category'?'active':''}" id="category">
  34. <a class="nav-link dropdown-toggle" data-toggle="dropdown" data-target="#" href="javascript:">
  35. 分类 <span class="caret"></span>
  36. </a>
  37. <ul class="dropdown-menu">
  38. {foreach name="categorylist" id="cat"}
  39. <li class="{:isset($category)&&$category['id']==$cat['id']?'active':''}"><a href="{$cat.url}">{$cat.name}</a></li>
  40. {/foreach}
  41. </ul>
  42. </li>
  43. <li class="nav-item {:request()->controller()=='archive'?'active':''}">
  44. <a class="nav-link" href="{:addon_url('blog/archive/index')}">归档</a>
  45. </li>
  46. <li class="nav-item">
  47. <a class="nav-link" href="{:url('/index/user')}">个人中心</a>
  48. </li>
  49. <li class="nav-item {:request()->controller()=='post'&&isset($post)&&$post['id']==1?'active':''}">
  50. <a class="nav-link" href="{:addon_url('blog/post/index', [':diyname'=>1, ':catename'=>'all', ':cateid'=>1])}">关于我</a>
  51. </li>
  52. </ul>
  53. </div>
  54. </nav>
  55. </div>
  56. </div>
  57. <div class="container">
  58. <div class="row">
  59. <div class="col-md-9 cl-left">
  60. {__CONTENT__}
  61. </div>
  62. <div class="col-md-3 cl-right">
  63. {include file="common/sidebar" /}
  64. </div>
  65. </div>
  66. </div>
  67. <div class="container-fluid cl-footer">
  68. <div class="container">
  69. <p class="cl-copyright">{$config.copyright}</p>
  70. </div>
  71. </div>
  72. <script type="text/javascript" src="__CDN__/assets/libs/jquery/dist/jquery.min.js"></script>
  73. <script type="text/javascript" src="__ADDON__/default/bootstrap/js/bootstrap.bundle.min.js"></script>
  74. <script type="text/javascript" src="__ADDON__/default/js/common.js?v={$site.version}"></script>
  75. {__SCRIPT__}
  76. </body>
  77. </html>