aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Wei <chenwei@byzantine-lab.io>2019-09-02 12:08:06 +0800
committerChen Wei <chenwei@byzantine-lab.io>2019-09-02 12:08:06 +0800
commit318252c1d999e398cdc9f43365622d1d0657a114 (patch)
treee34706bf25700640028e70bd1186fdf45ef5eb49
parent479851741cfc62491a16d1704f12ec523011e098 (diff)
downloadtangerine-official-website-318252c1d999e398cdc9f43365622d1d0657a114.tar.gz
tangerine-official-website-318252c1d999e398cdc9f43365622d1d0657a114.tar.zst
tangerine-official-website-318252c1d999e398cdc9f43365622d1d0657a114.zip
1. fix body scroll 2. update wiki 3. minor style update
-rw-r--r--src/components/LandingPage/Contact.js14
-rw-r--r--src/components/LandingPage/Resources.js2
-rw-r--r--src/components/LandingPage/Wallet.js3
-rw-r--r--src/components/header.js8
-rw-r--r--src/components/layout.js18
-rw-r--r--src/translations/en.json3
-rw-r--r--src/translations/zh-Hant.json11
7 files changed, 40 insertions, 19 deletions
diff --git a/src/components/LandingPage/Contact.js b/src/components/LandingPage/Contact.js
index 01522c0..98eb61f 100644
--- a/src/components/LandingPage/Contact.js
+++ b/src/components/LandingPage/Contact.js
@@ -1,7 +1,7 @@
import React from "react";
import styled from 'styled-components';
import { MOBILE_WIDTH } from 'src/constants/app';
-// import { FormattedMessage } from 'react-intl';
+import { FormattedMessage } from 'react-intl';
const Wrapper = styled.div`
display: flex;
@@ -24,12 +24,20 @@ const Title = styled.div`
const Email = styled.div`
font-weight: bold;
font-size: 20px;
+ & > a {
+ text-decoration: none;
+ color: white;
+ }
`;
const Contact = () => (
<Wrapper>
- <Title>Get Involved</Title>
- <Email>contact@tangerine-network.io</Email>
+ <Title><FormattedMessage id="get_involved" /></Title>
+ <Email>
+ <a href="mailto:contact@tangerine-network.io">
+ contact@tangerine-network.io
+ </a>
+ </Email>
</Wrapper>
);
diff --git a/src/components/LandingPage/Resources.js b/src/components/LandingPage/Resources.js
index e9ff30d..0177b32 100644
--- a/src/components/LandingPage/Resources.js
+++ b/src/components/LandingPage/Resources.js
@@ -75,7 +75,7 @@ const ResourceItems = [
content: 'build_your_dapps',
links: [{
title: 'Resource_Wiki',
- link: 'https://byzantine-lab.gitlab.io/wiki/#/Dapp-Development-Guide'
+ link: 'https://tangerine-network.github.io/wiki/#/Dapp-Development-Guide?id=dapp-development-guide'
}]
}
];
diff --git a/src/components/LandingPage/Wallet.js b/src/components/LandingPage/Wallet.js
index fc74b75..05062e5 100644
--- a/src/components/LandingPage/Wallet.js
+++ b/src/components/LandingPage/Wallet.js
@@ -58,6 +58,9 @@ const Button = styled.div`
font-size: 14px;
/* font-weight: normal; */
}
+ &:hover {
+ background-color: #F8F8F8;
+ }
`;
const Padding = styled.div`
flex: 1;
diff --git a/src/components/header.js b/src/components/header.js
index 9d763db..4024f06 100644
--- a/src/components/header.js
+++ b/src/components/header.js
@@ -163,6 +163,13 @@ const Dropdown = styled.div`
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.2);
`;
+const Saparater = styled.div`
+ height: 5px;
+ width: 30px;
+ background-color: #c45b26;
+ margin-bottom: 40px;
+`;
+
const Header = ({ showup }) => {
const [langSelectOn, setLangSelect] = useState();
const [mobileMenu, setMobileMenu] = useState(null);
@@ -187,6 +194,7 @@ const Header = ({ showup }) => {
</Link>
))}
<Padding />
+ <Saparater />
{Object.keys(Locales).map((it, key) => (it !== 'default') && (
<Link
ignoreLocale
diff --git a/src/components/layout.js b/src/components/layout.js
index 2be2156..f7693db 100644
--- a/src/components/layout.js
+++ b/src/components/layout.js
@@ -5,7 +5,7 @@
* See: https://www.gatsbyjs.org/docs/use-static-query/
*/
-import React, { useCallback, useRef, useState } from "react";
+import React, { useCallback, useState, useEffect } from "react";
import { Helmet } from 'react-helmet';
import { useStaticQuery, graphql } from "gatsby"
import styled from "styled-components";
@@ -29,7 +29,7 @@ const messages = {
const Wrapper = styled.div`
position: relative;
- height: 100vh;
+ height: 100%;
width: 100%;
overflow-y: auto;
display: flex;
@@ -100,10 +100,9 @@ const InjectedSEO = injectIntl(({ intl }) => {
const Layout = ({ children, locale }) => {
const [showHeader, setShowheader] = useState(true);
- const wrapperRef = useRef(null);
const scrollHandler = useCallback(throttle(() => {
- const scrollTop = wrapperRef.current.scrollTop;
+ const scrollTop = window.scrollY;
if ((scrollTop <= 100) && !showHeader) {
setShowheader(true);
} else if (showHeader &&
@@ -119,16 +118,17 @@ const Layout = ({ children, locale }) => {
previousScrollPosition = scrollTop;
}, 100), [showHeader]);
+ useEffect(() => {
+ const body = document.body;
+ body.onscroll = scrollHandler;
+ }, [scrollHandler]);
+
return (
<IntlProvider
locale={locale}
messages={messages[locale] || messages['en']}
>
- <Wrapper
- onScroll={scrollHandler}
- ref={wrapperRef}
- >
-
+ <Wrapper>
<InjectedSEO />
<Header showup={showHeader} />
<Main>
diff --git a/src/translations/en.json b/src/translations/en.json
index 089ffe0..c976ee2 100644
--- a/src/translations/en.json
+++ b/src/translations/en.json
@@ -32,5 +32,6 @@
"read_the_paper": "Read the paper",
"Faucet": "Faucet",
"get_mainnet_token": "Get Mainnet Token",
- "see_how_it_works": "See How It Works"
+ "see_how_it_works": "See How It Works",
+ "get_involved": "Get Involved"
} \ No newline at end of file
diff --git a/src/translations/zh-Hant.json b/src/translations/zh-Hant.json
index b1bccce..3668b4c 100644
--- a/src/translations/zh-Hant.json
+++ b/src/translations/zh-Hant.json
@@ -17,19 +17,20 @@
"harvest-description": "成為橘子鍊生態園的歡樂小果農, 來賺取多六百萬顆橘子幣吧",
"Join Partner Program": "參加果農養成計劃",
"Learn More": "來瞧瞧更多",
- "Tangerine-Wallet": "Tangerine Wallet",
+ "Tangerine-Wallet": "Tangerine 錢包",
"browser-extension": "瀏覽器外掛",
"download-chrome-extension": "下載 Chrome 外掛",
"download-firefox-extension": "下載 Firefox 外掛",
- "tangerine-explorer": "Tangerine Explorer",
+ "tangerine-explorer": "柑橘瀏覽器",
"tangerine-explorer-description": "Empowering Your Mining Experience",
- "build_your_dapps": "Build your Dapps on Tangerine Network",
+ "build_your_dapps": "在柑橘網路上打造你的DApp",
"Resource_Wiki": "Wiki",
"Manifesto": "Manifesto",
- "Consensus_Algorithm": "Consensus Algorithm",
+ "Consensus_Algorithm": "共識演算法",
"Paper": "Paper",
"read_the_paper": "Read the paper",
"Faucet": "Faucet",
"get_mainnet_token": "Get Mainnet Token",
- "see_how_it_works": "See How It Works"
+ "see_how_it_works": "See How It Works",
+ "get_involved": "Get Involved"
} \ No newline at end of file