Skip to content

Commit

Permalink
fix(forms): fix console errors related to forms
Browse files Browse the repository at this point in the history
  • Loading branch information
briancaffey committed Aug 12, 2024
1 parent 377c01b commit c91ea94
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 59 deletions.
51 changes: 0 additions & 51 deletions _plugins/drift.js

This file was deleted.

9 changes: 8 additions & 1 deletion components/FsContactForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,23 @@
<input
:placeholder="$t('contactForm.sampleName')"
type="text"
id="name"

Check warning on line 16 in components/FsContactForm.vue

View workflow job for this annotation

GitHub Actions / deploy

Attribute "id" should go before "type"
name="name"
required
class="mc"
autocomplete="on"
>
</div>
<div>
<label for="name">{{ $t('contactForm.yourEmail') }}</label>
<label for="email">{{ $t('contactForm.yourEmail') }}</label>
<input
:placeholder="$t('contactForm.sampleEmail')"
type="email"
id="email"

Check warning on line 28 in components/FsContactForm.vue

View workflow job for this annotation

GitHub Actions / deploy

Attribute "id" should go before "type"
name="email"
required
class="mc"
autocomplete="on"
>
</div>
<div>
Expand All @@ -34,8 +38,10 @@
:placeholder="$t('contactForm.sampleWebsite')"
type="url"
name="website"
id="website"

Check warning on line 41 in components/FsContactForm.vue

View workflow job for this annotation

GitHub Actions / deploy

Attribute "id" should go before "name"
class="mc"
required="false"
autocomplete="on"
>
</div>
</div>
Expand All @@ -48,6 +54,7 @@
:placeholder="$t('contactForm.sampleMessage')"
type="text"
name="message"
id="message"

Check warning on line 57 in components/FsContactForm.vue

View workflow job for this annotation

GitHub Actions / deploy

Attribute "id" should go before "name"
required
class="mc w-full"
/>
Expand Down
1 change: 1 addition & 0 deletions components/Subscribe.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
name="EMAIL"
:placeholder="$t('newsletter.enterEmail')"
class="rounded mc text-center"
autocomplete="on"
>
<!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
<div style="position: absolute; left: -5000px" aria-hidden="true">
Expand Down
5 changes: 2 additions & 3 deletions components/ui/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<nuxt-link
to="/blog/1"
:class="$route.name.startsWith('blog') ? 'selected' : ''"
> <!-- localePath -->
>
{{ $t('nav.blog') }}
</nuxt-link>
</li>
<li class="px-4 text-lg">
<nuxt-link
to="/contact"
:class="$route.name.startsWith('contact') ? 'selected' : ''"
> <!--localePath-->
>
{{ $t('nav.contact') }}
</nuxt-link>
</li>
Expand All @@ -32,7 +32,6 @@
</button>
</div>
<MobileMenu v-if="show" @toggle="show = false" />
<!-- <div class="block md:hidden text-right cursor-pointer">Menu</div> -->
</div>
</nav>
</template>
Expand Down
6 changes: 3 additions & 3 deletions components/ui/MobileMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<nuxt-link
to="/"
@click="$emit('toggle')"
> <!--localePath-->
>
{{ $t('nav.home') }}
</nuxt-link>
</li>
Expand All @@ -28,13 +28,13 @@
{{
$t('nav.blog')
}}
</nuxt-link> <!--localePath-->
</nuxt-link>
</li>
<li>
<nuxt-link
to="/contact"
@click="$emit('toggle')"
> <!--localPath-->
>
{{ $t('nav.contact') }}
</nuxt-link>
</li>
Expand Down
6 changes: 5 additions & 1 deletion components/ui/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<nuxt-link
to="/"
class="text-xl"
:class="$route.name.startsWith('index') ? 'selected' : ''"
:class="route.path === '/' ? 'selected' : ''"
>
<span class="hidden sm:inline text-2xl">{{ $t('common.name') }}</span><span class="inline sm:hidden">JBC</span>
</nuxt-link>
Expand All @@ -22,6 +22,10 @@
</div>
</template>

<script setup>
const route = useRoute();
</script>

<style scoped>
span.emoji-mart-emoji {
padding: 0px;
Expand Down
1 change: 1 addition & 0 deletions plugins/drift.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable no-undef */
export default defineNuxtPlugin(() => {

// from drift documentation
!(function () {
const t = (window.driftt = window.drift = window.driftt || [])
if (!t.init) {
Expand Down

0 comments on commit c91ea94

Please sign in to comment.