Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Responsive Intro Section Page using Svelte, TS, and Tailwind

Fred Campo 330

@fredcamp

Desktop design screenshot for the Intro section with dropdown navigation coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


Instead of using svgs as images, with Svelte we can directly use them as Svelte Component Icon by changing .svg into .svelte and export them together with the links so that we can both use them for the Navbar Component.

import TodoIcon from '../icons/icon-todo.svelte'
import CalendarIcon from '../icons/icon-calendar.svelte'
import ReminderIcon from '../icons/icon-reminders.svelte'
import PlanningIcon from '../icons/icon-planning.svelte'

export function createLinks() {
  return [
    {
      page: 'Features',
      links: [
        {
          Icon: TodoIcon,
          page: 'Todo List',
        },
        {
          Icon: CalendarIcon,
          page: 'Calendar',
        },
        {
          Icon: ReminderIcon,
          page: 'Reminders',
        },
        {
          Icon: PlanningIcon,
          page: 'Planning',
        },
      ],
    },
  ]
}

Community feedback

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord