mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-04 10:22:38 +00:00
Merge branch 'master' of https://github.com/naturalcrit/homebrewery into experimental-development
This commit is contained in:
@@ -116,7 +116,8 @@ app.get('/legacy', (req, res, next)=>{
|
|||||||
app.get('/migrate', (req, res, next)=>{
|
app.get('/migrate', (req, res, next)=>{
|
||||||
req.brew = {
|
req.brew = {
|
||||||
text : migrateText,
|
text : migrateText,
|
||||||
renderer : 'V3'
|
renderer : 'V3',
|
||||||
|
theme : '5ePHB'
|
||||||
},
|
},
|
||||||
|
|
||||||
req.ogMeta = { ...defaultMetaTags,
|
req.ogMeta = { ...defaultMetaTags,
|
||||||
@@ -133,7 +134,8 @@ app.get('/changelog', async (req, res, next)=>{
|
|||||||
req.brew = {
|
req.brew = {
|
||||||
title : 'Changelog',
|
title : 'Changelog',
|
||||||
text : changelogText,
|
text : changelogText,
|
||||||
renderer : 'V3'
|
renderer : 'V3',
|
||||||
|
theme : '5ePHB'
|
||||||
},
|
},
|
||||||
|
|
||||||
req.ogMeta = { ...defaultMetaTags,
|
req.ogMeta = { ...defaultMetaTags,
|
||||||
@@ -150,7 +152,8 @@ app.get('/faq', async (req, res, next)=>{
|
|||||||
req.brew = {
|
req.brew = {
|
||||||
title : 'FAQ',
|
title : 'FAQ',
|
||||||
text : faqText,
|
text : faqText,
|
||||||
renderer : 'V3'
|
renderer : 'V3',
|
||||||
|
theme : '5ePHB'
|
||||||
},
|
},
|
||||||
|
|
||||||
req.ogMeta = { ...defaultMetaTags,
|
req.ogMeta = { ...defaultMetaTags,
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ const api = {
|
|||||||
},
|
},
|
||||||
//Get array of any of this user's brews tagged with `meta:theme`
|
//Get array of any of this user's brews tagged with `meta:theme`
|
||||||
getUsersBrewThemes : async (username)=>{
|
getUsersBrewThemes : async (username)=>{
|
||||||
|
if(!username)
|
||||||
|
return {};
|
||||||
|
|
||||||
const fields = [
|
const fields = [
|
||||||
'title',
|
'title',
|
||||||
'tags',
|
'tags',
|
||||||
@@ -251,16 +254,12 @@ const api = {
|
|||||||
res.status(200).send(saved);
|
res.status(200).send(saved);
|
||||||
},
|
},
|
||||||
getThemeBundle : async(req, res)=>{
|
getThemeBundle : async(req, res)=>{
|
||||||
/*
|
/* getThemeBundle: Collects the theme and all parent themes
|
||||||
getThemeBundle: Collects the theme and all parent themes
|
returns an object containing an array of css, and an array of snippets, in render order
|
||||||
returns an object containing an array of css, in render order, and an array
|
|
||||||
of snippets ( currently empty )
|
req.params.id : The shareId ( User theme ) or name ( static theme )
|
||||||
Important parameter members:
|
req.params.renderer : The Markdown renderer used for this theme */
|
||||||
req.params.id: This is the shareId ( User theme ) or name ( static theme )
|
|
||||||
loaded first.
|
|
||||||
req.params.renderer: This is the Markdown+ version for the static theme. If a
|
|
||||||
User theme the value will come from the User Theme metadata.
|
|
||||||
*/
|
|
||||||
req.params.renderer = _.upperFirst(req.params.renderer);
|
req.params.renderer = _.upperFirst(req.params.renderer);
|
||||||
let currentTheme;
|
let currentTheme;
|
||||||
const completeStyles = [];
|
const completeStyles = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user