0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-20 09:42:41 +00:00
This commit is contained in:
Trevor Buckner
2020-10-26 13:27:37 -04:00
parent af4ec3d096
commit 8add76fb50
2 changed files with 19 additions and 19 deletions

View File

@@ -1,4 +1,4 @@
module.exports = async(name, title = "", props = {}) => { module.exports = async(name, title = '', props = {})=>{
return ` return `
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
@@ -7,7 +7,7 @@ module.exports = async(name, title = "", props = {}) => {
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700" rel="stylesheet" type="text/css" /> <link href="//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700" rel="stylesheet" type="text/css" />
<link href=${`/${name}/bundle.css`} rel='stylesheet'></link> <link href=${`/${name}/bundle.css`} rel='stylesheet'></link>
<link rel="icon" href="/assets/homebrew/favicon.ico" type="image/x-icon" /> <link rel="icon" href="/assets/homebrew/favicon.ico" type="image/x-icon" />
<title>${title.length ? title + " - The Homebrewery": "The Homebrewery - NaturalCrit"}</title> <title>${title.length ? `${title} - The Homebrewery`: 'The Homebrewery - NaturalCrit'}</title>
</head> </head>
<body> <body>
<main id="reactRoot">${require(`../build/${name}/ssr.js`)(props)}</main> <main id="reactRoot">${require(`../build/${name}/ssr.js`)(props)}</main>

View File

@@ -219,7 +219,7 @@ app.use((req, res) => {
googleBrews : req.googleBrews, googleBrews : req.googleBrews,
account : req.account, account : req.account,
}; };
templateFn('homebrew', title = req.brew ? req.brew.title : "", props) templateFn('homebrew', title = req.brew ? req.brew.title : '', props)
.then((page)=>{ res.send(page); }) .then((page)=>{ res.send(page); })
.catch((err)=>{ .catch((err)=>{
console.log(err); console.log(err);