Feature/animations (#6)
* test animation * test two part video * new video test * replace videos with gifs * rename videos folder to images * sol-cov gifs * renames variables * compiler gif * change in hero srcset * better positioning of hero image
BIN
packages/dev-tools-pages/assets/images/sol-compiler@1x.gif
Normal file
|
After Width: | Height: | Size: 809 KiB |
BIN
packages/dev-tools-pages/assets/images/sol-compiler@2x.gif
Normal file
|
After Width: | Height: | Size: 1.9 MiB |
BIN
packages/dev-tools-pages/assets/images/sol-cov@1x.gif
Normal file
|
After Width: | Height: | Size: 571 KiB |
BIN
packages/dev-tools-pages/assets/images/sol-cov@2x.gif
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
packages/dev-tools-pages/assets/images/sol-profiler@1x.gif
Normal file
|
After Width: | Height: | Size: 307 KiB |
BIN
packages/dev-tools-pages/assets/images/sol-profiler@2x.gif
Normal file
|
After Width: | Height: | Size: 535 KiB |
BIN
packages/dev-tools-pages/assets/images/sol-trace@1x.gif
Normal file
|
After Width: | Height: | Size: 409 KiB |
BIN
packages/dev-tools-pages/assets/images/sol-trace@2x.gif
Normal file
|
After Width: | Height: | Size: 983 KiB |
@@ -6,16 +6,26 @@ import { withContext, Props } from './withContext';
|
||||
import Button from './Button';
|
||||
import { Beta } from './Typography';
|
||||
|
||||
const IMAGE_WIDTH = 2560;
|
||||
const IMAGE_HEIGHT = 800;
|
||||
|
||||
function Hero(props: Props) {
|
||||
const { subtitle, tagline } = props;
|
||||
const { subtitle, tagline, title } = props;
|
||||
|
||||
return (
|
||||
<StyledHero>
|
||||
<Subtitle>{subtitle}</Subtitle>
|
||||
<Tagline as="p">{tagline}</Tagline>
|
||||
<Button as="a" href="#" large>
|
||||
Read the Docs
|
||||
</Button>
|
||||
</StyledHero>
|
||||
<React.Fragment>
|
||||
<StyledHero>
|
||||
<Subtitle>{subtitle}</Subtitle>
|
||||
<Tagline as="p">{tagline}</Tagline>
|
||||
<Button as="a" href="#" large>
|
||||
Read the Docs
|
||||
</Button>
|
||||
</StyledHero>
|
||||
|
||||
<ImageContainer>
|
||||
<Image src={`/images/${title}@1x.gif`} srcSet={`/images/${title}@1x.gif, /images/${title}@2x.gif 2x`} />
|
||||
</ImageContainer>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -51,4 +61,22 @@ const Tagline = styled(Beta)`
|
||||
`};
|
||||
`;
|
||||
|
||||
const ImageContainer = styled.div`
|
||||
width: 100%;
|
||||
height: ${IMAGE_HEIGHT}px;
|
||||
position: absolute;
|
||||
top: 6.875rem;
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
z-index: -1;
|
||||
`;
|
||||
|
||||
const Image = styled.img`
|
||||
width: ${IMAGE_WIDTH}px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translate(-50%);
|
||||
`;
|
||||
|
||||
export default withContext(Hero);
|
||||
|
||||
@@ -84,7 +84,11 @@ module.exports = (_env, argv) => {
|
||||
let plugins = [
|
||||
new CleanWebpackPlugin('public'),
|
||||
...pages.map(p => new HtmlWebpackPlugin(p)),
|
||||
new CopyWebpackPlugin([{ from: 'assets/crawl.html', to: 'index.html' }, { from: 'assets/fonts', to: 'fonts' }]),
|
||||
new CopyWebpackPlugin([
|
||||
{ from: 'assets/crawl.html', to: 'index.html' },
|
||||
{ from: 'assets/fonts', to: 'fonts' },
|
||||
{ from: 'assets/images', to: 'images' },
|
||||
]),
|
||||
];
|
||||
if (argv.mode === 'development') {
|
||||
config.mode = 'development';
|
||||
|
||||