forked from lujanfernaud/prevy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use small card for events in home page and profile
- Loading branch information
1 parent
8bb2240
commit 8499aaf
Showing
10 changed files
with
80 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,22 @@ | ||
<div class="container mt-2rem"> | ||
<div class="row box event-box"> | ||
<div class="box event-box"> | ||
|
||
<div class="event-box-image card card-inverse text-center col-md-4"> | ||
<%= link_to group_event_path(event.group, event) do %> | ||
<%= image_tag event.image_url(:thumb), | ||
class: "img-fluid card-img-top" %> | ||
<% end %> | ||
</div> | ||
|
||
<div class="event-box-text card-body col-md-8 d-flex flex-column justify-content-between"> | ||
<h2 class="h4 event-box__event-title"> | ||
<%= link_to event.title, group_event_path(event.group, event), | ||
class: "font-weight-bold" %> | ||
</h2> | ||
<p class="event-box__date"> | ||
<% if event.start_date.year == Time.now.year %> | ||
<%= event.start_date.strftime("%A, %B %d") %> | ||
<% else %> | ||
<%= event.start_date.strftime("%A, %B %d, %Y") %> | ||
<% end %> | ||
</p> | ||
<% if controller_name == "groups" %> | ||
<p class="event-box__short-description mb-0"> | ||
<%= event.short_description %> | ||
</p> | ||
<% else %> | ||
<p class="event-box__group mb-0">Group: <%= event.group.name %></p> | ||
<p class="event-box__short-description mb-0"> | ||
<%= event.very_short_description %> | ||
</p> | ||
<% end %> | ||
<p class="event-box__attending mb-2"> | ||
Attending: <%= event.attendees.count %> | ||
</p> | ||
</div> | ||
<div class="card card-inverse text-center accent-border-bottom"> | ||
<%= image_tag event.image_url(:thumb), class: "img-fluid card-img-top" %> | ||
<a href="<%= group_event_path(event.group, event) %>"> | ||
<div class="card-img-overlay accent-border-bottom"> | ||
<div class="card-title card-title--event mb-0"> | ||
<h2 class="h4 mb-1 event-box-title"> | ||
<%= event.title %> | ||
</h2> | ||
</div> | ||
</div> | ||
</a> | ||
</div> | ||
|
||
<div class="event-box-text"> | ||
<p class="mb-0 event-box__date"> | ||
<%= event.start_date_prettyfied %> | ||
</p> | ||
</div> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<div class="container mt-2rem"> | ||
<div class="row box event-box"> | ||
|
||
<div class="event-box-image card card-inverse text-center col-md-4"> | ||
<%= link_to group_event_path(event.group, event) do %> | ||
<%= image_tag event.image_url(:thumb), | ||
class: "img-fluid card-img-top" %> | ||
<% end %> | ||
</div> | ||
|
||
<div class="event-box-text event-box-text--accented | ||
card-body col-md-8 d-flex flex-column justify-content-between"> | ||
<h2 class="h4 event-box__event-title"> | ||
<%= link_to event.title, group_event_path(event.group, event), | ||
class: "font-weight-bold" %> | ||
</h2> | ||
<p class="event-box__date"> | ||
<%= event.start_date_prettyfied %> | ||
</p> | ||
<% if controller_name == "groups" %> | ||
<p class="event-box__short-description mb-0"> | ||
<%= event.short_description %> | ||
</p> | ||
<% else %> | ||
<p class="event-box__group mb-0">Group: <%= event.group.name %></p> | ||
<p class="event-box__short-description mb-0"> | ||
<%= event.very_short_description %> | ||
</p> | ||
<% end %> | ||
<p class="event-box__attending mb-2"> | ||
Attending: <%= event.attendees.count %> | ||
</p> | ||
</div> | ||
|
||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
public/assets/.sprockets-manifest-3166fa9c4d5aaa1767b17f49852da78c.json
Large diffs are not rendered by default.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
...c/assets/application-eb62787d5a75f0bcdc622becb41aac3426e08f88c08e73a67a20b26dc6066fb7.css
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+25.3 KB
...ssets/application-eb62787d5a75f0bcdc622becb41aac3426e08f88c08e73a67a20b26dc6066fb7.css.gz
Binary file not shown.