mirror of
https://github.com/System-End/highway.git
synced 2026-04-19 19:45:10 +00:00
add an events controller + page
This commit is contained in:
parent
61504ba8d1
commit
cf914dda31
6 changed files with 29 additions and 3 deletions
2
app/controllers/events_controller.rb
Normal file
2
app/controllers/events_controller.rb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
class EventsController < ApplicationController
|
||||
end
|
||||
2
app/helpers/events_helper.rb
Normal file
2
app/helpers/events_helper.rb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
module EventsHelper
|
||||
end
|
||||
11
app/views/events/index.html.erb
Normal file
11
app/views/events/index.html.erb
Normal 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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -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
|
||||
|
|
|
|||
7
test/controllers/events_controller_test.rb
Normal file
7
test/controllers/events_controller_test.rb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
require "test_helper"
|
||||
|
||||
class EventsControllerTest < ActionDispatch::IntegrationTest
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
Loading…
Add table
Reference in a new issue