Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
663 changes: 624 additions & 39 deletions app/assets/stylesheets/application.css

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions app/controllers/plan_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
class PlanController < ApplicationController
SCHEDULE_PATH = Rails.root.join("config", "schedule.yml")

# Hardcoded notes and custom blocks for the static design mockup.
# Real user data will replace this in a later pass.
MOCK_NOTES = {
"wed-meetup" => "Meet Sam by the bar",
"thu-talk-1" => "Sit near the front"
}.freeze

MOCK_CUSTOM_BLOCKS = {
"thu" => [
{
id: "custom-1",
time: "6:30 PM",
sort_time: 1830,
title: "Dinner with RailsConf crew",
custom: true,
notes: "Tupelo Honey on Biltmore Ave"
}
]
}.freeze

MOCK_TRAVEL = {
arrival: "2025-04-29T15:30",
departure: "2025-05-02T20:00"
}.freeze

def index
data = YAML.load_file(SCHEDULE_PATH, permitted_classes: [ Symbol ])
@days = data[:days].map { |day| build_plan_day(day) }
@travel = MOCK_TRAVEL
end

private

def build_plan_day(day)
added_items = day[:items].select { |item| item[:added] }.map do |item|
item.merge(notes: MOCK_NOTES[item[:id]])
end

custom = MOCK_CUSTOM_BLOCKS[day[:anchor].to_s] || []

{
anchor: day[:anchor],
date: day[:date],
label: day[:label],
subtitle: day[:subtitle],
items: (added_items + custom).sort_by { |i| i[:sort_time] }
}
end
end
8 changes: 8 additions & 0 deletions app/controllers/schedule_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class ScheduleController < ApplicationController
SCHEDULE_PATH = Rails.root.join("config", "schedule.yml")

def index
data = YAML.load_file(SCHEDULE_PATH, permitted_classes: [ Symbol ])
@days = data[:days]
end
end
58 changes: 36 additions & 22 deletions app/views/dashboard/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,40 +1,54 @@
<% content_for(:title, "Dashboard — Ruby Embassy") %>

<section class="pb-32">
<div class="max-w-xl mx-auto px-8 py-10">
<div class="max-w-4xl mx-auto px-8 py-10">
<% if flash[:notice] %>
<div class="alert alert-notice"><%= flash[:notice] %></div>
<% end %>

<h1 class="text-hero leading-tight font-medium text-navy mb-4">
Welcome<% if current_user.first_name.present? %>, <%= current_user.first_name %><% end %>
</h1>
<p class="text-lg text-gray mb-8">
You're signed in to Ruby Embassy.
<p class="text-lg text-gray mb-12">
What would you like to do?
</p>

<div class="card space-y-4">
<div>
<div class="text-sm text-muted uppercase tracking-wide">Name</div>
<div class="text-lg font-medium text-navy"><%= current_user.full_name %></div>
</div>
<div>
<div class="text-sm text-muted uppercase tracking-wide">Email</div>
<div class="text-lg font-medium text-navy"><%= current_user.email %></div>
</div>
<div>
<div class="text-sm text-muted uppercase tracking-wide">Role</div>
<div class="mt-1">
<span class="badge badge-<%= current_user.role %>"><%= current_user.role.humanize %></span>
</div>
<div class="action-grid">
<%= link_to schedule_path, class: "action-card" do %>
<h2 class="action-card__title">See the schedule</h2>
<p class="action-card__description">Browse all four days of talks, activities, and Ruby Embassy blocks.</p>
<span class="action-card__arrow" aria-hidden="true">&rarr;</span>
<% end %>

<div class="action-card action-card--soon">
<h2 class="action-card__title">Host an Activity</h2>
<p class="action-card__description">Lead a meetup, group hike, or informal gathering.</p>
<span class="action-card__badge">Coming soon</span>
</div>
</div>

<div class="flex gap-3 mt-8">
<% if current_user.admin? %>
<%= link_to "Admin", admin_users_path, class: "btn btn-navy" %>
<%= link_to plan_path, class: "action-card" do %>
<h2 class="action-card__title">Plan your trip</h2>
<p class="action-card__description">Save sessions, add notes, and set your arrival and departure.</p>
<span class="action-card__arrow" aria-hidden="true">&rarr;</span>
<% end %>
<%= button_to "Sign out", session_path, method: :delete, class: "btn btn-muted" %>

<a href="https://blueridgeruby.com/guide" class="action-card" target="_blank" rel="noopener">
<h2 class="action-card__title">Explore Asheville</h2>
<p class="action-card__description">Local picks for food, coffee, hikes, and things to do off-schedule.</p>
<span class="action-card__arrow" aria-hidden="true">&#8599;</span>
</a>

<div class="action-card action-card--soon">
<h2 class="action-card__title">Get your Ashevillagers</h2>
<p class="action-card__description">Claim your conference crew for meals, walks, and hangs.</p>
<span class="action-card__badge">Coming soon</span>
</div>

<div class="action-card action-card--soon">
<h2 class="action-card__title">Book a Ruby Embassy Appointment</h2>
<p class="action-card__description">Pick a time block to stop by the Ruby Embassy.</p>
<span class="action-card__badge">Coming soon</span>
</div>
</div>
</div>
</section>
20 changes: 20 additions & 0 deletions app/views/plan/_day.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<section class="plan-day" id="<%= day[:anchor] %>">
<header class="plan-day__header">
<h2 class="plan-day__label"><%= day[:label] %></h2>
<span class="plan-day__date"><%= day[:date] %></span>
</header>

<% if day[:items].any? %>
<div class="plan-items">
<% day[:items].each do |item| %>
<%= render "plan_item", item: item %>
<% end %>
</div>
<% else %>
<p class="empty-day">Nothing planned yet.</p>
<% end %>

<button type="button" class="custom-block-btn">
+ Add custom block
</button>
</section>
31 changes: 31 additions & 0 deletions app/views/plan/_plan_item.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<%
custom_class = item[:custom] ? "plan-item--custom" : ""
%>

<article class="plan-item <%= custom_class %>">
<div class="plan-item__time"><%= item[:time] %></div>

<div class="plan-item__content">
<h3 class="plan-item__title"><%= item[:title] %></h3>

<% if item[:talk_title].present? %>
<p class="plan-item__talk-title">&ldquo;<%= item[:talk_title] %>&rdquo;</p>
<% end %>

<% if item[:location].present? %>
<p class="plan-item__location"><%= item[:location] %></p>
<% end %>

<% if item[:custom] %>
<div><span class="item-badge item-badge--custom">Custom</span></div>
<% end %>

<% if item[:notes].present? %>
<p class="plan-item__notes"><%= item[:notes] %></p>
<% else %>
<p class="plan-item__note-add">+ Add a note</p>
<% end %>
</div>

<button type="button" class="plan-item__remove" aria-label="Remove from plan">&times;</button>
</article>
31 changes: 31 additions & 0 deletions app/views/plan/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<% content_for(:title, "My Plan · Ruby Embassy") %>

<section class="pb-32">
<div class="max-w-3xl mx-auto px-8">
<h1 class="text-2xl sm:text-3xl md:text-hero leading-tight font-medium text-center text-navy mb-4">
My Plan
</h1>

<p class="plan-intro">
Your personal conference itinerary. Notes and travel times are saved locally.
</p>

<div class="travel-section">
<h2 class="travel-section__title">Travel</h2>
<div class="travel-grid">
<div class="travel-row">
<label for="arrival">Arriving</label>
<input type="datetime-local" id="arrival" name="arrival" value="<%= @travel[:arrival] %>">
</div>
<div class="travel-row">
<label for="departure">Departing</label>
<input type="datetime-local" id="departure" name="departure" value="<%= @travel[:departure] %>">
</div>
</div>
</div>

<% @days.each do |day| %>
<%= render "day", day: day %>
<% end %>
</div>
</section>
15 changes: 15 additions & 0 deletions app/views/schedule/_day.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<section class="schedule-day" id="<%= day[:anchor] %>">
<header class="schedule-day__header">
<h2 class="schedule-day__label"><%= day[:label] %></h2>
<span class="schedule-day__date"><%= day[:date] %></span>
<% if day[:subtitle].present? %>
<span class="schedule-day__subtitle"><%= day[:subtitle] %></span>
<% end %>
</header>

<div class="schedule-day__items">
<% day[:items].each do |item| %>
<%= render "session_item", item: item %>
<% end %>
</div>
</section>
49 changes: 49 additions & 0 deletions app/views/schedule/_session_item.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<%
type = item[:type].to_s
type_label = {
"talk" => "Talk",
"social" => "Social",
"logistics" => "Logistics",
"activity" => "Activity",
"lightning" => "Lightning"
}[type]
flexible_classes = item[:flexible] ? "schedule-item--flexible" : ""
%>

<article class="schedule-item <%= flexible_classes %>">
<div class="schedule-item__time">
<%= item[:time] %>
</div>

<div class="schedule-item__content">
<h3 class="schedule-item__title"><%= item[:title] %></h3>

<% if item[:talk_title].present? %>
<p class="schedule-item__talk-title">&ldquo;<%= item[:talk_title] %>&rdquo;</p>
<% end %>

<% if item[:location].present? %>
<p class="schedule-item__location"><%= item[:location] %></p>
<% end %>

<div class="schedule-item__badges">
<% if type_label.present? %>
<span class="item-badge item-badge--<%= type %>"><%= type_label %></span>
<% end %>
<% if item[:flexible] %>
<span class="item-badge item-badge--tbd">TBD</span>
<% end %>
</div>
</div>

<% if item[:added] %>
<button type="button" class="add-btn add-btn--added" aria-pressed="true">
<span class="add-btn__check" aria-hidden="true">✓</span>
Added
</button>
<% else %>
<button type="button" class="add-btn" aria-pressed="false">
+ Add
</button>
<% end %>
</article>
23 changes: 23 additions & 0 deletions app/views/schedule/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<% content_for(:title, "Schedule · Ruby Embassy") %>

<section class="pb-32">
<div class="max-w-5xl mx-auto px-8">
<h1 class="text-2xl sm:text-3xl md:text-hero leading-tight font-medium text-center text-navy mb-4">
Schedule
</h1>

<p class="text-lg leading-relaxed text-gray text-center max-w-2xl mx-auto mb-8">
Browse the full conference agenda. Tap <span class="font-medium">Add</span> on any session to save it to your Plan.
</p>

<nav class="day-nav" aria-label="Jump to day">
<% @days.each do |day| %>
<a href="#<%= day[:anchor] %>"><%= day[:label] %></a>
<% end %>
</nav>

<% @days.each do |day| %>
<%= render "day", day: day %>
<% end %>
</div>
</section>
36 changes: 28 additions & 8 deletions app/views/shared/_navbar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,19 @@

<div class="hidden lg:block">
<div class="flex items-center gap-x-3">
<a href="https://blueridgeruby.com/schedule" class="text-blue px-3 py-1 text-lg font-medium">Schedule</a>
<a href="https://blueridgeruby.com/#speakers" class="text-blue px-3 py-1 text-lg font-medium">Speakers</a>
<a href="https://blueridgeruby.com/#register" class="bg-red-gradient text-white font-medium py-2 px-4 shadow-sm rounded-sm cursor-pointer">Register</a>
<% if current_user %>
<%= link_to "Schedule", schedule_path, class: "text-blue px-3 py-1 text-lg font-medium" %>
<%= link_to "My Plan", plan_path, class: "text-blue px-3 py-1 text-lg font-medium" %>
<% if admin? %>
<%= link_to "Admin", admin_users_path, class: "text-blue px-3 py-1 text-lg font-medium" %>
<% end %>
<%= button_to "Sign Out", session_path, method: :delete, class: "text-blue px-3 py-1 text-lg font-medium cursor-pointer" %>
<% else %>
<a href="https://blueridgeruby.com/schedule" class="text-blue px-3 py-1 text-lg font-medium">Schedule</a>
<a href="https://blueridgeruby.com/#speakers" class="text-blue px-3 py-1 text-lg font-medium">Speakers</a>
<%= link_to "Log In", new_session_path, class: "text-blue px-3 py-1 text-lg font-medium" %>
<a href="https://blueridgeruby.com/#register" class="bg-red-gradient text-white font-medium py-2 px-4 shadow-sm rounded-sm cursor-pointer">Register</a>
<% end %>
</div>
</div>

Expand All @@ -27,11 +37,21 @@

<div data-toggle-target="toggleable" class="hidden lg:hidden">
<div class="flex flex-col py-4 gap-y-2">
<a href="https://blueridgeruby.com/schedule" class="text-blue block py-2 font-medium">Schedule</a>
<a href="https://blueridgeruby.com/#speakers" class="text-blue block py-2 font-medium">Speakers</a>
<div class="py-2">
<a href="https://blueridgeruby.com/#register" class="bg-red-gradient text-white font-medium py-2 px-4 shadow-sm rounded-sm cursor-pointer">Register</a>
</div>
<% if current_user %>
<%= link_to "Schedule", schedule_path, class: "text-blue block py-2 font-medium" %>
<%= link_to "My Plan", plan_path, class: "text-blue block py-2 font-medium" %>
<% if admin? %>
<%= link_to "Admin", admin_users_path, class: "text-blue block py-2 font-medium" %>
<% end %>
<%= button_to "Sign Out", session_path, method: :delete, class: "text-blue block py-2 font-medium text-left cursor-pointer" %>
<% else %>
<a href="https://blueridgeruby.com/schedule" class="text-blue block py-2 font-medium">Schedule</a>
<a href="https://blueridgeruby.com/#speakers" class="text-blue block py-2 font-medium">Speakers</a>
<%= link_to "Log In", new_session_path, class: "text-blue block py-2 font-medium" %>
<div class="py-2">
<a href="https://blueridgeruby.com/#register" class="bg-red-gradient text-white font-medium py-2 px-4 shadow-sm rounded-sm cursor-pointer">Register</a>
</div>
<% end %>
</div>
</div>
</div>
Expand Down
3 changes: 3 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@

# Public landing page
root "pages#home"

get "schedule", to: "schedule#index"
get "plan", to: "plan#index"
end
Loading
Loading