-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
380 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React from 'react'; | ||
import styles from '../styles/Mainstage.module.css'; | ||
|
||
function getRandomInt(max) { | ||
return Math.floor(Math.random() * Math.floor(max)); | ||
} | ||
|
||
const Animation = React.memo(() => { | ||
console.log('animation rerendered'); | ||
return ( | ||
<span className={styles.track}> | ||
{Array.apply(null, { length: 4 }).map(() => ( | ||
<p | ||
className={styles.emojiAnimationContainer} | ||
style={{ | ||
color: 'red', | ||
overflow: 'hidden', | ||
animationDelay: `${getRandomInt(2000)}ms`, | ||
transform: `translate(${getRandomInt(40)}px, ${getRandomInt(0)}px)`, | ||
}} | ||
> | ||
❤ | ||
</p> | ||
))} | ||
{Array.apply(null, { length: 4 }).map(() => ( | ||
<p | ||
className={styles.emojiAnimationContainer} | ||
style={{ | ||
overflow: 'hidden', | ||
animationDelay: `${getRandomInt(2000)}ms`, | ||
transform: `translate(${getRandomInt(40)}px, ${getRandomInt(0)}px)`, | ||
}} | ||
> | ||
👍 | ||
</p> | ||
))} | ||
</span> | ||
); | ||
}); | ||
|
||
export default Animation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,29 @@ | ||
import '../styles/Layout.module.css' | ||
import Footer from './footer' | ||
import Menubar from './menubar' | ||
|
||
import '../styles/Layout.module.css'; | ||
import Footer from './footer'; | ||
import Menubar from './menubar'; | ||
import BookmarkSVG from '/public/svg/bookmark.js'; | ||
import styles from '../styles/Mainstage.module.css'; | ||
import { useRouter } from 'next/router'; | ||
|
||
function Layout(props) { | ||
|
||
return ( | ||
<> | ||
<Menubar menu={props.menu.topNavItems} /> | ||
{props.children} | ||
<Footer></Footer> | ||
</> | ||
) | ||
const { pathname } = useRouter(); | ||
return ( | ||
<> | ||
<Menubar menu={props.menu.topNavItems} /> | ||
{props.children} | ||
<Footer></Footer> | ||
{pathname === '/virtualconf/mainstage' && ( | ||
<p className={styles.announcement}> | ||
<span className={styles.announcement__svg}> | ||
<BookmarkSVG /> | ||
</span>{' '} | ||
Bookmark this page and come back on{' '} | ||
<span className={styles.announcement__text}>April 6</span> for the | ||
LIVE conference | ||
</p> | ||
)} | ||
</> | ||
); | ||
} | ||
|
||
export default Layout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.