Skip to content

Commit 5789e97

Browse files
committed
feat: adding an advertisement (displayed on all pages)
Displaying a hard-coded advertisement for ag-grid. However we should be able to tweak the code to abstract the content if needed down the road.
1 parent 99cfb49 commit 5789e97

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

assets/ag-grid-logo.png

6.31 KB
Loading
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@import 'functions';
2+
3+
.advertisement {
4+
position: fixed;
5+
display: flex;
6+
width: 250px;
7+
height: calc(100vh - 150px);
8+
margin-top: 1.5em;
9+
margin-left: calc(-250px - 1.5em);
10+
padding: 0 1.5em;
11+
flex-wrap: wrap;
12+
justify-content: center;
13+
align-items: flex-start;
14+
align-content: flex-start;
15+
border-right: 1px solid getColor(concrete);
16+
overflow: hidden;
17+
transition: background-color 250ms;
18+
19+
&:hover {
20+
background-color: getColor(concrete);
21+
}
22+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import React from 'react';
2+
import Link from '../link/link';
3+
import './advertisement-style';
4+
5+
// Imports for Ad Content
6+
import AGLogo from '../../assets/ag-grid-logo.png';
7+
import WebpackIcon from '../../assets/icon-square-small.svg';
8+
9+
export default ({ distanceFromTop, height }) => {
10+
return (
11+
<Link
12+
className="advertisement"
13+
to="https://www.ag-grid.com/?utm_source=webpack&utm_medium=banner&utm_campaign=sponsorship"
14+
style={{
15+
top: distanceFromTop,
16+
height: `calc(${height}px - 3em)`
17+
}}>
18+
19+
<img src={ AGLogo } />
20+
<img src={ WebpackIcon } style={{ width: '100px' }} />
21+
<div style={{
22+
marginTop: '1em',
23+
fontSize: '2em',
24+
textAlign: 'center',
25+
color: '#535353'
26+
}}>
27+
ag-grid is proud to partner with webpack
28+
</div>
29+
30+
</Link>
31+
);
32+
};

0 commit comments

Comments
 (0)