Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homepage Updates #5340

Merged
merged 6 commits into from
May 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions website/src/components/CustomerLogos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ const logos: Logos[] = [
src: '/external-logos/lyft-logo.svg',
},
{
name: 'Adidas Running',
src: '/external-logos/adidas-runtastic-sq-logo.svg',
name: 'Canva',
src: '/external-logos/canva-logo.svg',
},
{
name: 'Shipt',
Expand Down
2 changes: 1 addition & 1 deletion website/src/components/Install/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const Install: React.FunctionComponent = () => {
<a
className="d-inline-block text-lg"
href="https://docs.sourcegraph.com"
data-button-style={buttonStyle.arrowWithText}
data-button-style={buttonStyle.textWithArrow}
data-button-location={buttonLocation.trySourcegraph}
data-button-type="cta"
>
Expand Down
2 changes: 1 addition & 1 deletion website/src/components/SelfHostedSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const SelfHostedSection: FunctionComponent = () => (
<a
className="d-inline-block text-lg"
href="/get-started"
data-button-style={buttonStyle.arrowWithText}
data-button-style={buttonStyle.textWithArrow}
data-button-location={buttonLocation.trySourcegraph}
data-button-type="cta"
>
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/get-started/self-hosted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const SelfHostedPage: FunctionComponent<PageProps> = props => (
<div className="d-flex flex-column align-items-start">
<a
className="btn p-0 mt-5 text-primary"
data-button-style={buttonStyle.arrowWithText}
data-button-style={buttonStyle.textWithArrow}
data-button-location={buttonLocation.hero}
data-button-type="cta"
href="https://info.sourcegraph.com/talk-to-a-developer"
Expand Down
6 changes: 4 additions & 2 deletions website/src/pages/home/_Features.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ const FeatureSection: FunctionComponent = () => {
rel="noreferrer"
className="btn btn-outline-primary mt-2"
data-button-style={buttonStyle.outline}
data-button-location={buttonLocation.bodyDemo}
data-button-location={buttonLocation.body}
data-button-type="cta"
>
Learn more about {startCase(feature.productFeature)}
</a>
Expand All @@ -182,7 +183,8 @@ const FeatureSection: FunctionComponent = () => {
to={feature.ctaLink}
className="btn btn-outline-primary mt-2"
data-button-style={buttonStyle.outline}
data-button-location={buttonLocation.bodyDemo}
data-button-location={buttonLocation.body}
data-button-type="cta"
>
Learn more about {startCase(feature.productFeature)}
</Link>
Expand Down
9 changes: 8 additions & 1 deletion website/src/pages/home/_Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,14 @@ const Hero: FunctionComponent = () => {
Over <span className="text-vivid-violet">1.2M engineers</span> use Sourcegraph to build software you
rely on
</h2>
<Link to="/case-studies">Learn how our customers use Sourcegraph</Link>
<Link
to="/case-studies"
data-button-style={buttonStyle.text}
data-button-location={buttonLocation.hero}
data-button-type="cta"
>
Learn how our customers use Sourcegraph
</Link>
</div>
</div>
)
Expand Down
18 changes: 14 additions & 4 deletions website/src/pages/home/_UseCases.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const useCases: UseCases[] = [
title: 'Resolve incidents',
description: 'Identify the root cause in code and fix the issue everywhere, faster.',
link: {
href: '/use-cases#resolve-incidents-faster',
href: '/use-cases/incident-response',
text: 'Learn more about incident response',
},
},
Expand All @@ -56,7 +56,7 @@ const useCases: UseCases[] = [
title: 'Promote code reuse',
description: 'Find existing code for reuse and contribute to a more coherent codebase.',
link: {
href: '/use-cases#streamline-code-reuse',
href: '/use-cases/code-reuse',
text: 'Learn more about code reuse',
},
},
Expand All @@ -65,7 +65,7 @@ const useCases: UseCases[] = [
title: 'Boost code health',
description: 'Improve code health with large-scale changes, and track key initiatives.',
link: {
href: '/use-cases#boost-code-health',
href: '/use-cases/code-health',
text: 'Learn more about code health',
},
},
Expand Down Expand Up @@ -112,7 +112,16 @@ const UseCases: FunctionComponent = () => {
<h4 className="font-weight-bold">{useCase.title}</h4>
<div className="text-lg">
<p className="m-0">{useCase.description}</p>
{useCase.link && <Link to={useCase.link.href}>{useCase.link.text}</Link>}
{useCase.link && (
<Link
to={useCase.link.href}
data-button-style={buttonStyle.text}
data-button-location={buttonLocation.body}
data-button-type="cta"
>
{useCase.link.text}
</Link>
)}
</div>
</div>
</div>
Expand All @@ -136,6 +145,7 @@ const UseCases: FunctionComponent = () => {
className="btn btn-primary mt-5 d-block d-sm-inline-block"
data-button-style={buttonStyle.primary}
data-button-location={buttonLocation.bodyDemo}
data-button-type="cta"
>
Request a demo
</Link>
Expand Down
20 changes: 10 additions & 10 deletions website/src/pages/use-cases/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default ((props: any) => (
<Link
to="#find-and-fix-security-vulnerabilities"
className="list-group-item list-group-item-action"
data-button-style={buttonStyle.arrowWithText}
data-button-style={buttonStyle.textWithArrow}
data-button-location={buttonLocation.hero}
data-button-type="cta"
>
Expand All @@ -49,7 +49,7 @@ export default ((props: any) => (
<Link
to="#accelerate-developer-onboarding"
className="list-group-item list-group-item-action"
data-button-style={buttonStyle.arrowWithText}
data-button-style={buttonStyle.textWithArrow}
data-button-location={buttonLocation.hero}
data-button-type="cta"
>
Expand All @@ -58,7 +58,7 @@ export default ((props: any) => (
<Link
to="#resolve-incidents-faster"
className="list-group-item list-group-item-action"
data-button-style={buttonStyle.arrowWithText}
data-button-style={buttonStyle.textWithArrow}
data-button-location={buttonLocation.hero}
data-button-type="cta"
>
Expand All @@ -67,7 +67,7 @@ export default ((props: any) => (
<Link
to="#streamline-code-reuse"
className="list-group-item list-group-item-action"
data-button-style={buttonStyle.arrowWithText}
data-button-style={buttonStyle.textWithArrow}
data-button-location={buttonLocation.hero}
data-button-type="cta"
>
Expand All @@ -76,7 +76,7 @@ export default ((props: any) => (
<Link
to="#boost-code-health"
className="list-group-item list-group-item-action"
data-button-style={buttonStyle.arrowWithText}
data-button-style={buttonStyle.textWithArrow}
data-button-location={buttonLocation.hero}
data-button-type="cta"
>
Expand Down Expand Up @@ -118,7 +118,7 @@ export default ((props: any) => (
to="/demo"
title="Request a demo"
className="btn btn-outline-primary"
data-button-style={buttonStyle.arrowBoxOutlined}
data-button-style={buttonStyle.outlineWithArrow}
data-button-location={buttonLocation.bodyDemo}
data-button-type="cta"
>
Expand Down Expand Up @@ -191,7 +191,7 @@ export default ((props: any) => (
to="/demo"
title="Request a demo"
className="btn btn-outline-primary"
data-button-style={buttonStyle.arrowBoxOutlined}
data-button-style={buttonStyle.outlineWithArrow}
data-button-location={buttonLocation.bodyDemo}
data-button-type="cta"
>
Expand Down Expand Up @@ -235,7 +235,7 @@ export default ((props: any) => (
to="/demo"
title="Request a demo"
className="btn btn-outline-primary"
data-button-style={buttonStyle.arrowBoxOutlined}
data-button-style={buttonStyle.outlineWithArrow}
data-button-location={buttonLocation.bodyDemo}
data-button-type="cta"
>
Expand Down Expand Up @@ -308,7 +308,7 @@ export default ((props: any) => (
to="/demo"
title="Request a demo"
className="btn btn-outline-primary"
data-button-style={buttonStyle.arrowBoxOutlined}
data-button-style={buttonStyle.outlineWithArrow}
data-button-location={buttonLocation.bodyDemo}
data-button-type="cta"
>
Expand Down Expand Up @@ -351,7 +351,7 @@ export default ((props: any) => (
to="/demo"
title="Request a demo"
className="btn btn-outline-primary"
data-button-style={buttonStyle.arrowBoxOutlined}
data-button-style={buttonStyle.outlineWithArrow}
data-button-location={buttonLocation.bodyDemo}
data-button-type="cta"
>
Expand Down
8 changes: 5 additions & 3 deletions website/src/tracking.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
export const buttonStyle = {
primary: 1,
outline: 2,
arrowWithText: 3,
arrowBoxWithText: 4,
arrowBoxOutlined: 5,
textWithArrow: 3,
textWithBoxedArrow: 4,
outlineWithArrow: 5,
text: 6,
}

export const buttonLocation = {
nav: 1,
hero: 2,
bodyDemo: 3,
trySourcegraph: 4,
body: 5,
}
Loading