Skip to content

Commit ed9d96a

Browse files
committed
fixes svg animation and small style fixes
1 parent 4a7e66a commit ed9d96a

File tree

8 files changed

+256
-84
lines changed

8 files changed

+256
-84
lines changed

src/theme/components/graph.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import React from 'react';
22
import styled, { keyframes } from 'styled-components';
3-
4-
import useBaseUrl from '@docusaurus/useBaseUrl';
5-
// const animatedSvg = useBaseUrl('img/gulp-graph1.svg');
6-
7-
// import { ReactComponent as GulpVisual } from animatedSvg;
3+
import Svg from './svg';
84

95
const fill = keyframes`
106
0% {
@@ -42,7 +38,7 @@ const stroke = keyframes`
4238
}
4339
`
4440

45-
const GulpVisual = styled.object`
41+
const GulpVisual = styled.div`
4642
width: 100%;
4743
height: 100%;
4844
@@ -100,7 +96,9 @@ const Graph = (props) => {
10096
<p>or any otehr templating language</p>
10197
</li>
10298
</TechList>
103-
<GulpVisual type="image/svg+xml" data={useBaseUrl('img/gulp-graph1.svg')} />
99+
<GulpVisual>
100+
<Svg />
101+
</GulpVisual>
104102
<TechList>
105103
<li>
106104
<p className="uppercase">html</p>

src/theme/components/hero-animation.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ import GulpGraph from './graph';
66
import GulpSource from './source';
77

88
const AnimationContainer = styled.div`
9+
.fade {
10+
min-height: 78vh;
11+
}
12+
913
.fade-entering, .fade-exiting {
1014
opacity: 1%;
1115
}
@@ -54,9 +58,11 @@ class Animation extends React.Component {
5458
constructor(props) {
5559
super(props);
5660
this.state = {viewSource: false}
61+
62+
this.handleClick = this.handleClick.bind(this);
5763
}
5864

59-
handleClick(e) {
65+
handleClick() {
6066
this.setState({
6167
viewSource: !this.state.viewSource
6268
});

src/theme/components/svg.js

Lines changed: 225 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/theme/sections/benefit.js

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ import styled from 'styled-components';
44
const BenefitContainer = styled.div`
55
background: var(--light-gray);
66
box-shadow: 1px 2px 5px 1px #ddd;
7-
padding: var(--medium);
7+
padding: var(--big) var(--medium);
88
99
@media(min-width: 768px) {
1010
min-height: 52vh;
11-
// transition: box-shadow .2s ease-in;
11+
display: flex;
12+
flex-direction: column;
13+
justify-content: start;
1214
13-
// &:hover {
14-
// box-shadow: 4px 5px 7px 3px #ddd;
15-
// transition: box-shadow .2s ease-in;
16-
// }
15+
p {
16+
margin: var(--big) 0;
17+
}
1718
}
1819
`
1920

@@ -23,6 +24,12 @@ const Heading = styled.div`
2324
img {
2425
margin-right: var(--tiny);
2526
}
27+
28+
h3 {
29+
margin: 0;
30+
display: flex;
31+
align-self: center;
32+
}
2633
`
2734
const Benefit = (props) => {
2835
return (

src/theme/sections/benefits.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const Benefits = (props) => {
3030
<BenefitsContainer>
3131
<Benefit icon={useBaseUrl('img/code-block.svg')} title="Simple Usage" text="By preferring code over configuration, node best practices, and a minimal API surface - gulp makes things simple like never before. By preferring code over configuration, node best practices, and a minimal API surface - gulp makes things simple like never before."/>
3232
<Benefit icon={useBaseUrl('img/timer.svg')} title="Efficient Builds" text="Using the power of node streams, gulp gives you fast builds that don’t write intermediary files to disk. Using the power of node streams, gulp gives you fast builds that don’t write intermediary files to disk."/>
33-
<Benefit icon={useBaseUrl('img/atom-benefit.svg')} title="Quality Ecosystem" text="By enforcing strict guidelines, we ensure our plugins stay simple and work as expected. By enforcing strict guidelines, we ensure our plugins stay simple and work as expected."/>
33+
<Benefit icon={useBaseUrl('img/system.svg')} title="Quality Ecosystem" text="By enforcing strict guidelines, we ensure our plugins stay simple and work as expected. By enforcing strict guidelines, we ensure our plugins stay simple and work as expected."/>
3434
</BenefitsContainer>
3535
)
3636
}

src/theme/sections/plugin.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ const PluginContainer = styled.div`
55
box-shadow: 1px 2px 5px 1px #ddd;
66
background: white;
77
padding: var(--small);
8+
min-height: 184px;
89
display: flex;
910
width: 100%;
1011
flex-direction: column;
11-
justify-items: center;
12+
justify-content: center;
1213
1314
@media(min-width: 768px) {
1415
transform: scale(0.95);

static/img/gulp-graph1.svg

Lines changed: 0 additions & 68 deletions
This file was deleted.

static/img/system.svg

Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)