Browse Source

The number of hot articles has been added to 10

moell 8 years ago
parent
commit
2a7ac87ee8
2 changed files with 6 additions and 4 deletions
  1. 3 3
      app/Presenters/ArticlePresenter.php
  2. 3 1
      public/default/css/index.css

+ 3 - 3
app/Presenters/ArticlePresenter.php

@@ -40,7 +40,7 @@ class ArticlePresenter extends FractalPresenter
     {
         return $this->article
             ->orderBy('read_count', 'desc')
-            ->paginate(5, [
+            ->paginate(10, [
                 'id',
                 'title',
                 'read_count'
@@ -49,10 +49,10 @@ class ArticlePresenter extends FractalPresenter
 
     public function formatTitle($title)
     {
-        if (strlen($title) <= 20) {
+        if (strlen($title) <= 25) {
             return $title;
         } else {
-            return mb_substr($title, 0, 19, 'utf-8')."...";
+            return mb_substr($title, 0, 25, 'utf-8')."...";
         }
     }
 }

+ 3 - 1
public/default/css/index.css

@@ -18,6 +18,7 @@
     background-color: transparent;
 }
 
+
 .navbar-static-top {
     border-width: 0 0 0;
 }
@@ -58,6 +59,7 @@
 
 .article-list .info {
     margin-top:25px;
+    color:#3D93A3;
 }
 .icon-github {
     background: url('/default/icons/github.png') no-repeat;
@@ -90,5 +92,5 @@
 
 
 a {
-    color:#3D93A3;
+    color: #34495e;
 }