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

enhance(seo): link technologies in homepage hero #11877

Merged
merged 2 commits into from
Oct 2, 2024
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
5 changes: 0 additions & 5 deletions client/src/homepage/featured-articles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@

a {
color: var(--text-primary);

&:hover,
&:focus {
text-decoration: underline;
}
}
}

Expand Down
28 changes: 26 additions & 2 deletions client/src/homepage/homepage-hero/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import "./index.scss";
import { Search } from "../../ui/molecules/search";
import Mandala from "../../ui/molecules/mandala";
import { useLocale } from "../../hooks";
import { HOMEPAGE_HERO } from "../../telemetry/constants";

export function HomepageHero() {
const locale = useLocale();

return (
<div className="homepage-hero dark">
<section>
Expand All @@ -11,8 +15,28 @@ export function HomepageHero() {
<br /> by Developers
</h1>
<p>
Documenting web technologies, including CSS, HTML, and JavaScript,
since 2005.
Documenting web technologies, including{" "}
<a
href={`/${locale}/docs/Web/CSS`}
data-glean={`${HOMEPAGE_HERO}: css`}
>
CSS
</a>
,{" "}
<a
href={`/${locale}/docs/Web/HTML`}
data-glean={`${HOMEPAGE_HERO}: html`}
>
HTML
</a>
, and{" "}
<a
href={`/${locale}/docs/Web/JavaScript`}
data-glean={`${HOMEPAGE_HERO}: js`}
>
JavaScript
</a>
, since 2005.
</p>
<Search id="hp-search" isHomepageSearch={true} />
</section>
Expand Down
4 changes: 4 additions & 0 deletions client/src/homepage/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@
> *:first-child {
margin-top: 0;
}

a:hover {
text-decoration: underline;
}
}
1 change: 0 additions & 1 deletion client/src/homepage/recent-contributions/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@

&:hover {
color: var(--text-primary);
text-decoration: underline;
}
}

Expand Down
1 change: 1 addition & 0 deletions client/src/telemetry/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,4 @@ export const LANGUAGE = "language";
export const LANGUAGE_REMEMBER = "language_remember";
export const THEME_SWITCHER = "theme_switcher";
export const SURVEY = "survey";
export const HOMEPAGE_HERO = "homepage_hero";
Loading