Skip to content

Commit

Permalink
added markup to contributors + added scss contributors module
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeroen Gerits committed Sep 27, 2013
1 parent 1984746 commit d758eaa
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 14 deletions.
6 changes: 5 additions & 1 deletion app/views/contributors/_member_card.blade.php
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
Member: {{ $contributor->user->name }} {{ $contributor->user->image_url }} {{ $contributor->contribution_count }}
<div class="contributor member">
<h2>{{ $contributor->name }}</h2>
<img src="{{ $contributor->avatar_url }}" alt="{{ $contributor->name }}">
<p>Count: {{ $contributor->contribution_count }}</p>
</div>
6 changes: 5 additions & 1 deletion app/views/contributors/_nonmember_card.blade.php
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
Nonmember: {{ $contributor->name }} {{ $contributor->avatar_url }} {{ $contributor->contribution_count }}
<div class="contributor nonMember">
<h2>{{ $contributor->name }}</h2>
<img src="{{ $contributor->avatar_url }}" alt="{{ $contributor->name }}">
<p>Count: {{ $contributor->contribution_count }}</p>
</div>
28 changes: 16 additions & 12 deletions app/views/contributors/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
<h1>Contributors</h1>
<div class="contributors">

<ul>
@foreach($contributors as $contributor)
<li>
@if($contributor->user)
@include('contributors._member_card')
@else
@include('contributors._nonmember_card')
@endif
</li>
@endforeach
</ul>
<h1>Contributors</h1>

<ul>
@foreach($contributors as $contributor)
<li>
@if($contributor->user)
@include('contributors._member_card')
@else
@include('contributors._nonmember_card')
@endif
</li>
@endforeach
</ul>

</div>
24 changes: 24 additions & 0 deletions public/sass/modules/_contributors.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
/* ==========================================================================
CONTRIBUTORS
========================================================================== */

.contributors {

}

.contributors > h1 {

}

.contributors > ul {

}

.contributors ul > li {

}

.contributors ul > li > .contributor.member {

}

.contributors ul > li > .contributor.nonMember {

}
3 changes: 3 additions & 0 deletions public/stylesheets/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -7353,6 +7353,9 @@ article .meta li {
background: #524f4f;
}

/* ==========================================================================
CONTRIBUTORS
========================================================================== */
/* ==========================================================================
HEADER
========================================================================== */
Expand Down

0 comments on commit d758eaa

Please sign in to comment.