Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

[website] Add IIB banner (#254)

Shan He18764a954d90
diff --git a/examples/demo-app/src/app.js b/examples/demo-app/src/app.js
index 7f15e75ff..b2372695a 100644
--- a/examples/demo-app/src/app.js
+++ b/examples/demo-app/src/app.js
@@ -45,6 +45,7 @@ import Processors from 'kepler.gl/processors';
/* eslint-enable no-unused-vars */
const bannerHeight = 30;
+const BannerKey = 'kgHideBanner-iiba';
const GlobalStyleDiv = styled.div`
font-family: ff-clan-web-pro, 'Helvetica Neue', Helvetica, sans-serif;
@@ -79,11 +80,9 @@ class App extends Component {
componentDidMount() {
// delay 2s to show the banner
- /* disable show banners
- if (!window.localStorage.getItem('kgHideBanner')) {
+ if (!window.localStorage.getItem(BannerKey)) {
window.setTimeout(this._showBanner, 3000);
}
- */
// load sample data
// this._loadSampleData();
}
@@ -109,7 +108,7 @@ class App extends Component {
_disableBanner = () => {
this._hideBanner();
- window.localStorage.setItem('kgHideBanner', 'true');
+ window.localStorage.setItem(BannerKey, 'true');
};
_loadSampleData() {
@@ -193,6 +192,7 @@ class App extends Component {
<Banner
show={this.state.showBanner}
height={bannerHeight}
+ bgColor="#82368c"
onClose={this._hideBanner}
>
<Announcement onDisable={this._disableBanner}/>
@@ -217,7 +217,6 @@ class App extends Component {
width={width}
height={height - (showBanner ? bannerHeight : 0)}
/>
-
</div>
</GlobalStyleDiv>
);
diff --git a/examples/demo-app/src/components/announcement.js b/examples/demo-app/src/components/announcement.js
index 8f623cd87..70a001597 100644
--- a/examples/demo-app/src/components/announcement.js
+++ b/examples/demo-app/src/components/announcement.js
@@ -29,7 +29,7 @@ const StyledLink = styled.a`
text-decoration: underline !important;
color: white;
font-weight: 500;
-
+
:hover {
cursor: pointer;
}
@@ -39,15 +39,15 @@ const DisableBanner = styled.div`
display: inline-block;
margin-left: 20px;
`;
-const FormLink = 'https://docs.google.com/forms/d/1o2VbSIKiRfoTJLi6nGzxNHgDA1Yu-UnNOHglPJvPWpc/edit';
+const FormLink = 'https://www.informationisbeautifulawards.com/showcase/3082-kepler-gl';
const Announcement = ({onDisable}) => (
<StyledText>
- <span>Thanks for your interests in kepler.gl. Please help us make it better by taking </span>
- <StyledLink target="_blank" href={FormLink}>this survey</StyledLink>.
- <span> It only takes 5 minutes!</span>
+ <span>Kepler.gl is shortlisted in the Information is Beautiful Award. Vote for us at </span>
+ <StyledLink target="_blank" href={FormLink}>this link</StyledLink>
+ <span> before Fri 19th Oct!</span>
{onDisable ? <DisableBanner>
- <StyledLink onClick={onDisable}>Already took it</StyledLink>
+ <StyledLink onClick={onDisable}>Already Voted!</StyledLink>
</DisableBanner> : null}
</StyledText>
);
diff --git a/examples/demo-app/src/components/banner.js b/examples/demo-app/src/components/banner.js
index d8d016b71..e333b0543 100644
--- a/examples/demo-app/src/components/banner.js
+++ b/examples/demo-app/src/components/banner.js
@@ -34,7 +34,7 @@ const StyledBanner = styled.div`
transition: top 1s;
width: 100%;
z-index: 9999;
-
+
svg:hover {
cursor: pointer;
}