-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
612 additions
and
36 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,76 @@ | ||
/** github logo from my other sites**/ | ||
/** networks header */ | ||
.site-networks { | ||
position: absolute; | ||
right: 20px; | ||
top: 16px; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
ul.site-networks { | ||
list-style: none; | ||
text-align: center; | ||
padding: 0px 0px 10px 0px; | ||
} | ||
ul.site-networks li { | ||
position: relative; | ||
display: inline-block; | ||
vertical-align: middle; | ||
margin-left: 15px; | ||
} | ||
ul.site-networks li a { | ||
display: block; | ||
width: 32px; | ||
height: 32px; | ||
text-decoration: none; | ||
padding-top: 0px; | ||
-webkit-transition: all 0.5s; | ||
-moz-transition: all 0.5s; | ||
-ms-transition: all 0.5s; | ||
-o-transition: all 0.5s; | ||
transition: all 0.5s; | ||
} | ||
ul.site-networks li a span.icon { | ||
position: absolute; | ||
display: block; | ||
width: 32px; | ||
height: 32px; | ||
-webkit-transition: all 0.5s; | ||
-moz-transition: all 0.5s; | ||
-ms-transition: all 0.5s; | ||
-o-transition: all 0.5s; | ||
transition: all 0.5s; | ||
} | ||
ul.site-networks li a span.desc { | ||
display: none; | ||
} | ||
ul.site-networks li a:hover { | ||
} | ||
ul.site-networks li a:hover span.icon { | ||
left: 0px; | ||
-webkit-transform: rotate(360deg); | ||
-moz-transform: rotate(360deg); | ||
-ms-transform: rotate(360deg); | ||
-o-transform: rotate(360deg); | ||
transform: rotate(360deg); | ||
} | ||
/** since logos are included with the css in base64, we don't bother about pixel ratio media query (everybody gets the retina version)*/ | ||
ul.site-networks li.twitter a span.icon { | ||
background-image: url(../../assets/images/twitter-retina-white.png); | ||
background-size: 32px 32px; | ||
} | ||
ul.site-networks li.github a span.icon { | ||
background-image: url(../../assets/images/github-retina-white.png); | ||
background-size: 32px 32px; | ||
} | ||
/** for small devices */ | ||
@media only screen and (max-width: 600px) { | ||
ul.site-networks { | ||
top: 12px; | ||
} | ||
} /** for extra-small devices */ | ||
@media only screen and (max-width: 500px) { | ||
ul.site-networks li { | ||
margin-left: 5px; | ||
} | ||
} |
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,94 @@ | ||
// inspired by https://material-ui-next.com/demos/app-bar/#app-bar-with-buttons | ||
|
||
import React from "react"; | ||
import PropTypes from "prop-types"; | ||
import { withStyles } from "material-ui/styles"; | ||
import AppBar from "material-ui/AppBar"; | ||
import Toolbar from "material-ui/Toolbar"; | ||
import Typography from "material-ui/Typography"; | ||
import IconButton from "material-ui/IconButton"; | ||
import MenuIcon from "material-ui-icons/Menu"; | ||
|
||
import { Link } from "react-router-dom"; | ||
|
||
import "./Header.css"; | ||
|
||
const styles = theme => ({ | ||
root: { | ||
flexGrow: 1 | ||
}, | ||
title: { | ||
textDecoration: "none", | ||
fontWeight: 500, | ||
flex: 1, | ||
[theme.breakpoints.down("sm")]: { | ||
fontSize: "100%" | ||
}, | ||
[theme.breakpoints.up("sm")]: { | ||
fontSize: "130%" | ||
} | ||
}, | ||
menuButton: { | ||
marginLeft: -12, | ||
[theme.breakpoints.down("sm")]: { | ||
marginRight: 0 | ||
}, | ||
[theme.breakpoints.up("sm")]: { | ||
marginRight: 20 | ||
} | ||
} | ||
}); | ||
|
||
const Header = props => { | ||
const { classes } = props; | ||
return ( | ||
<header className={classes.root}> | ||
<AppBar position="fixed"> | ||
<Toolbar> | ||
<IconButton | ||
className={classes.menuButton} | ||
color="inherit" | ||
aria-label="Menu" | ||
> | ||
<MenuIcon /> | ||
</IconButton> | ||
<Typography | ||
component={Link} | ||
to="/" | ||
title="Home" | ||
color="inherit" | ||
className={classes.title} | ||
> | ||
npm-registry-browser | ||
</Typography> | ||
<ul className="site-networks"> | ||
<li className="twitter"> | ||
<a | ||
href="https://twitter.com/topheman" | ||
title="@topheman on twitter" | ||
> | ||
<span className="icon" /> | ||
<span className="desc">Twitter</span> | ||
</a> | ||
</li> | ||
<li className="github"> | ||
<a | ||
href="https://github.com/topheman/npm-registry-browser" | ||
title="Fork on github" | ||
> | ||
<span className="icon" /> | ||
<span className="desc">Github</span> | ||
</a> | ||
</li> | ||
</ul> | ||
</Toolbar> | ||
</AppBar> | ||
</header> | ||
); | ||
}; | ||
|
||
Header.propTypes = { | ||
classes: PropTypes.object.isRequired | ||
}; | ||
|
||
export default withStyles(styles)(Header); |
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