Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
Fix #784 Broken layout when using --skip-webpack
Browse files Browse the repository at this point in the history
* Include Bootstrap link when --skip-webpack is used.
* Add missing DOCTYPE.
* Add a condition to show flashes markup only when there are flashes.
  • Loading branch information
stanislas-m committed Dec 5, 2017
1 parent caff091 commit 47747ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions generators/newapp/templates/templates/_flash.html.tmpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<%= if (len(flash) > 0) { %>
<div class="row">
<div class="col-md-12">
<%= for (k, messages) in flash { %>
Expand All @@ -10,3 +11,4 @@
<% } %>
</div>
</div>
<% } %>
4 changes: 4 additions & 0 deletions generators/newapp/templates/templates/application.html.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Buffalo - {{ .opts.Name.Title }}</title>
{{- if not .opts.WithWebpack }}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
{{- end }}
<%= stylesheetTag("application.css") %>
<meta name="csrf-param" content="authenticity_token" />
<meta name="csrf-token" content="<%= authenticity_token %>" />
Expand Down

0 comments on commit 47747ee

Please sign in to comment.