-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a new event rendering template to remove boilerplate (#74)
- Loading branch information
Showing
3 changed files
with
52 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<div | ||
id="<%= dom_id event2 %>" | ||
class="p-3 border rounded border-solid border-black" | ||
> | ||
<% future = Time.zone.now < event2.start_at %> | ||
<div class="md:flex text-left"> | ||
<div class="w-full md:w-1/2 my-8 pr-1"> | ||
<h2 class="mb-2"><%= link_to event2.name, event2 %></h2> | ||
<div class="flex flex-col gap-3"> | ||
<p class="mb-2"><%= event2.start_time %></p> | ||
<%= event2.location %> | ||
</div> | ||
</div> | ||
|
||
<div class="w-full md:w-1/2 my-8 pl-1"> | ||
<h2 class="mb-2">Agenda</h2> | ||
<div class="ml-4"> | ||
<div class="w-4/5 mt-2"> | ||
<%= event2.description %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="mx-auto text-center"> | ||
<% if future %> | ||
<div class="mb-6"> | ||
<%= link_to event2.rsvp_link, class: "rounded-full bg-ruby px-4 py-2.5 font-semibold text-white/100 shadow-sm ring-1 ring-inset ring-ruby hover:bg-red-400" do %> | ||
Join the event | ||
<% end %> | ||
</div> | ||
<% end %> | ||
<% if event2.sponsor %> | ||
<h3 Sponsor</h3> | ||
<div class="flex justify-center items-center"> | ||
<%= link_to event2.sponsor_link do %> | ||
<% if event2.sponsor_logo.present? %> | ||
<%= image_tag "sponsors/#{event2.sponsor_logo}", class: "max-h-20" %> | ||
<% else %> | ||
<%= event2.sponsor.titleize %> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
<%= content_for :event_content do %> | ||
<%# For an upcoming event, make a "past_event" and use the partial here %> | ||
<%# Otherwise, use the placeholder partial %> | ||
|
||
<%= render partial: "event", collection: @events %> | ||
<%= render partial: "event2", collection: @events %> | ||
|
||
<h2 class="hidden only:block">We're planning our next outing, stay tuned!</h2> | ||
<% end %> | ||
|
||
<% content_for :page_title do %> | ||
Home | ||
Home | ||
<% end %> | ||
|
||
<% content_for :page_description do %> | ||
Toronto Ruby is about building a community for Ruby users in the GTA and providing a positive space for everyone to connect, learn and grow. We're looking forward to seeing you! | ||
Toronto Ruby is about building a community for Ruby users in the GTA and | ||
providing a positive space for everyone to connect, learn and grow. We're | ||
looking forward to seeing you! | ||
<% end %> | ||
|
||
<%= render partial: "layouts/event_layout" %> |
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,9 +1,9 @@ | ||
<% content_for :page_title do %> | ||
<%= @event.name %> | ||
<%= @event.name %> | ||
<% end %> | ||
|
||
<%= content_for :event_content do %> | ||
<%= render partial: "events/event", locals: { event: @event } %> | ||
<%= render partial: "events/event2", locals: { event: @event } %> | ||
<% end %> | ||
|
||
<%= render partial: "layouts/event_layout" %> |