From e386a2420ad98b3823c4ca31f4ff588b9d42e5dc Mon Sep 17 00:00:00 2001 From: Jacob Bare Date: Wed, 14 Aug 2019 08:11:46 -0500 Subject: [PATCH 1/3] Add Autores to Recursos menu --- sites/mundopmmi/config/site.js | 1 + 1 file changed, 1 insertion(+) diff --git a/sites/mundopmmi/config/site.js b/sites/mundopmmi/config/site.js index 9e8be3866..5563bbef5 100644 --- a/sites/mundopmmi/config/site.js +++ b/sites/mundopmmi/config/site.js @@ -72,6 +72,7 @@ module.exports = { resources: { label: 'Recursos', items: [ + { href: '/autores', label: 'Autores' }, { href: '/eventos', label: 'Eventos' }, { href: '/videos', label: 'Vídeos' }, ], From 157a303e070d63450a8bdeec366db79e18352864 Mon Sep 17 00:00:00 2001 From: Jacob Bare Date: Wed, 14 Aug 2019 08:16:43 -0500 Subject: [PATCH 2/3] Pass item input into published content query items --- packages/common/components/published-content/query.marko | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/common/components/published-content/query.marko b/packages/common/components/published-content/query.marko index 21df00b20..6bab628e0 100644 --- a/packages/common/components/published-content/query.marko +++ b/packages/common/components/published-content/query.marko @@ -48,6 +48,7 @@ $ const adCardInput = { image-options={ w: 630, h: 270, fit: "crop", crop: "focalpoint", fpX: 0.5, fpY: 0.5 } image-position="top" modifiers=["card"] + ...input.item /> @@ -75,6 +76,7 @@ $ const adCardInput = { image-width=75 image-height=75 with-image=input.withImage + ...input.item /> From dd4db89a8ef826a6009c7e642f6f5647322f7fb4 Mon Sep 17 00:00:00 2001 From: Jacob Bare Date: Wed, 14 Aug 2019 08:16:53 -0500 Subject: [PATCH 3/3] Create companias section page --- sites/mundopmmi/config/site.js | 1 + .../server/routes/website-section.js | 6 +++ .../templates/website-section/companias.marko | 43 +++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 sites/mundopmmi/server/templates/website-section/companias.marko diff --git a/sites/mundopmmi/config/site.js b/sites/mundopmmi/config/site.js index 5563bbef5..7b65e3b7e 100644 --- a/sites/mundopmmi/config/site.js +++ b/sites/mundopmmi/config/site.js @@ -73,6 +73,7 @@ module.exports = { label: 'Recursos', items: [ { href: '/autores', label: 'Autores' }, + { href: '/companias', label: 'Compañías' }, { href: '/eventos', label: 'Eventos' }, { href: '/videos', label: 'Vídeos' }, ], diff --git a/sites/mundopmmi/server/routes/website-section.js b/sites/mundopmmi/server/routes/website-section.js index 0ac4353e2..8fd8366cc 100644 --- a/sites/mundopmmi/server/routes/website-section.js +++ b/sites/mundopmmi/server/routes/website-section.js @@ -7,6 +7,7 @@ const automatizacionTemplate = require('../templates/website-section/automatizac const empaqueTemplate = require('../templates/website-section/empaque'); const procesamientoTemplate = require('../templates/website-section/procesamiento'); const eventosTemplate = require('../templates/website-section/eventos'); +const companiasTemplate = require('../templates/website-section/companias'); module.exports = (app) => { app.get('/:alias(contact-us)', withWebsiteSection({ @@ -34,6 +35,11 @@ module.exports = (app) => { queryFragment, })); + app.get('/:alias(companias)', withWebsiteSection({ + template: companiasTemplate, + queryFragment, + })); + submissionHandler(app); app.get('/:alias([a-z0-9-/]+)', withWebsiteSection({ template: section, diff --git a/sites/mundopmmi/server/templates/website-section/companias.marko b/sites/mundopmmi/server/templates/website-section/companias.marko new file mode 100644 index 000000000..97bb646d3 --- /dev/null +++ b/sites/mundopmmi/server/templates/website-section/companias.marko @@ -0,0 +1,43 @@ +import { getAsObject } from '@base-cms/object-path'; + +$ const { site } = out.global; +$ const section = getAsObject(data, 'section'); + + + <@head> + + + + <@above-container> + + + + + +
+
+
+
+ +

${section.name}

+ +

${section.description}

+ +
+
+
+
+ + <@below-container> +
+ +
+ +