From 47747eebdab5fb87dc0d022c5b155e107d048456 Mon Sep 17 00:00:00 2001 From: Stanislas Michalak Date: Tue, 5 Dec 2017 22:18:53 +0100 Subject: [PATCH] Fix #784 Broken layout when using --skip-webpack * Include Bootstrap link when --skip-webpack is used. * Add missing DOCTYPE. * Add a condition to show flashes markup only when there are flashes. --- generators/newapp/templates/templates/_flash.html.tmpl | 2 ++ generators/newapp/templates/templates/application.html.tmpl | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/generators/newapp/templates/templates/_flash.html.tmpl b/generators/newapp/templates/templates/_flash.html.tmpl index a7ec2001f..9f3854fed 100644 --- a/generators/newapp/templates/templates/_flash.html.tmpl +++ b/generators/newapp/templates/templates/_flash.html.tmpl @@ -1,3 +1,4 @@ +<%= if (len(flash) > 0) { %>
<%= for (k, messages) in flash { %> @@ -10,3 +11,4 @@ <% } %>
+<% } %> \ No newline at end of file diff --git a/generators/newapp/templates/templates/application.html.tmpl b/generators/newapp/templates/templates/application.html.tmpl index 698707cd8..a1ecef968 100644 --- a/generators/newapp/templates/templates/application.html.tmpl +++ b/generators/newapp/templates/templates/application.html.tmpl @@ -1,7 +1,11 @@ + Buffalo - {{ .opts.Name.Title }} + {{- if not .opts.WithWebpack }} + + {{- end }} <%= stylesheetTag("application.css") %>