Skip to content

Commit

Permalink
Try use white buttons on the index, let the footer be the same max wi…
Browse files Browse the repository at this point in the history
…dth as the homepage
  • Loading branch information
orta committed Aug 5, 2020
1 parent e9f584f commit 42bc7bf
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export type Props = {
badge?: string
first?: boolean
last?: boolean
customClass?: string
}

/** A pretty grey button */
Expand All @@ -19,6 +20,7 @@ export const GreyButton = (props: Props) => {
if (props.headline) classes.push("headline")
if (props.first) classes.push("first")
if (props.last) classes.push("last")
if (props.customClass) classes.push(props.customClass)

return <a key={props.title} href={href} className={classes.join(" ")}>
<p>{props.blurb}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}

section {
max-width: 920px;
max-width: 1040px;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin: 0 auto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,21 @@
position: relative;
text-decoration: none;

&.white-theme {
background-color: white;
border: 1px black solid;

&:hover {
background-color: $ts-light-bg-grey;
}
&:active {
background-color: $ts-light-bg-grey-highlight-color;
margin-bottom: 19px;
}
}

@media screen and (-ms-high-contrast: active) {
border: 1px solid grey;;
border: 1px solid grey;
}

&.headline {
Expand Down
8 changes: 4 additions & 4 deletions packages/typescriptlang-org/src/templates/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ const Index: React.FC<Props> = (props) => {
<Section color="white">
<h3>{i("index_started_title")}</h3>
<QuarterOrHalfRow key='call to actions'>
<GreyButton href="/docs/handbook" title={i("index_started_handbook")} blurb={i("index_started_handbook_blurb")} first />
<GreyButton href="/docs/bootstrap" title={i("index_started_docs")} blurb={i("index_started_docs_blurb")} />
<GreyButton href="/community" title={i("index_started_community")} blurb={i("index_started_community_blurb")} />
<GreyButton href="/tools" title={i("index_started_tooling")} blurb={i("index_started_tooling_blurb")} />
<GreyButton href="/docs/handbook" title={i("index_started_handbook")} blurb={i("index_started_handbook_blurb")} first customClass="white-theme" />
<GreyButton href="/docs/bootstrap" title={i("index_started_docs")} blurb={i("index_started_docs_blurb")} customClass="white-theme" />
<GreyButton href="/community" title={i("index_started_community")} blurb={i("index_started_community_blurb")} customClass="white-theme" />
<GreyButton href="/tools" title={i("index_started_tooling")} blurb={i("index_started_tooling_blurb")} customClass="white-theme" />
</QuarterOrHalfRow>

<div id="installation" />
Expand Down

0 comments on commit 42bc7bf

Please sign in to comment.