This is a solution to the Manage landing page challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout for the site depending on their device's screen size
- See hover states for all interactive elements on the page
- See all testimonials in a horizontal slider
- Receive an error message when the newsletter sign up
form
is submitted if:- The
input
field is empty - The email address is not formatted correctly
- The
- Vue.js
- TailwindCSS
- SASS/SCSS
- vue3-carousel
- Fontawesome Icons
I learned how to use Teleport to create a modal in Vue.js without using external libraries or composables. I learned how to use and style Vue3-Carousel to create the testimonial slider. I reinforced my knowledge of TailwindCSS, CSS and SASS/SCSS for layout. And I learned how to get control of the time of completion of a site to help me estimate future similar projects. This was done in a total of 32 hours, distributed in 4 days, working without pressure.
With this code the modal component is loaded, without further complications. The rest is pure CSS.
<script setup>
import { ref } from 'vue';
import MenuModal from './MenuModal.vue';
const showModal = ref(false);
</script>
<template>
<nav>
...
<Teleport to="body">
<MenuModal :show="showModal" @close="showModal = false" />
</Teleport>
</nav>
</template>
In future projects I plan to deepen the use of Teleport and implement Composables, so that I can use less and less third-party libraries and start creating my own library of reusable components.
- Teleport en Vue.js oficial documentation - Teleport is a built-in component that allows us to "teleport" a part of a component's template into a DOM node that exists outside the DOM hierarchy of that component.
- Vue3-Carousel - Flexible, responsive, and highly customizable Vue carousel component to suit almost all your use cases.
- My Portfolio - Francisco Zapata
- Frontend Mentor - @drfcozapata
- Twitter - @drfcozapata
Note: Delete this note and add/remove/edit lines above based on what links you'd like to share.
To the entire Frontend Mentor team, who make these challenges possible for our professional growth.