Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a66bc1cedc |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wedding",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"private": true,
|
||||
"engines": {
|
||||
"node": ">=6.5",
|
||||
|
||||
@@ -13,6 +13,10 @@ html {
|
||||
line-height: 1.375; /* ~22px */
|
||||
}
|
||||
|
||||
body {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0074c2;
|
||||
}
|
||||
|
||||
@@ -4,8 +4,14 @@
|
||||
right: 0;
|
||||
left: 0;
|
||||
height: 40px;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
overflow: hidden;
|
||||
z-index: 100;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
transition: background 0.3s, ease-in;
|
||||
}
|
||||
|
||||
.navDark {
|
||||
background: rgba(60, 60, 60, 0.95);
|
||||
}
|
||||
|
||||
.container {
|
||||
|
||||
@@ -8,12 +8,40 @@ class Navigation extends React.Component {
|
||||
current: PropTypes.string,
|
||||
};
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
scrollAtTop: true,
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
window.addEventListener('scroll', this.handleScroll);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener('scroll', this.handleScroll);
|
||||
}
|
||||
|
||||
handleScroll = (event) => {
|
||||
const scrollTop = event.srcElement.body.scrollTop;
|
||||
this.setState({
|
||||
scrollAtTop: scrollTop < 10,
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
if (!this.props.current) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<div className={s.root} role="navigation">
|
||||
<div
|
||||
className={[
|
||||
s.root,
|
||||
this.state.scrollAtTop ? null : s.navDark,
|
||||
].join(' ')}
|
||||
role="navigation"
|
||||
>
|
||||
<div className={s.container}>
|
||||
<Link className={[s.link, this.props.current === 'home' ? s.active : null].join(' ')} to="/">RSVP</Link>
|
||||
<Link className={[s.link, this.props.current === 'ceremony' ? s.active : null].join(' ')} to="/church">Church</Link>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
background: url('/img/offley_2560.jpg');
|
||||
background-size: cover;
|
||||
background-position-x: 54%;
|
||||
background-position-y: 66%;
|
||||
background-color: #c1c1c1;
|
||||
filter: grayscale(1) brightness(0.4);
|
||||
z-index: -1;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
background: url('/img/church_2560.jpg');
|
||||
background-size: cover;
|
||||
background-position-x: 54%;
|
||||
background-position-y: 66%;
|
||||
background-color: #c1c1c1;
|
||||
filter: grayscale(1) brightness(0.4);
|
||||
z-index: -1;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
background: url('/img/prague_2560.jpg');
|
||||
background-size: cover;
|
||||
background-position-x: 54%;
|
||||
background-position-y: 66%;
|
||||
background-color: #c1c1c1;
|
||||
filter: grayscale(1) brightness(0.6);
|
||||
z-index: -1;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
background: url('/img/offley_2560.jpg');
|
||||
background-size: cover;
|
||||
background-position-x: 54%;
|
||||
background-position-y: 66%;
|
||||
background-color: #c1c1c1;
|
||||
filter: grayscale(1) brightness(0.4);
|
||||
z-index: -1;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
background: url('/img/cervenalhota_2560.jpg');
|
||||
background-size: cover;
|
||||
background-position-x: 30%;
|
||||
background-position-y: 66%;
|
||||
background-color: #c1c1c1;
|
||||
filter: grayscale(1) brightness(0.6);
|
||||
z-index: -1;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
background: url('/img/offley_2560.jpg');
|
||||
background-size: cover;
|
||||
background-position-x: 54%;
|
||||
background-position-y: 66%;
|
||||
background-color: #c1c1c1;
|
||||
filter: grayscale(1) brightness(0.4);
|
||||
z-index: -1;
|
||||
|
||||
Reference in New Issue
Block a user