site: add promote link

This commit is contained in:
afc163 2018-10-23 12:21:26 +08:00
parent ea3e923349
commit 8ccd6b8277
3 changed files with 33 additions and 4 deletions

View File

@ -375,3 +375,13 @@ svg {
}
}
}
.banner-1024 {
cursor: pointer;
transition: all .4s;
display: block;
&:hover {
transform: translateY(-16px) scale(1.01);
}
}

View File

@ -50,10 +50,13 @@ class Banner extends React.PureComponent {
<ScrollParallax location="banner" className="banner-bg" animation={{ playScale: [1, 1.5], rotate: 0 }} />
</div>
<QueueAnim className={`${className} page`} type="alpha" delay={150}>
{isMobile && (
<div className="img-wrapper" key="image">
<BannerImage />
</div>)}
{
isMobile && (
<div className="img-wrapper" key="image">
<BannerImage />
</div>
)
}
<QueueAnim
className="text-wrapper"
key="text"

View File

@ -1,6 +1,7 @@
import React from 'react';
import TweenOne from 'rc-tween-one';
import PathPlugin from 'rc-tween-one/lib/plugin/PathPlugin';
import moment from 'moment';
TweenOne.plugins.push(PathPlugin);
const duration = 7000;
@ -58,6 +59,21 @@ function TweenOneG(props) {
}
export default function BannerImage() {
if (moment().format('YYYY-MM-DD') === '2018-10-24') {
return (
<a
href="https://1024.yuque.com"
target="_blank"
rel="noopener noreferrer"
className="banner-1024"
>
<img
src="https://gw.alipayobjects.com/zos/rmsportal/BaqKyDBXRAzoncSoBQGU.svg"
alt="1024"
/>
</a>
);
}
return (
<svg width="482px" height="500px" viewBox="0 0 482 500">
<defs>