Skip to content
This repository has been archived by the owner on Nov 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #399 from zarathustra323/mundo-authors-companies
Browse files Browse the repository at this point in the history
Add autores to nav menu; create companias section page
  • Loading branch information
zarathustra323 authored Aug 14, 2019
2 parents c7c42ca + dd4db89 commit 3c19f80
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/common/components/published-content/query.marko
Original file line number Diff line number Diff line change
Expand Up @@ -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
/>
</div>
<if(index === 1 || index === 6)>
Expand Down Expand Up @@ -75,6 +76,7 @@ $ const adCardInput = {
image-width=75
image-height=75
with-image=input.withImage
...input.item
/>
</@item>
</endeavor-item-list>
Expand Down
2 changes: 2 additions & 0 deletions sites/mundopmmi/config/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ module.exports = {
resources: {
label: 'Recursos',
items: [
{ href: '/autores', label: 'Autores' },
{ href: '/companias', label: 'Compañías' },
{ href: '/eventos', label: 'Eventos' },
{ href: '/videos', label: 'Vídeos' },
],
Expand Down
6 changes: 6 additions & 0 deletions sites/mundopmmi/server/routes/website-section.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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,
Expand Down
43 changes: 43 additions & 0 deletions sites/mundopmmi/server/templates/website-section/companias.marko
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { getAsObject } from '@base-cms/object-path';

$ const { site } = out.global;
$ const section = getAsObject(data, 'section');

<theme-default-website-section-layout section=section>
<@head>
<endeavor-ad-gam-head />
</@head>

<@above-container>
<endeavor-gam-ad-unit-out-of-page name="wa" />
<endeavor-gam-ad-unit-out-of-page name="reskin" />
<endeavor-gam-ad-unit-define-display name="lb1" modifiers=["top-of-page"] />
</@above-container>

<div class="page-wrapper mb-block">
<div class="row">
<div class="col">
<div class="page-wrapper__header">
<endeavor-breadcrumbs-website-section section=section />
<h1 class="page-wrapper__title">${section.name}</h1>
<if(section.description)>
<p class="page-wrapper__description">${section.description}</p>
</if>
</div>
</div>
</div>
</div>

<@below-container>
<div class="published-content-query-load-more">
<endeavor-published-content-query
query={
contentTypes: ["Company"],
limit: 100,
}
item={ imageUsePlaceholder: false }
layout="event"
/>
</div>
</@below-container>
</theme-default-website-section-layout>

0 comments on commit 3c19f80

Please sign in to comment.