Skip to content

Commit 1872937

Browse files
committed
various updates
1 parent 00965d8 commit 1872937

File tree

8 files changed

+65
-42
lines changed

8 files changed

+65
-42
lines changed

app/domain/Lio/Comments/CommentPresenter.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
use McCool\LaravelAutoPresenter\BasePresenter;
44
use \Michelf\MarkdownExtra;
55

6+
use Str;
7+
68
class 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
}

app/views/dashboard/index.blade.php

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,5 @@
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

app/views/layouts/_flash.blade.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
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">&times;</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">&times;</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">&times;</a>
2118
</div>
2219
@endif
2320
</section>

app/views/users/profile.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
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>
@@ -36,7 +36,7 @@
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>

public/scss/app.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@
3333
@import "modules/form";
3434
@import "modules/comments";
3535
@import "modules/dashboard";
36-
37-
36+
@import "modules/code";
37+
@import "modules/alert";

public/scss/modules/_alert.scss

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
}

public/scss/modules/_code.scss

Whitespace-only changes.

public/scss/modules/_form.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@
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

0 commit comments

Comments
 (0)