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

Default css js files and no logo in assets wo webpack #117

Merged
merged 2 commits into from
Jan 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions buffalo/cmd/app_generators.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ func newAppGenerator(data gentronics.Data) *gentronics.Generator {
g.Add(gentronics.NewFile("grifts/routes.go", nGriftRoutes))
g.Add(gentronics.NewFile("templates/index.html", nIndexHTML))
g.Add(gentronics.NewFile("templates/application.html", nApplicationHTML))
g.Add(&gentronics.RemoteFile{
File: gentronics.NewFile("assets/images/logo.svg", ""),
RemotePath: "https://raw.githubusercontent.com/gobuffalo/buffalo/master/logo.svg",
})
g.Add(gentronics.NewFile(".gitignore", nGitignore))
g.Add(gentronics.NewCommand(generate.GoGet("github.com/markbates/refresh/...")))
g.Add(gentronics.NewCommand(generate.GoInstall("github.com/markbates/refresh")))
Expand Down
140 changes: 140 additions & 0 deletions buffalo/cmd/generate/webpack.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ func NewWebpackGenerator(data gentronics.Data) *gentronics.Generator {
// if we're not using web pack save the logo and return
if !should(data) {
g.Add(publicLogo)
g.Add(gentronics.NewFile("public/assets/application.js", ""))
g.Add(gentronics.NewFile("public/assets/application.css", nwApplicationCSS))
return g
}

Expand Down Expand Up @@ -166,3 +168,141 @@ $(() => {
const wApplicationCSS = `@import "~bootstrap/dist/css/bootstrap.css";
@import "~font-awesome/css/font-awesome.css";
`

const nwApplicationCSS = `* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}

body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.42857143;
color: #333;
background-color: #fff;
margin: 0;
}

h1, h2 {
margin-top: 20px;
margin-bottom: 10px;
font-family: inherit;
font-weight: 500;
line-height: 1.1;
color: inherit;
}

h1 {
font-size: 36px;
}

h2 {
font-size: 30px;
}

hr {
margin-top: 20px;
margin-bottom: 20px;
border: 0;
border-top: 1px solid #eee;
height: 0;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}

a {
color: #337ab7;
text-decoration: none;
}

a:hover {
color: #23527c;
}

.container {
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}

@media (min-width: 768px) {
.container {
width: 750px;
}
}
@media (min-width: 992px) {
.container {
width: 970px;
}
}
@media (min-width: 1200px) {
.container {
width: 1170px;
}
}

.table {
width: 100%;
max-width: 100%;
margin-bottom: 20px;
background-color: transparent;
border-spacing: 0;
border-collapse: collapse;
}

.table-striped > tbody {
background-color: #f9f9f9;
}

.table > thead > tr > th, .table > tbody > tr > td {
padding: 8px;
line-height: 1.42857143;
vertical-align: top;
border-top: 1px solid #ddd;
}

.table > thead > tr > th {
border-top: 0;
vertical-align: bottom;
border-bottom: 2px solid #ddd;
text-align: left;
}

code {
padding: 2px 4px;
font-size: 90%;
color: #c7254e;
background-color: #f9f2f4;
border-radius: 4px;
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
}

.row {
margin-right: -15px;
margin-left: -15px;
}

.col-md-2, .col-md-10 {
float: left;
position: relative;
min-height: 1px;
padding-right: 15px;
padding-left: 15px;
}

.col-md-2 {
width: 16.66666667%;
}

.col-md-10 {
width: 83.33333333%;
}

img {
vertical-align: middle;
border: 0;
}
`