Skip to content

Commit

Permalink
Merge pull request #28 from B77Mills/udateWhyWithPDF
Browse files Browse the repository at this point in the history
Update Why High Oliec page with pdf card
  • Loading branch information
B77Mills authored Nov 19, 2021
2 parents 8f68bab + c4803fe commit e344125
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/components/article-grid-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
:title="article.title"
:image="getImagePath(article.image)"
:teaser="article.teaser"
:href="`/article/${article.slug}`"
:href="(article.href) ? article.href : `/article/${article.slug}`"
:target="(article.target) ? article.target : null"
/>
<slot name="grid-after" />
</div>
Expand Down
6 changes: 5 additions & 1 deletion app/components/common/home-page-article-block.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="bg-white shadow flex flex-col h-full">
<nuxt-link :to="href">
<nuxt-link :to="href" :target="target">
<img class="w-full h-auto" :src="image">
</nuxt-link>
<div class="p-3 flex flex-col h-full">
Expand Down Expand Up @@ -42,6 +42,10 @@ export default {
type: String,
required: true,
},
target: {
type: String,
default: null,
},
teaser: {
type: String,
default: null,
Expand Down
2 changes: 2 additions & 0 deletions app/graphql/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export const LOAD_ARTICLES_FOR_SECTION = gql`
id
title
image
href
target
slug
teaser
}
Expand Down
Binary file not shown.
4 changes: 4 additions & 0 deletions server/src/graphql/definitions/article.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ type Article {
title: String!
"The article teaser."
image: String
"The article href."
href: String
"The article href target."
target: String
"The article image."
teaser: String
"The article body."
Expand Down
11 changes: 11 additions & 0 deletions server/src/graphql/resolvers/article.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,17 @@ const articleMap = [
`,
sections: ['knowledge-center'],
},
{
title: 'Double-Crop Opportunities',
image: 'https://img.highoilsoy.com/doublecrop-hosoy-rapid-expansion-0921-revisedV2.jpg',
href: '/doublecrop-hosoy-rapid-expansion-0921-revisedV2.pdf',
target: '_blank',
teaser: 'Consider high oleic soybeans in a double crop system to maximize profit potential',
body: `
<p>Consider high oleic soybeans in a double crop system to maximize profit potential</p>
`,
sections: ['why-high-oleic'],
},
].reduce((map, article) => {
const slug = sluggify(article.title);
map.set(slug, {
Expand Down

0 comments on commit e344125

Please sign in to comment.