Compare commits

...

2 commits

Author SHA1 Message Date
2cfcfaf69d Rename StaticController to AboutController
This is where `/about` pages will go now!
2024-03-12 17:12:43 -07:00
9aef987f95 Move partials in views/static to views/application
I think this is the more canonical place for stuff like this these days!
It's nice to be able to just say the short name when calling `render`.

Here's the answer I looked up about it: https://stackoverflow.com/a/9892081/107415

My immediate motivation is that I'm looking at creating more About
pages, and thinking about where to put them; I think maybe we trash the
`StaticController`, move these partials out to here, and move terms
into a new `AboutController`?
2024-03-10 18:48:25 -07:00
8 changed files with 8 additions and 6 deletions

View file

@ -0,0 +1,4 @@
class AboutController < ApplicationController
def terms
end
end

View file

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

View file

@ -13,7 +13,7 @@
%link{href: image_path('favicon.png'), rel: 'icon'}
= yield :stylesheets
= stylesheet_link_tag "application"
= render 'static/analytics'
= render 'analytics'
= yield :meta
= open_graph_tags
= csrf_meta_tag
@ -24,7 +24,7 @@
%body{:class => body_class}
#container
= yield :before_title
= render 'static/announcement'
= render 'announcement'
- if content_for?(:title) && show_title_header?
%h1#title= yield :title
= yield :before_flashes

View file

@ -17,7 +17,7 @@
%link{href: image_path('favicon.png'), rel: 'icon'}
= stylesheet_link_tag 'fonts'
= javascript_include_tag 'wardrobe-2020-page', defer: true
= render 'static/analytics'
= render 'analytics'
= open_graph_tags
= csrf_meta_tags
= impress_2020_meta_tags

View file

@ -87,7 +87,7 @@ OpenneoImpressItems::Application.routes.draw do
get '/donate' => 'fundraising/campaigns#current', as: :donate
# Static pages!
get '/terms', to: "static#terms", as: :terms
get '/terms', to: "about#terms", as: :terms
# Other useful lil things!
get '/sitemap.xml' => 'sitemap#index', :as => :sitemap, :format => :xml