slime-lang / phoenix_slime

Phoenix Template Engine for Slime
MIT License
310 stars 65 forks source link

Update layout generator to match Phoenix 1.4 default #66

Closed owenstrevor closed 5 years ago

owenstrevor commented 5 years ago

I've gone ahead and done this.

Here's what is should look like (exact match for 1.4)

doctype html
html lang="en"
  head
    meta charset="utf-8"
    meta content="IE=edge" http-equiv="X-UA-Compatible"
    meta content="width=device-width, initial-scale=1" name="viewport"
    title Hello Teacher!
    link rel="stylesheet" href="#{ Routes.static_path(@conn, "/css/app.css") }"

  body
    header
      section.container
        nav role="navigation"
          ul
            li
              a href="http://www.phoenixframework.org/docs" Get Started
        a.phx-logo
          img src="#{ Routes.static_path(@conn, "/images/phoenix.png") }" alt="Phoenix Framework Logo"

    main.container role="main"
      p.alert.alert-info role="alert"= get_flash(@conn, :info)
      p.alert.alert-danger role="alert"= get_flash(@conn, :error)
      = render @view_module, @view_template, assigns

    script src="#{ Routes.static_path(@conn, "/js/app.js") }"
doomspork commented 5 years ago

@owenstrevor a PR would be very much appreciated 👍

sekrett commented 5 years ago

The title depends on app name, should be dynamic.

doomspork commented 5 years ago

@sekrett or @owenstrevor if either of you would like to open a PR for this, it would be much appreciated. I'm stretched pretty thin for the next few months with work and family.