Skip to content

Commit c731356

Browse files
committed
guides: web-analytics guide initial commit
1 parent 14e916c commit c731356

36 files changed

+662
-12
lines changed

guides/guides-base/src/components/Hero/Hero.jsx

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,22 +55,25 @@ const Subtitle = styled.div`
5555
`
5656

5757
const MediaContainer = styled.div`
58-
//background-image: url(${browserControls});
59-
//background-position: 11px 6px;
60-
//background-repeat: no-repeat;
61-
//background-color: white;
62-
//box-shadow: 1px 1px 4px 0 rgba(0, 0, 0, 0.15);
63-
//padding: 5px;
64-
//border-radius: 10px;
65-
padding-top: 20px;
66-
padding-bottom: 2px;
58+
${props => props.withFrame &&
59+
`
60+
background-image: url(${browserControls});
61+
background-position: 11px 6px;
62+
background-repeat: no-repeat;
63+
background-color: white;
64+
box-shadow: 1px 1px 4px 0 rgba(0, 0, 0, 0.15);
65+
padding: 5px;
66+
border-radius: 10px;
67+
padding-top: 20px;
68+
padding-bottom: 2px;
69+
`}
6770
${media.greaterThan("medium")`
6871
margin-left: 15px;
6972
`}
7073
img, video {
7174
max-width: 630px;
7275
width: 100%;
73-
//border: 10px solid #F3F3FB;
76+
${props => props.withFrame && `border: 10px solid #F3F3FB;`}
7477
border-radius: 10px;
7578
box-sizing: border-box;
7679
}
@@ -130,7 +133,8 @@ const Hero = ({
130133
media,
131134
title,
132135
subtitle,
133-
demoUrl
136+
demoUrl,
137+
withFrame
134138
}) => (
135139
<Container>
136140
<InnerContainer>
@@ -143,11 +147,15 @@ const Hero = ({
143147
</ButtonsContainer>
144148
{ socialButtons }
145149
</CopyContainer>
146-
<MediaContainer>
150+
<MediaContainer withFrame={withFrame}>
147151
{ media }
148152
</MediaContainer>
149153
</InnerContainer>
150154
</Container>
151155
);
152156

157+
Hero.defaultProps = {
158+
withFrame: false
159+
}
160+
153161
export default Hero;

guides/web-analytics/.gitignore

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
### Node ###
2+
# Logs
3+
logs
4+
*.log
5+
npm-debug.log*
6+
7+
# Runtime data
8+
pids
9+
*.pid
10+
*.seed
11+
*.pid.lock
12+
13+
# Directory for instrumented libs generated by jscoverage/JSCover
14+
lib-cov
15+
16+
# Coverage directory used by tools like istanbul
17+
coverage
18+
19+
# nyc test coverage
20+
.nyc_output
21+
22+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
23+
.grunt
24+
25+
# node-waf configuration
26+
.lock-wscript
27+
28+
# Compiled binary addons (http://nodejs.org/api/addons.html)
29+
build/Release
30+
31+
# Dependency directories
32+
node_modules
33+
jspm_packages
34+
35+
# Optional npm cache directory
36+
.npm
37+
38+
# Optional eslint cache
39+
.eslintcache
40+
41+
# Optional REPL history
42+
.node_repl_history
43+
44+
# Output of 'npm pack'
45+
*.tgz
46+
47+
# Yarn Integrity file
48+
.yarn-integrity
49+
50+
51+
# Build Files
52+
public/
53+
.cache/
54+
55+
# Gatsby context
56+
.gatsby-context.js
57+
58+
# Bundle stats
59+
bundle-stats.json
60+
61+
#Videos
62+
static/videos
63+
64+
#amplify
65+
amplify/\#current-cloud-backend
66+
amplify/.config/local-*
67+
amplify/mock-data
68+
amplify/backend/amplify-meta.json
69+
amplify/backend/awscloudformation
70+
build/
71+
dist/
72+
node_modules/
73+
aws-exports.js
74+
awsconfiguration.json

guides/web-analytics/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<p align="center"><a href="https://cube.dev"><img src="https://i.imgur.com/zYHXm4o.png" alt="Cube.js" width="300px"></a></p>
2+
3+
[Website](https://cube.dev)[Docs](https://cube.dev/docs)[Blog](https://cube.dev/blog)[Slack](https://slack.cube.dev)[Twitter](https://twitter.com/thecubejs)
4+
5+
# D3 Dashboard Guide
6+
You will learn how to build a D3 dashboard with React, Material UI and Cube.js. The guide covers setting up dashboard with Postgres, Cube.js, React and D3.js.
7+
You can also check out a [live demo here](https://d3-dashboard-demo.cube.dev/).
8+
9+
[The guide is available here.](https://d3-dashboard.cube.dev/)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"projectName": "web-analytics",
3+
"version": "2.0",
4+
"frontend": "javascript",
5+
"javascript": {
6+
"framework": "react",
7+
"config": {
8+
"SourceDir": "src",
9+
"DistributionDir": "public",
10+
"BuildCommand": "npm run-script build",
11+
"StartCommand": "npm run-script start"
12+
}
13+
},
14+
"providers": [
15+
"awscloudformation"
16+
]
17+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"hosting": {
3+
"S3AndCloudFront": {
4+
"service": "S3AndCloudFront",
5+
"providerPlugin": "awscloudformation"
6+
}
7+
}
8+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"bucketName": "web-analytics-20200401183103-hostingbucket"
3+
}

0 commit comments

Comments
 (0)