Skip to content
  • Unlock Pro
  • Log in with GitHub
Profile
OverviewSolutions
59
Comments
5

Edis

@edo979Bosnia and Herzegovina1,220 points

Frontend developer. I watched so many tutorials and now I'm in tutorials hell. I want to build something from scratch. Learning while building.

I’m currently learning...

javaScript, CSS, SASS

Latest solutions

  • Notification Page - React, scss

    #react#sass/scss

    Edis•1,220
    Submitted almost 3 years ago

    0 comments
  • Rest Countries Api App

    #react#react-router#sass/scss#vite

    Edis•1,220
    Submitted almost 3 years ago

    1 comment
  • Rock, paper, scissors game


    Edis•1,220
    Submitted almost 3 years ago

    0 comments
  • URL Shortenint api landing page


    Edis•1,220
    Submitted almost 3 years ago

    0 comments
  • Static Job Listing

    #react

    Edis•1,220
    Submitted about 3 years ago

    0 comments
  • Interactive card details form


    Edis•1,220
    Submitted about 3 years ago

    0 comments
View more solutions

Latest comments

  • P
    Darionas•450
    @Darionas
    Submitted almost 3 years ago

    Make a selected/clicked button active in JavaScript without Loop

    2
    Edis•1,220
    @edo979
    Posted almost 3 years ago

    Hi.

    You done great job, well done. I read you code and shorten your function.

    let num;
    let prevButton;
    const numCont = document.getElementById('numCont');
    
    function myId(clicked_id) {
      num = document.getElementById(clicked_id).value;
    
      numCont.addEventListener('click', (e) => {
        const isButton = e.target.nodeName === 'BUTTON';
    
        if (!isButton) return;
    
        prevButton?.classList.remove('active');
    
        if (isButton) {
          e.target.classList.add('active');
        }
    
        prevButton = e.target;
      })
    }
    

    Of course you must add defer in your script tag. Read this:

    Marked as helpful
  • imad•3,330
    @imadvv
    Submitted about 3 years ago

    Frontend Mentor - Time tracking dashboard solution

    #fetch#accessibility
    2
    Edis•1,220
    @edo979
    Posted almost 3 years ago

    Hello. Great work. I read your javascript file and add some changes. You javascript is excellent do not worry. I did this because I was bored and love javascript.

    let data = [],
    selectedTimeFrame = 'daily'
    
    const buttons = Array.from(document.querySelectorAll('[data-show]'))
    const currentElements = Array.from(document.querySelectorAll('.current-data'))
    const previousElements = Array.from(document.querySelectorAll('.previous-data'))
    
    fetch('../data.json')
      .then((res) => res.json())
      .then((result) => {
        data = result
    
        updateView()
      })
    
    // Event listeners
    buttons.forEach((button) => {
      button.addEventListener('click', (e) => {
        selectedTimeFrame = e.target.dataset.show
    
        updateView()
      })
    })
    
    function updateView() {
      data.forEach((activity, i) => {
        const currentValue = activity.timeframes[selectedTimeFrame].current
    
        currentElements[i].textContent = currentValue + getTimeUnits(currentValue)
    
        previousElements[i].textContent = formatTextPrevEl(
          activity.timeframes[selectedTimeFrame].previous
        )
      })
    }
    
    // Utility
    function getTimeUnits(value) {
      return value > 1 ? 'hrs' : 'hr'
    }
    
    function formatTextPrevEl(number) {
      const timeUnit = getTimeUnits(number)
    
      switch (selectedTimeFrame) {
        case 'daily':
          return `${number}${timeUnit} - yesterday`
    
        case 'weekly':
          return `last week - ${number}${timeUnit}`
    
        case 'monthly':
          return `last month - ${number}${timeUnit}`
    
        default:
          return
      }
    }
    
    Marked as helpful
  • Duncan Kithinji•590
    @duncan91-ops
    Submitted over 3 years ago

    React, Context, Styled Components Crowdfunding Product Page Solution

    #accessibility#styled-components#react
    1
    Edis•1,220
    @edo979
    Posted over 3 years ago

    Well done. This project is very difficult and it took me some time to complete it. Congratulations. I like the animations on the buttons, too.

  • 👾 Ekaterine Mitagvaria 👾•7,860
    @catherineisonline
    Submitted over 3 years ago

    Ping coming soon page

    11
    Edis•1,220
    @edo979
    Posted over 3 years ago

    I also noticed the aspect ratio of social icons. Nice work. Congratulations!

  • Edis•1,220
    @edo979
    Submitted over 3 years ago

    FAQ accordion

    2
    Edis•1,220
    @edo979
    Posted over 3 years ago

    Thank You very much.

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub