Skip to content

Commit

Permalink
style: Add cute animation in landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
mithi committed Jul 20, 2020
1 parent 17313a7 commit 79010d9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class App extends React.Component {
</div>
{this.hexapodPlot()}
</div>
<NavDetailed />
{this.state.inHexapodPage ? <NavDetailed /> : null}
</Router>
)
}
Expand Down
13 changes: 13 additions & 0 deletions src/components/pages/LandingPage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import React from "react"
import { SECTION_NAMES } from "../vars"
import { NavDetailed } from "../Nav"

const getImageUrl = () =>
Math.random() > 0.5 ? "./img/small-robot.gif" : "./img/small-robot-2.gif"

class LandingPage extends React.Component {
pageName = SECTION_NAMES.landingPage
Expand All @@ -9,8 +13,17 @@ class LandingPage extends React.Component {
render = () => (
<>
<div id="landing">
<img
loading="lazy"
src={getImageUrl()}
alt="hexapod robot animation"
height="75"
style={{ marginTop: "20px", borderRadius: "20px" }}
/>
<h1>Mithi's Bare Minimum Hexapod Robot Simulator</h1>
<p>Enjoy your stay and share with your friends!</p>

<NavDetailed />
</div>
</>
)
Expand Down

0 comments on commit 79010d9

Please sign in to comment.