aboutsummaryrefslogtreecommitdiff
path: root/src/components/shared/layout_head.cr
blob: 5a053315fa7cf152a660961ba215a57a6b73c48e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class Shared::LayoutHead < BaseComponent
  needs page_title : String

  def render
    head do
      utf8_charset
      title "My App - #{@page_title}"
      css_link asset("css/app.css")
      js_link asset("js/app.js"), defer: "true"
      csrf_meta_tags
      responsive_meta_tag

      # Development helper used with the `lucky watch` command.
      # Reloads the browser when files are updated.
      live_reload_connect_tag if LuckyEnv.development?
    end
  end
end