File tree Expand file tree Collapse file tree 8 files changed +65
-42
lines changed Expand file tree Collapse file tree 8 files changed +65
-42
lines changed Original file line number Diff line number Diff line change 33use McCool \LaravelAutoPresenter \BasePresenter ;
44use \Michelf \MarkdownExtra ;
55
6+ use Str ;
7+
68class CommentPresenter extends BasePresenter
79{
810 public function forumThreadUrl ()
@@ -44,4 +46,10 @@ public function body()
4446 {
4547 return MarkdownExtra::defaultTransform ($ this ->resource ->body );
4648 }
49+
50+ public function bodySummary ()
51+ {
52+ $ body = MarkdownExtra::defaultTransform ($ this ->resource ->body );
53+ return Str::words ($ body , 50 );
54+ }
4755}
Original file line number Diff line number Diff line change 55@stop
66
77@section (' content' )
8- <section class =" user-content" >
98
10-
11- <h1 >{{ Auth:: user ()-> name } } 's Latest Threads</h1 >
12- <div class =" comments" >
13- @foreach ($user -> forumThreads as $comment )
14- <div class =" comment" >
15- <div class =" content" >
16- <h2 >{{ $comment -> title } } </h2 >
17- <p >{{ $comment -> body } } </p >
18- <ul class =" meta" >
19- <li ><i class =" icon-time" ></i > {{ $comment -> created_ago } } </li >
20- <li ><a href =" {{ $comment -> forumThreadUrl } }" ><i class =" icon-eye" ></i > View Thread</a ></li >
21- </ul >
22- </div >
23- </div >
24- @endforeach
25- </div >
26-
27- <h1 >{{ Auth:: user ()-> name } } 's Latest Replies</h1 >
28- <div class =" comments" >
29- @foreach ($user -> forumReplies as $comment )
30- <div class =" comment" >
31- <div class =" content" >
32- <h2 >RE: {{ $comment -> parent -> title } } </h2 >
33- <p >{{ $comment -> body } } </p >
34- <ul class =" meta" >
35- <li ><i class =" icon-time" ></i > {{ $comment -> created_ago } } </li >
36- <li ><a href =" {{ $comment -> commentUrl } }" ><i class =" icon-eye" ></i > View Comment</a ></li >
37- </ul >
38- </div >
39- </div >
40- @endforeach
41- </div >
42- </section >
439@stop
Original file line number Diff line number Diff line change 1- <section >
1+ <section class = " alert " >
22 @if (Session:: has (' success' ) )
33 <div data-alert class =" alert-box success" >
44 {{ implode (' <br />' , (array ) Session:: get (' success' )) } }
5- <a href =" #" class =" close" >× ; </a >
65 </div >
76 @endif
87
98 @if (Session:: has (' error' ) )
109 <div data-alert class =" alert-box alert" >
1110 {{ implode (' <br />' , (array ) Session:: get (' error' )) } }
12- <a href =" #" class =" close" >× ; </a >
1311 </div >
1412 @endif
1513
1614 {{-- Laravel Form Errors --}}
1715 @if ($errors -> count () > 0 )
1816 <div data-alert class =" alert-box alert" >
1917 Please review the form below and fix errors before submitting again.
20- <a href =" #" class =" close" >× ; </a >
2118 </div >
2219 @endif
2320</section >
Original file line number Diff line number Diff line change 1616 <div class =" comment" >
1717 <div class =" content" >
1818 <h2 >{{ $thread -> title } } </h2 >
19- < p > {{ $thread -> body } }</ p >
19+ {{ $thread -> bodySummary } }
2020 <ul class =" meta" >
2121 <li ><i class =" icon-time" ></i > {{ $thread -> created_ago } } </li >
2222 <li ><a href =" {{ $thread -> forumThreadUrl } }" ><i class =" icon-eye" ></i > View Thread</a ></li >
3636 <div class =" comment" >
3737 <div class =" content" >
3838 <h2 >RE: {{ $comment -> parent -> title } } </h2 >
39- < p > {{ $comment -> body } }</ p >
39+ {{ $comment -> bodySummary } }
4040 <ul class =" meta" >
4141 <li ><i class =" icon-time" ></i > {{ $comment -> created_ago } } </li >
4242 <li ><a href =" {{ $comment -> commentUrl } }" ><i class =" icon-eye" ></i > View Comment</a ></li >
Original file line number Diff line number Diff line change 3333@import " modules/form" ;
3434@import " modules/comments" ;
3535@import " modules/dashboard" ;
36-
37-
36+ @import " modules/code " ;
37+ @import " modules/alert " ;
Original file line number Diff line number Diff line change 1+ /* ==========================================================================
2+ MOBILE FIRST MODULE SKELETON
3+ ========================================================================== */
4+
5+ // MOBILE STYLES ////////////////////////////////////////////////////////////
6+
7+ .alert-box {
8+ padding : 10px ;
9+ background : $lioRed ;
10+ color :white ;
11+ font-size :15px ;
12+ }
13+
14+
15+ // BREAKPOINT 1 (480) ////////////////////////////////////////////////////////////
16+
17+ @media only screen and (min-width : 480px ) {
18+
19+ .module {}
20+
21+ }
22+
23+
24+ // BREAKPOINT 2 (768) ////////////////////////////////////////////////////////////
25+
26+ @media only screen and (min-width : 768px ) {
27+
28+ .module {}
29+ }
30+
31+
32+ // BREAKPOINT 3 (1024) ////////////////////////////////////////////////////////////
33+
34+ @media only screen and (min-width : 1024px ) {
35+
36+ .module {}
37+ }
38+
39+
40+ // BREAKPOINT 4 (1440) ////////////////////////////////////////////////////////////
41+
42+ @media only screen and (min-width : 1440px ) {
43+
44+ .module {}
45+ }
Original file line number Diff line number Diff line change 7676 }
7777}
7878
79+ .error {
80+ background : $lioRed ;
81+ display : block ;
82+ padding : 5px ;
83+ color :white ;
84+ }
85+
7986
8087// BREAKPOINT 1 (480) ////////////////////////////////////////////////////////////
8188
You can’t perform that action at this time.
0 commit comments