Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADD MY ARTICLE as link #1227

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 7 additions & 49 deletions src/client/components/home.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import h from 'react-hyperscript';
import { Component } from 'react';
import Popover from './popover/popover';
import RequestForm from './request-form';
import { makeClassList } from '../dom';
import EventEmitter from 'eventemitter3';
import { Carousel, CAROUSEL_CONTENT } from './carousel';
Expand Down Expand Up @@ -277,24 +276,7 @@ class Home extends Component {
}

render(){
const CTAPopover = props => {
return h(Popover, {
tippy: {
html: h(RequestForm, {
bus: this.bus,
submitBtnText: 'Create my article profile'
}),
onHidden: () => this.bus.emit('closecta'),
placement: props.placement || 'top'
}
}, props.children || []);
};

// const CTA = () => {
// return h(CTAPopover, [
// h('button.home-cta-button.salient-button', 'Get started')
// ]);
// };
const CTA = h('a', { href: 'document/new', target: '_blank' },[ h('button.home-intro-cta', 'Add my article') ]);

const ContactPopover = (props) => {
return h(Popover, {
Expand Down Expand Up @@ -412,11 +394,7 @@ class Home extends Component {
]),
` supported by their results, letting researchers explore a firsthand account of an article’s findings and connect to related articles and knowledge. `
]),
h(CTAPopover, {
placement: 'bottom'
}, [
h('button.home-intro-cta', 'Add my article')
])
CTA
]),
h('div.home-intro-figure'),
h('div.home-explore#home-explore', [
Expand All @@ -426,11 +404,7 @@ class Home extends Component {
]),
h('div.home-section.home-fluid-section.home-intro-figure-sm-alt-section', [
h('div.home-intro-figure-sm-alt'),
h(CTAPopover, {
placement: 'bottom'
}, [
h('button.home-intro-cta', 'Add my article')
])
CTA
]),
h('div.home-section.home-fluid-section', [
h('div.home-fluid-section-copy', [
Expand Down Expand Up @@ -470,11 +444,7 @@ class Home extends Component {
h('h3', `Don’t let your research get left behind`),
h('p', `Research is increasingly online, interactive, and interconnected. Biofactoid helps you connect your research to the world.`),
h('p.home-cta-p', [
h(CTAPopover, {
placement: 'bottom'
}, [
h('button.home-cta-alt-button', 'Add my article')
]),
CTA,
h('a', {
target: '_blank',
href: `/document/${SAMPLE_DOC_ID}`
Expand All @@ -498,11 +468,7 @@ class Home extends Component {
])
]),
h('p.home-cta-p', [
h(CTAPopover, {
placement: 'bottom'
}, [
h('button.home-cta-alt-button', 'Add my article')
]),
CTA,
h('a', {
target: '_blank',
href: `/document/${SAMPLE_DOC_ID}`
Expand All @@ -522,11 +488,7 @@ class Home extends Component {
h('h3', `Easy sharing `),
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.`),
h('p.home-cta-p', [
h(CTAPopover, {
placement: 'bottom'
}, [
h('button.home-cta-alt-button', 'Add my article')
]),
CTA,
h('a', {
target: '_blank',
href: `/document/${SAMPLE_DOC_ID}`
Expand All @@ -540,11 +502,7 @@ class Home extends Component {
h('div.home-fluid-section-phone-aoi')
]),
h('p.home-cta-p', [
h(CTAPopover, {
placement: 'bottom'
}, [
h('button.home-cta-alt-button', 'Add my article')
]),
CTA,
h('a', {
target: '_blank',
href: `/document/${SAMPLE_DOC_ID}`
Expand Down