diff --git a/app/controllers/staff/themes_controller.rb b/app/controllers/staff/themes_controller.rb new file mode 100644 index 000000000..552d0103b --- /dev/null +++ b/app/controllers/staff/themes_controller.rb @@ -0,0 +1,12 @@ +class Staff::ThemesController < Staff::ApplicationController + before_action :require_website + before_action :enable_website_subnav + + def show + render template: "staff/pages/themes/#{current_website.theme}/#{theme_params['name']}", layout: "themes/#{current_website.theme}" + end + + def theme_params + params.permit(:name) + end +end diff --git a/app/decorators/staff/theme_decorator.rb b/app/decorators/staff/theme_decorator.rb new file mode 100644 index 000000000..28920d4e4 --- /dev/null +++ b/app/decorators/staff/theme_decorator.rb @@ -0,0 +1,13 @@ +class Staff::ThemeDecorator < ApplicationDecorator + delegate_all + + # Define presentation-specific methods here. Helpers are accessed through + # `helpers` (aka `h`). You can override attributes, for example: + # + # def created_at + # helpers.content_tag :span, class: 'time' do + # object.created_at.strftime("%a %m/%d/%y") + # end + # end + +end diff --git a/app/models/page.rb b/app/models/page.rb index e77807361..7aed6b373 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -2,6 +2,7 @@ class Page < ApplicationRecord TEMPLATES = { 'splash' => { hide_header: true, hide_footer: true }, 'home' => { }, + 'about' => { }, } belongs_to :website diff --git a/app/views/staff/pages/themes/default/about.html.erb b/app/views/staff/pages/themes/default/about.html.erb new file mode 100644 index 000000000..c22de5be9 --- /dev/null +++ b/app/views/staff/pages/themes/default/about.html.erb @@ -0,0 +1,342 @@ + +
+
+
+
+

+ + About +

Since 2001, RubyConf has been the main annual gathering of Rubyists from around the world. RubyConf is the perfect place for a more focused technical aspect of the Ruby language.

+ +
+
+ + +
+
+ + +
+
+ + +
+
+

The Why

+

Our Mission

+
+
+ +
+
+
+

Focused on fostering the Ruby programming language and the robust community that has sprung up around it, RubyConf brings together Rubyists, both established and new, to discuss emerging ideas, collaborate, and socialize in some of the best locations in the US.

+

RubyConf strives to provide an inclusive and welcoming experience for all participants. We have an anti-harassment policy that we require ALL attendees, speakers, sponsors, volunteers, and staff to comply with — no exceptions. We also collaborate with a diversity, equity, and inclusion consultant. Review our policies for more details.

+

Past RubyConf Videos

+ +
+
+
+ +
+

Program Committee

+

The amazing team crafting this year's incredible tracks!

+ +
+
+
+
+
+ + +
+
+
+
+

About Ruby Central, Inc.

+

RubyConf is brought to you by the team at Ruby Central, as well as a small but dedicated group of volunteers. Ruby Central is a 501(c)3 nonprofit organization dedicated to the support and advocacy of the Ruby community. Ruby Central functions as the visible presence and point of contact for this annual conference and other exciting Ruby activities.

+
+
+ +
+
+
+
\ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 39cc67871..4d11965e0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -42,6 +42,7 @@ #Staff URLS namespace 'staff' do + get 'themes/:name', controller: :themes, action: :show get '/' => 'events#show' get :show diff --git a/spec/decorators/staff/theme_decorator_spec.rb b/spec/decorators/staff/theme_decorator_spec.rb new file mode 100644 index 000000000..b392f48e6 --- /dev/null +++ b/spec/decorators/staff/theme_decorator_spec.rb @@ -0,0 +1,4 @@ +require 'rails_helper' + +RSpec.describe Staff::ThemeDecorator do +end diff --git a/spec/requests/staff/themes_spec.rb b/spec/requests/staff/themes_spec.rb new file mode 100644 index 000000000..98da9d37c --- /dev/null +++ b/spec/requests/staff/themes_spec.rb @@ -0,0 +1,7 @@ +require 'rails_helper' + +RSpec.describe "Staff::Themes", type: :request do + describe "GET /index" do + pending "add some examples (or delete) #{__FILE__}" + end +end