Skip to content

Commit c0a2895

Browse files
committed
pagination
1 parent c7fc77f commit c0a2895

File tree

3 files changed

+66
-2
lines changed

3 files changed

+66
-2
lines changed

app/controllers/ForumController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function __construct(CommentRepository $comments, TagRepository $tags)
1717

1818
public function getIndex()
1919
{
20-
$tags = $this->tags->getAllTagsBySlug(Input::get('tags'));
20+
$tags = $this->tags->getAllTagsBySlug(Input::get('tags'));
2121

2222
$threads = $this->comments->getForumThreadsByTagsPaginated($tags, 20);
2323
$threads->appends(['tags' => Input::get('tags')]);
@@ -28,7 +28,7 @@ public function getIndex()
2828
public function getThread()
2929
{
3030
$thread = App::make('slugModel');
31-
$comments = $this->comments->getThreadCommentsPaginated($thread);
31+
$comments = $this->comments->getThreadCommentsPaginated($thread, 5);
3232

3333
$this->view('forum.thread', compact('thread', 'comments'));
3434
}

public/scss/app.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@
3636
@import "modules/code";
3737
@import "modules/alert";
3838
@import "modules/auth";
39+
@import "modules/pagination";
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/* ==========================================================================
2+
MOBILE FIRST MODULE SKELETON
3+
========================================================================== */
4+
5+
// MOBILE STYLES ////////////////////////////////////////////////////////////
6+
7+
.pagination {
8+
9+
li {
10+
float: left;
11+
margin: 0;
12+
list-style-type: none;
13+
}
14+
15+
li a, .disabled, .active {
16+
display: inline-block;
17+
padding: 7px 15px;
18+
font-size: 14px;
19+
}
20+
21+
a:hover {
22+
background: $lioRed;
23+
color:white;
24+
}
25+
26+
.active {
27+
background: $lioRed;
28+
color:white;
29+
}
30+
}
31+
32+
33+
// BREAKPOINT 1 (480) ////////////////////////////////////////////////////////////
34+
35+
@media only screen and (min-width: 480px) {
36+
37+
.module {}
38+
39+
}
40+
41+
42+
// BREAKPOINT 2 (768) ////////////////////////////////////////////////////////////
43+
44+
@media only screen and (min-width: 768px) {
45+
46+
.module {}
47+
}
48+
49+
50+
// BREAKPOINT 3 (1024) ////////////////////////////////////////////////////////////
51+
52+
@media only screen and (min-width: 1024px) {
53+
54+
.module {}
55+
}
56+
57+
58+
// BREAKPOINT 4 (1440) ////////////////////////////////////////////////////////////
59+
60+
@media only screen and (min-width: 1440px) {
61+
62+
.module {}
63+
}

0 commit comments

Comments
 (0)