Skip to content

Commit 4d1b6fe

Browse files
committed
Add visible label on newsletter form
1 parent 642ec75 commit 4d1b6fe

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

src/.vuepress/config/languages/en/themeLocaleConfig.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module.exports = {
1515
},
1616
newsletter: {
1717
title: 'Subscribe to the newsletter',
18+
label: 'Email address',
1819
description: 'Enter your email address and receive articles, videos, updates and events from the Vue.js community and accessibility.',
1920
textButton: 'Subscribe'
2021
},
@@ -46,9 +47,6 @@ module.exports = {
4647
'/recipes/': sidebar.recipes
4748
},
4849
a11y: {
49-
newsletter: {
50-
placeholder: 'Email for subscription'
51-
},
5250
codeSnippet: {
5351
copy: {
5452
text: 'Copy to clipboard',

src/.vuepress/config/languages/pt/themeLocaleConfig.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module.exports = {
1515
},
1616
newsletter: {
1717
title: 'Inscreva-se na newsletter',
18+
label: 'Endereço de email',
1819
description: 'Digite seu email e receba artigos, vídeos, atualizações e eventos da comunidade Vue.js e acessibilidade.',
1920
textButton: 'Cadastrar'
2021
},
@@ -46,9 +47,6 @@ module.exports = {
4647
'/pt/receitas/': sidebar.receitas
4748
},
4849
a11y: {
49-
newsletter: {
50-
placeholder: 'Email para inscrição'
51-
},
5250
codeSnippet: {
5351
copy: {
5452
text: 'Copiar',

src/.vuepress/theme/components/NewsletterForm.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
>
1010
<label
1111
:for="emailLabel"
12-
class="flex flex-1"
12+
class="flex flex-wrap flex-1"
1313
>
14-
<span class="sr-only">{{ $themeLocaleConfig.a11y.newsletter.placeholder }}</span>
14+
<span class="block w-full pb-2 text-base font-bold">{{ $themeLocaleConfig.newsletter.label }}</span>
1515
<input
1616
:id="emailLabel"
1717
ref="emailField"
@@ -21,13 +21,12 @@
2121
required
2222
autocomplete="email"
2323
class="w-full p-4 border border-solid rounded-md outline-none bg-main newsletter-form-input c-border-color hover:border-accent-primary focus:border-accent-primary"
24-
:placeholder="$themeLocaleConfig.a11y.newsletter.placeholder"
2524
>
2625
</label>
2726
<slot name="button">
2827
<button
2928
type="submit"
30-
class="-ml-2 text-black btn btn-accent newsletter-form-btn"
29+
class="self-end -ml-2 text-black btn btn-accent newsletter-form-btn"
3130
>
3231
{{ $themeLocaleConfig.newsletter.textButton }}
3332
</button>

src/.vuepress/theme/layouts/Posts.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@
1111
class="ml-2"
1212
/>
1313

14-
<h1 class="pl-3 mt-2 mb-12 text-5xl font-bold leading-10 lg:pl-6">
15-
Latest posts <span class="capitalize">{{ isCategory ? `(${$currentCategories.key})` : '' }}</span>
14+
<h1
15+
class="pl-3 mt-2 mb-8 font-bold leading-10 lg:pl-6"
16+
style="font-size: 2.5rem;"
17+
>
18+
Latest posts <span class="capitalize">{{ isCategory && $currentCategories ? `(${$currentCategories.key})` : '' }}</span>
1619
</h1>
1720

1821
<ul class="flex flex-wrap justify-between w-full px-3 lg:pr-6 lg:pl-0 lg:ml-6 xl:pr-0">

0 commit comments

Comments
 (0)