Skip to content

Commit 4ee84d4

Browse files
author
Marie Destandau
committed
[HOMEPAGE] fix: title hierarchy
1 parent bf3c4e0 commit 4ee84d4

6 files changed

Lines changed: 19 additions & 20 deletions

File tree

homepage/src/components/Footer.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const getLinks = (survey) => [
1919
// },
2020
{
2121
link: 'https://github.com/StateOfJS/Monorepo/issues',
22-
k: 'homepage.leave_issue'
22+
k: ''
2323
},
2424
{
2525
link: 'https://discord.gg/zRDb35jfrt',

homepage/src/components/LanguageSwitcher.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const { pathname } = canonicalUrl
66
---
77

88
<div class="language-switcher">
9-
<h3 class="language-switcher-heading">
9+
<p class="language-switcher-heading">
1010
<T locale={locale} k="languages.available_languages" />
11-
</h3>
11+
</p>
1212
<ul>
1313
{
1414
locales.map(({ id, label }) => (
@@ -18,11 +18,11 @@ const { pathname } = canonicalUrl
1818
))
1919
}
2020
</ul>
21-
<h4>
21+
<p>
2222
<a href="https://github.com/StateOfJS/locale-en-US">
2323
<T locale={locale} k="languages.help_us_translate" />
2424
</a>
25-
</h4>
25+
</p>
2626
</div>
2727

2828
<style lang="scss">

homepage/src/components/Newsletter.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ import { useI18n } from '../helpers/i18nContext'
33
import '../stylesheets/_newsletter.scss'
44
import T from './T'
55

6-
import {
7-
getStringTranslator,
8-
Locale,
9-
} from '../helpers/translator'
10-
6+
import { getStringTranslator, Locale } from '../helpers/translator'
117

128
const getEOConfig = listId => ({
139
emailOctopusUrl: `https://emailoctopus.com/lists/${listId}/members/embedded/1.3/add`,
@@ -59,9 +55,9 @@ export default function Newsletter({ listId, locale }) {
5955

6056
return (
6157
<div className="newsletter">
62-
<h3 className="newsletter-heading">
58+
<h2 className="newsletter-heading">
6359
<T locale={locale} k="newsletter.stay_tuned" />
64-
</h3>
60+
</h2>
6561
<p className="newsletter-details">
6662
<T locale={locale} k="newsletter.leave_your_email" />
6763
</p>{' '}

homepage/src/components/SurveyEdition.astro

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,15 @@ if (isOpen) {
2424

2525
<div class:list={['survey-edition', { 'survey-edition-last': isLast }]}>
2626
<div class="survey-edition-card" style={`background: ${background};`}>
27+
2728
{
28-
marker && (
29-
<h4 class="survey-edition-status">
29+
marker ? (
30+
<h2 class="survey-edition-title"><span class="survey-edition-status">
3031
<T locale={locale} k={marker} />
31-
</h4>
32-
)
32+
</span><span class="survey-edition-year">{year}</span></h2>
33+
) : <h3 class="survey-edition-year">{year}</h3>
3334
}
3435

35-
<h4 class="survey-edition-year">{year}</h4>
36-
3736
<a class="image-wrapper" href={mainLink}
3837
><span class="image-inner" style={`background-image: url(${imageUrl})`}></span>
3938
</a>
@@ -81,7 +80,9 @@ if (isOpen) {
8180
overflow: hidden;
8281
margin-bottom: var(--quarterspacing);
8382
}
84-
83+
.survey-edition-title {
84+
font-size: var(--medium-font);
85+
}
8586
.survey-edition-status,
8687
.survey-edition-year {
8788
position: absolute;
@@ -100,6 +101,7 @@ if (isOpen) {
100101

101102
.survey-edition-year {
102103
right: 0;
104+
font-size: var(--medium-font);
103105
}
104106

105107
.image-wrapper {

homepage/src/components/T.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default function T({
6868
props.className = classNames.join(' ')
6969

7070
return md ? (
71-
<div {...props} dangerouslySetInnerHTML={{ __html: translation }} />
71+
<p {...props} dangerouslySetInnerHTML={{ __html: translation }} />
7272
) : html ? (
7373
<span {...props} dangerouslySetInnerHTML={{ __html: translation }} />
7474
) : (

homepage/src/stylesheets/_newsletter.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
.newsletter-heading {
1212
margin-bottom: var(--halfspacing);
13+
font-size: 1.17em;
1314
}
1415

1516
.newsletter-details {

0 commit comments

Comments
 (0)