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`?
This commit is contained in:
Emi Matchu 2024-03-10 18:47:33 -07:00
parent cf6921329d
commit 9aef987f95
4 changed files with 3 additions and 3 deletions

View file

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

View file

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