Skip to content

Commit b6c3dbd

Browse files
authored
Merge pull request #1227 from PathwayCommons/iss1056_add-article-home-ez
2 parents a2916cd + 4ae70c1 commit b6c3dbd

File tree

1 file changed

+7
-49
lines changed

1 file changed

+7
-49
lines changed

src/client/components/home.js

Lines changed: 7 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import h from 'react-hyperscript';
22
import { Component } from 'react';
33
import Popover from './popover/popover';
4-
import RequestForm from './request-form';
54
import { makeClassList } from '../dom';
65
import EventEmitter from 'eventemitter3';
76
import { Carousel, CAROUSEL_CONTENT } from './carousel';
@@ -277,24 +276,7 @@ class Home extends Component {
277276
}
278277

279278
render(){
280-
const CTAPopover = props => {
281-
return h(Popover, {
282-
tippy: {
283-
html: h(RequestForm, {
284-
bus: this.bus,
285-
submitBtnText: 'Create my article profile'
286-
}),
287-
onHidden: () => this.bus.emit('closecta'),
288-
placement: props.placement || 'top'
289-
}
290-
}, props.children || []);
291-
};
292-
293-
// const CTA = () => {
294-
// return h(CTAPopover, [
295-
// h('button.home-cta-button.salient-button', 'Get started')
296-
// ]);
297-
// };
279+
const CTA = h('a', { href: 'document/new', target: '_blank' },[ h('button.home-intro-cta', 'Add my article') ]);
298280

299281
const ContactPopover = (props) => {
300282
return h(Popover, {
@@ -412,11 +394,7 @@ class Home extends Component {
412394
]),
413395
` supported by their results, letting researchers explore a firsthand account of an article’s findings and connect to related articles and knowledge. `
414396
]),
415-
h(CTAPopover, {
416-
placement: 'bottom'
417-
}, [
418-
h('button.home-intro-cta', 'Add my article')
419-
])
397+
CTA
420398
]),
421399
h('div.home-intro-figure'),
422400
h('div.home-explore#home-explore', [
@@ -426,11 +404,7 @@ class Home extends Component {
426404
]),
427405
h('div.home-section.home-fluid-section.home-intro-figure-sm-alt-section', [
428406
h('div.home-intro-figure-sm-alt'),
429-
h(CTAPopover, {
430-
placement: 'bottom'
431-
}, [
432-
h('button.home-intro-cta', 'Add my article')
433-
])
407+
CTA
434408
]),
435409
h('div.home-section.home-fluid-section', [
436410
h('div.home-fluid-section-copy', [
@@ -470,11 +444,7 @@ class Home extends Component {
470444
h('h3', `Don’t let your research get left behind`),
471445
h('p', `Research is increasingly online, interactive, and interconnected. Biofactoid helps you connect your research to the world.`),
472446
h('p.home-cta-p', [
473-
h(CTAPopover, {
474-
placement: 'bottom'
475-
}, [
476-
h('button.home-cta-alt-button', 'Add my article')
477-
]),
447+
CTA,
478448
h('a', {
479449
target: '_blank',
480450
href: `/document/${SAMPLE_DOC_ID}`
@@ -498,11 +468,7 @@ class Home extends Component {
498468
])
499469
]),
500470
h('p.home-cta-p', [
501-
h(CTAPopover, {
502-
placement: 'bottom'
503-
}, [
504-
h('button.home-cta-alt-button', 'Add my article')
505-
]),
471+
CTA,
506472
h('a', {
507473
target: '_blank',
508474
href: `/document/${SAMPLE_DOC_ID}`
@@ -522,11 +488,7 @@ class Home extends Component {
522488
h('h3', `Easy sharing `),
523489
h('p', `Want your colleagues to know about an interesting report? Share an interactive graphical abstract via social media or email with just a click.`),
524490
h('p.home-cta-p', [
525-
h(CTAPopover, {
526-
placement: 'bottom'
527-
}, [
528-
h('button.home-cta-alt-button', 'Add my article')
529-
]),
491+
CTA,
530492
h('a', {
531493
target: '_blank',
532494
href: `/document/${SAMPLE_DOC_ID}`
@@ -540,11 +502,7 @@ class Home extends Component {
540502
h('div.home-fluid-section-phone-aoi')
541503
]),
542504
h('p.home-cta-p', [
543-
h(CTAPopover, {
544-
placement: 'bottom'
545-
}, [
546-
h('button.home-cta-alt-button', 'Add my article')
547-
]),
505+
CTA,
548506
h('a', {
549507
target: '_blank',
550508
href: `/document/${SAMPLE_DOC_ID}`

0 commit comments

Comments
 (0)