add an events controller + page

This commit is contained in:
acon 2025-05-11 23:13:30 -04:00
parent 61504ba8d1
commit cf914dda31
6 changed files with 29 additions and 3 deletions

View file

@ -0,0 +1,2 @@
class EventsController < ApplicationController
end

View file

@ -0,0 +1,2 @@
module EventsHelper
end

View file

@ -0,0 +1,11 @@
<h1 class="text-3xl font-bold text-center">Upcoming Events</h1>
<div class="mt-8 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
<div class="bg-[#433d67] p-6 rounded-lg text-center">
<h2 class="text-xl font-bold text-white">Event 1</h2>
<p class="mt-2 text-gray-300">Details about Event 1.</p>
</div>
<div class="bg-[#433d67] p-6 rounded-lg text-center">
<h2 class="text-xl font-bold text-white">Event 2</h2>
<p class="mt-2 text-gray-300">Details about Event 2.</p>
</div>
</div>

View file

@ -27,6 +27,7 @@
<%= link_to "Getting started", "/overview" %>
<%= link_to "Starter projects", launchpad_path %>
<%= link_to "Resources", root_path %>
<%= link_to "Events", events_path %>
</div>
</div>
@ -44,5 +45,6 @@
<%= link_to "Getting started", "/overview" %>
<%= link_to "Starter projects", launchpad_path %>
<%= link_to "Resources", root_path %>
<%= link_to "Events", events_path %>
</div>
</div>

View file

@ -52,7 +52,9 @@ Rails.application.routes.draw do
get "/prize_box", to: "users#prize_box", as: :prize_box
get '/launchpad', to: 'launchpad#show'
get '/overview', to: redirect('/overview/getting_started')
get '/overview/:page', to: 'overview#show', as: 'overview_page'
get "/launchpad", to: "launchpad#show"
get "/overview", to: redirect("/overview/getting_started")
get "/overview/:page", to: "overview#show", as: "overview_page"
get "/events", to: "events#index"
end

View file

@ -0,0 +1,7 @@
require "test_helper"
class EventsControllerTest < ActionDispatch::IntegrationTest
# test "the truth" do
# assert true
# end
end