Skip to content

Commit

Permalink
5www] Overall typography edits - starter showcase #6719 (#7708)
Browse files Browse the repository at this point in the history
* (#6719): typography edits to starter showcase

* (#6719): centralize common showcase styles for meta info
  • Loading branch information
amberleyromo authored and fk committed Aug 30, 2018
1 parent ea4dcf7 commit c9a8950
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 15 deletions.
9 changes: 8 additions & 1 deletion www/src/views/shared/styles.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import typography, { options, rhythm } from "../../utils/typography"
import typography, { options, rhythm, scale } from "../../utils/typography"
import presets, { colors } from "../../utils/presets"
import { style } from "glamor"
import hex2rgba from "hex2rgba"
Expand Down Expand Up @@ -144,6 +144,13 @@ const styles = {
borderBottom: `none !important`, // i know i know
boxShadow: `none !important`, // but people really want this
},
meta: {
...scale(-1 / 5),
alignItems: `baseline`,
"&&": {
color: colors.gray.bright,
},
},
searchInput: {
appearance: `none`,
backgroundColor: `transparent`,
Expand Down
6 changes: 1 addition & 5 deletions www/src/views/showcase/showcase-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,9 @@ const ShowcaseList = ({ items, count }) => {
</Link>
<div
css={{
...scale(-2 / 5),
...styles.meta,
display: `flex`,
justifyContent: `space-between`,
alignItems: `baseline`,
"&&": {
color: `#9B9B9B`,
},
}}
className="meta"
>
Expand Down
34 changes: 25 additions & 9 deletions www/src/views/starter-showcase/showcase-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import Img from "gatsby-image"
import FaExtLink from "react-icons/lib/fa/external-link"
import FaGithub from "react-icons/lib/fa/github"
import FaClipboard from "react-icons/lib/fa/clipboard"
import { /* options, rhythm, */ scale, rhythm } from "../../utils/typography"
import MdStar from "react-icons/lib/md/star"
import { /* rhythm, */ scale, rhythm, options } from "../../utils/typography"
import presets, { colors } from "../../utils/presets"
import copyToClipboard from "../../utils/copy-to-clipboard"
import styles from "../shared/styles"
Expand Down Expand Up @@ -48,6 +49,7 @@ const ShowcaseList = ({ urlState, items, imgs, count, sortRecent }) => {
return (
<div
css={{
fontFamily: options.headerFontFamily.join(`,`),
display: `flex`,
flexWrap: `wrap`,
padding: rhythm(3 / 4),
Expand Down Expand Up @@ -136,14 +138,25 @@ const ShowcaseList = ({ urlState, items, imgs, count, sortRecent }) => {
</Link>
<div
css={{
...scale(-2 / 5),
color: `#9B9B9B`,
fontWeight: `normal`,
...styles.meta,
marginTop: rhythm(options.blockMarginBottom),
}}
>
<div css={{ display: `flex`, justifyContent: `space-between` }}>
{repo.owner && repo.owner.login} /
<span>
<span css={{ color: colors.gray.dark }}>
{repo.owner && repo.owner.login} /
</span>
<span
css={{
"> a": {
paddingLeft: 5,
"&:hover": {
background: `none`,
color: colors.gatsby,
},
},
}}
>
<a
href="#copy-to-clipboard"
onClick={() =>
Expand Down Expand Up @@ -196,9 +209,12 @@ const ShowcaseList = ({ urlState, items, imgs, count, sortRecent }) => {
</div>
<div css={{ display: `flex`, justifyContent: `space-between` }}>
<div css={{ display: `inline-block` }}>
<span role="img" aria-label="star">
</span>
<MdStar
style={{
color: colors.accent,
verticalAlign: "text-top",
}}
/>
{stars}
</div>
<div css={{ display: `inline-block` }}>
Expand Down

0 comments on commit c9a8950

Please sign in to comment.