diff --git a/App/Controllers/Doc.php b/App/Controllers/Doc.php index 167d254..fb535e9 100644 --- a/App/Controllers/Doc.php +++ b/App/Controllers/Doc.php @@ -28,5 +28,10 @@ class Doc extends \Core\Controller $this->JsonResp(200,null,"error"); } } + public function countAction(){ + $docs = new Models\Doc(); + $ret = $docs->Count(); + $this->JsonResp(200,$ret,"OK"); + } } \ No newline at end of file diff --git a/App/Models/Doc.php b/App/Models/Doc.php index a076c72..6adc50d 100644 --- a/App/Models/Doc.php +++ b/App/Models/Doc.php @@ -68,5 +68,11 @@ class Doc extends Model $recv = $stmt->fetchAll(); return $recv; } + public function Count(){ + $db = static::getDB(); + $stmt = $db->query('select count(*) from doc'); + $result = $stmt->fetchAll(); + return $result; + } } diff --git a/App/Views/blog/basic.html b/App/Views/blog/basic.html index e9669ae..0a9cc70 100644 --- a/App/Views/blog/basic.html +++ b/App/Views/blog/basic.html @@ -64,14 +64,7 @@ height:auto!important; min-height:600px; } -#footer{ - bottom: 0px; - background: #eee; - left:35%; - height: 50px; - margin-top: 10px; -} #container #left{ display: inline-block; text-align: center; @@ -104,6 +97,9 @@ border: #0a0a0a 1px; color: -internal-quirk-inherit; border-collapse:collapse; +} +img{ + } td{ display: table-cell; @@ -122,6 +118,34 @@ tr{ ul li a{ color: white; } +#page{ + bottom: 0px; + background: #eee; + height: 30px; + margin-top: 20px; + text-align: center; + +} +#page ul { + padding:0; /* 将默认的内边距去掉 */ + margin:auto; /* 将默认的外边距去掉 */ + width: 10%; + height: 30px; + margin-bottom: 10px; + overflow: hidden; +} +#page ul li{ + list-style:none; /* 将默认的列表符号去掉 */ + padding:0; /* 将默认的内边距去掉 */ + margin:0; /* 将默认的外边距去掉 */ + float: left; /* 往左浮动 */ + display: block; + width: 20px; + font-size: 25px; + text-decoration: none; + background: #20375f; + text-align: left; +} @@ -136,14 +160,17 @@ ul li a{
  • 文章
  • {% endif %} -
  • 项目
  • -
  • 杂文
  • +
  • 项目
  • +
  • 杂文
  • +
  • bug总结
  • + {% if debug == true %}
  • 赞助
  • {%else%}
  • 赞助
  • {% endif %} +
    @@ -193,6 +220,14 @@ ul li a{ style="width: 300px;height: 420px;margin-left: 25%;"> {% endif %}
    + + +