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

All comments

  • Daniel 🛸 38,650

    @danielmrz-dev

    Submitted

    What challenges did you encounter, and how did you overcome them?

    🛸 Hello FEM Community! I'm Daniel and this is my solution for this challenge! 😊

    🛠️ Built with:

    • HTML 🧾
    • SASS 🎨
    • BEM Notation 🅱️
    • Mobile first workflow approach 📲

    Built this one with HTML and SASS only. I wanted to practice creating the menu with all the functionalities without Javascript. The result is quite good. I know that some things need to be improved, such as accessibility, but I think it's good for now.

    If you have any suggestions on how I can improve this project, feel free to leave me a comment!

    Feedback welcome 😊

    Loopstudios Landing Page - (SASS)

    #accessibility#bem#sass/scss#lighthouse

    2

    P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Muito bom!

    Não tem muito o que falar na parte de html e estilização, você sempre trabalha bem com essa parte.

    Algo que eu recomendaria você ir pegando o jeito, seria em deixar os seus commits mais profissionais. Existe alguns padrões que você pode seguir, mas a parte principal é seus commits serem mais descritivos. Exemplo:

    • Seu segundo commit: dot. O que isso significa? Não tem como saber só vendo o nome, então se você precisar restaurar algum commit antigo por qualquer motivo que seja, ou algum outro dev precisar fazer um review, vai ser difícil você lembrar o correto. A mesma coisa com o último commit, que diz fixes, mas fixes do que?

    Agora se você descrevê-lo como: Fix: Correct image paths to resolve broken images. Aqui você já sabe só de ler o commit o que foi feito. Se você não souber o que escrever, joga no chat gpt o que você fez, e pede pra ele te dar um commit. Por exemplo: "I added media queries to handle responsiveness, and changed some values from font sizes (I'm using clamp() in css so it handles responsiveness better. What's a good commit?". Nisso o chat gpt me deu: "feat: Add media queries for responsiveness"

    Sobre esse fix, feat, e afins que vem antes do commit, é um dos padrões que alguns usam que o github recomenda. Você pode ler mais sobre nesse artigo!.

    Marked as helpful

    1
  • Daniel 🛸 38,650

    @danielmrz-dev

    Submitted

    What are you most proud of, and what would you do differently next time?

    🛸 Hello FEM Community! I'm Daniel and this is my solution for this challenge! 😊

    🛠️ Built with:

    • HTML 🧾
    • Vanilla CSS 🎨
    • JavaScript 🤖
    • Mobile first workflow approach 📲

    A very interesting layout challenge. The menus were (again) difficult to create, considering that mobile and desktop versions menus work a little bit differently. This time I added an animation to the menu button on mobile version.

    I learned a lot from doing this challenge 😊

    If you have any suggestions on how I can improve this project, feel free to leave me a comment!

    Feedback welcome 😊

    Blogr Landing Page

    #accessibility#animation#lighthouse

    2

    P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Muito bom como sempre!

    Vi que tem feito mais projetos com javascript, já já você ta indo pra react! Vou focar meu feedback no js:

    • Primeiro ponto: Selectors

    A forma como você seleciona eles. No momento você está fazendo assim:

    const menu = document.querySelector(".navbar");
    const menuItems = document.querySelectorAll(".title-icon");
    const menuLinks = document.querySelectorAll(".navbar-links");
    const checkbox = document.querySelector("#menu");
    const menuIcon = document.querySelector(".menu-icon");
    

    É interessante que você siga um padrão, pois aqui uma vez você seleciona pela classe, e depois pelo id. E o que acontece se você ou outro dev, caso você esteja em um projeto com mais devs, alterarem o nome dessa classe? Pois não existe nenhum indicativo que no html de que essa classe é usada pelo javascript. Você tem duas opções nesse caso:

    1. Crie uma classe específica para ser um selector do javascript. Por exemplo, js-[nome da classe], ai ficaria js-menu. Nisso vai ficar óbvio que esse selector é para o javascript, e se precisar mudar o nome do que é responsável pela estilização, não vai afetar em nada.
    2. Use data attributes. Então ao invés de classe, você usaria da seguinte forma (também seguindo esse padrão de adicionar o js antes:
    // html
    <button data-js="toggle">
    
    // js
    const toggleButton = document.querySelector("[data-js='toggle']");
    

    Esse artigo fala mais sobre o uso dos dois. E esse outro aqui fala o porquê evitar usar classe como selector (2019, então talvez seja outdated e não relevante, mas duvido)

    • Segundo ponto Aquele primeiro evento, o checkbox.addEventListener("change", () => {... não está sendo usado pra nada, né? Eu apaguei e tudo seguiu funcionando, vi que você está tratando do hamburguer menu através do css apenas. Se for, é legal apagar pra não manter código sem uso.

    Enfim, de volta ao código. Aqui você iterou sobre os menuItems da seguinte forma:

    for (let i = 0; i < menuItems.length; i++) {
        menuItems[i].addEventListener("click", () => {
            menuLinks[i].classList.toggle("opened");
            menuItems[i].querySelector("img").classList.toggle("spin");
        });
    }
    

    Porém o javascript tem uma forma nativa de fazer isso sem você precisar ficar usando o for ou while loop. Basta usar o forEach:

    // O forEach vai iterar sobre todos os itens, igual você fez
    // Ai você precisa adicionar o primeiro parâmetro, que você pode nomear como quiser
    // Aqui eu nomeei como menuItem (singular), e o index vai ser o index kk o resto é igual
    menuItems.forEach((menuItem, index) => {
        menuItem.addEventListener("click", () => {
            menuLinks[index].classList.toggle("opened");
            menuItems[index].querySelector("img").classList.toggle("spin");
        });
    });
    

    Isso fará a mesma coisa, porém use essa forma, evite usar o for loop nesses casos, já que já existe uma forma nativa e melhor.

    • Terceiro ponto Você está aplicando o código diretamente dentro do eventListener. Uma boa prática pra você deixar seu código mais limpo, e, futuramente, reutilizável, é você não usar a lógica diretamente dentro do eventListener, mas sim em uma função que será chamada pelo eventListener. Vamos usar o código corrigido acima como exemplo. Para melhorar ele ainda mais:
    menuItems.forEach((menuItem, index) => {
      menuItem.addEventListener('click', () => toggleMenu(index));
    });
    
    function toggleMenu(index) {
      menuLinks[index].classList.toggle('opened');
      menuItems[index].querySelector('img').classList.toggle('spin');
    }
    

    Dessa forma você separa a lógica do evento, e deixa seu código mais organizado, podendo separar em diferentes arquivos, ou então seguir um padrão que muitos fazem, que é, deixar os selectors no topo, os eventos no meio, e as funções lá embaixo tudo junto, que é bom pra projetos menores como esse que não tem muita lógica

    Marked as helpful

    1
  • Andrei 530

    @Xeotheosis

    Submitted

    What are you most proud of, and what would you do differently next time?

    CSS looks fine this time

    What challenges did you encounter, and how did you overcome them?

    In the Figma files, it looks like you can begin a new search if you click on any synonym. This is given as an example: " electronic guitar". But the API doesn't return any results for multiple words. Which meant a day on trying to figure out what I was doing wrong

    What specific areas of your project would you like help with?

    Easy ways to set up light/theme toggle when using React + Tailwind because I don't think my solution is the best (adding lightMode/darkMode classes to all relevant elements)

    Dictionary | React | Tailwind

    #react#tailwind-css#vite

    1

    P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Hey, nice job on completing this challenge!

    • Easy way to set up dark theme: https://www.youtube.com/watch?v=vIBKSmWAdIA

    • If you click a synonym/antonym, it should take user to that word page, yes. To do that you need to change the words to a <button> tag instead of <span>. Now you can add an event to this buttons where it will take whatever text is inside the button, then make a fetch request with that word (like you did when a user clicks the magnifying glass in the search input)

    0
  • @flaviogp

    Submitted

    What are you most proud of, and what would you do differently next time?

    Hi there 👋, I’m Flavio and this is my solution for this challenge. 🚀

    🛠️ Built With:

    • ReactJs
    • TypeScript
    • Tailwind

    Any suggestions on how I can improve and reduce unnecessary code are welcome!

    Thank you. 😊✌️

    Loopstudios landing page (React, TypeScript, Tailwind)

    #react#tailwind-css#typescript#accessibility

    1

    P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Opa, salve, Flavio! Sempre bom ver mais BR por aqui! Ficou muito bom o projeto!

    Feedback:

    • Ao invés de h-[100vh] você pode usar h-screen
    • O texto IMMERSIVE EXPERIENCES THAT DELIVER poderia ser um <h1>. É importante que sempre siga o nível correto das headings. Começando sempre pelo 1.
    • Os atributos alt das suas imagens possuem textos genéricos, que dificultam que usuários com tecnologias assistivas (tipo cegos que usam screen readers) saibam do que se trata. É importante adicionar uma boa descrição para imagens como essa. Por exemplo: alt="A man wearing a virtual reality headset, his mouth open in a scream of anticipation as he reaches out as if to grasp something.". A mesma coisa vale para as outras
    • Sobre os links de redes sociais no footer. É importante ter uma descrição para esse link já que ele possui apenas uma imagem, e nenhum texto. Então poderia fazer assim, por exemplo: <a href="http://facebook.com" target="_blank" aria-label="Visit our facebook page." />. Assim se alguém que possui problema de visão e usa um screen reader chegar nessa parte do site, o screen reader vai ler "Visit our facebook page. Link", e o usuário vai saber que esse link vai levar ele para outra página, sem isso, o screen reader leria apenas "Link"
    1
  • Daniel 🛸 38,650

    @danielmrz-dev

    Submitted

    What challenges did you encounter, and how did you overcome them?

    🛸 Hello Front-End Mentor Community! I'm Daniel and this is my solution for this challenge! 😊

    🛠️ Built with:

    • HTML 🧾
    • Tailwind 👾
    • BEM Notation 🅱️
    • Node.js 🆕
    • Mobile first workflow approach 📲

    This challenge was a very good HTML and CSS refresher. I took the opportunity to practice Tailwind a little bit more. I was used to use Tailwind by just adding the script tag to the head tag on the HTML file but this time (and from now on) I installed it via npm.

    Anyway, it took me a few hours to finish, but I enjoyed every minute of it.

    Again, thanks to the Front-End Mentor team that creates challenges that make us learn a lot from doing them. 💟

    If you have any suggestions on how I can improve this project, feel free to leave me a comment!

    Feedback welcome 😊

    Clipboard Landing Page built with Tailwind

    #accessibility#bem#tailwind-css#node

    2

    P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Muito bom como sempre, Daniel! Fico feliz quando você posta algum projeto pois é difícil ver gente que está aprendendo se importar com um bom HTML semântico.

    Ai vai um feedback e algumas opiniões pessoais que você pode ou não concordar:

    Antes, minha opinião no Tailwind: Eu amo tailwind, uso quase sempre, mas eu sinto que ele não é uma boa jogada em ser usado com um projeto vanilla? Tailwind se encaixa perfeitamente quando usamos algum framework como React, Vue, Angular ou outros visto que eles funcionam como componentes, mas quando você está aplicando diretamente dentro do HTML, isso acaba ficando confuso e difícil de fazer uma manutenção futura. Apenas minha opinião, mas eu manteria usando css ou sass/scss até você começar a aprender React (creio ser o framework que você falou querer aprender), ai você vai ver como tailwind combina perfeitamente.

    • Ok, de volta pro feedback. Cuidado com a descrição do atributo "alt", é importante que ele tenha uma boa descrição da imagem, e jamais adicione palavras como "imagem", "ícone" ou semelhantes, pois o próprio screen reader vai fazer isso. Por exemplo, a primeira imagem do computador um screen reader leria como "Image computer. Image". Como pode ver, o screen reader fala "image" duas vezes, pois ele sempre vai falar qual o elemento que ele está selecionado, saca? Então evite usar essas palavras, e claro, adicione uma descrição que faça sentido para a imagem, como por exemplo: <img alt="A Mac computer screen with a green checkmark." /> ou você pode ir mais longe e descrever o background da tela do computador também, mas não deixe muito grande
    • Sabe essas imagens pequenas que ficam acima de Snippets, Blacklist, Preview? Como são meramente decorativas, você pode adicionar um alt simples, mas também adicione o atributo aria-hidden="true", isso impede que essas imagens sejam lidas por screen readers, visto que não são importantes para o entedimento.
    • Cuidado com essas cores, os parágrafos são quase branco, mesma cor do plano de fundo. É importante você sempre checar o contraste do foreground com o background. Nesse caso você estava apenas seguindo o design então é um problema do design, não seu
    • Adiciona uma descrição para os links do footer que levam para as redes sociais (facebook, twitter, insta). Sem uma descrição um usuário que utiliza alguma ferramenta assistiva não vai saber pra onde esse link o leva, e pode nem saber que já saiu e está em uma outra tela, gerando confusão grande. Pra resolver você pode fazer assim: <a href="O link aqui" target="blank" aria-label="Visit our facebook page." />. Aqui ele descreve exatamente o que esse link quer passar para o usuário, onde ele está falando para visitar a página do face.
    • Pra deixar ainda mais semântico, muitos desses itens poderiam estar em uma lista ao invés de divs. Por exemplo: Os itens Quick Search, iCloud Sync e Complete History poderiam fazer parte de uma <ul> list, o Create blacklists, Plain text snippets e Sneak preview também, as logos das empresas, e as redes sociais no footer também

    É isso, ficou muito bom, creio não ter muito o que falar pois você segue bem as diretrizes e semântica

    Marked as helpful

    1
  • Daniel 🛸 38,650

    @danielmrz-dev

    Submitted

    What are you most proud of, and what would you do differently next time?

    🛸 Hello Front-End Mentor Community! I'm Daniel and this is my solution for this challenge! 😊

    🛠️ Built with:

    • HTML 🧾
    • SASS 🎨
    • JavaScript 🤖
    • BEM Notation 🅱️
    • Mobile first workflow approach 📲

    This is definitely one of my favorite projects so far. It's is not a very hard project, but it's also not easy. Getting those multiple pages to work as they should was quite an obstacle but I managed to overcome it. My Javascript code is not as neat as it could be, but I'm happy because everything is working very well. The final result was better than I expected 😊

    Again, thanks to the Front-End Mentor team that creates challenges that make us learn a lot from doing them. 💟

    If you have any suggestions on how I can improve this project, feel free to leave me a comment!

    Feedback welcome 😊

    Crowdfunding product page

    #accessibility#lighthouse#sass/scss#bem

    1

    P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Muito bom meu amigo!

    Aqui algumas dicas:

    • Existe a tag <dialog> no html que serve justamente para fazer modals, assim não precisaria ter feito do zero com javascript. Essa tag é legal usar pois ela já trata da parte de acessibilidade. Por exemplo, quando eu clico em Select reward, ao invés do modal ficar centralizado, ele fica na parte de cima da tela, e para fechar o modal somente clicando no X, porém com a tag <dialog>, ela automaticamente trata disso, onde o usuário pode fechá-la apertando o ESC por exemplo. Além disso você pode customizar bastante ela. Da uma olhadinha nesse vídeo do Kevin Powel, ele fala mais sobre essa tag
    • Outra coisa, sabe o botão hamburguer menu? É legal você aprender sobre o uso do atributo aria-expanded e aria-control, eles são essenciais para garantir uma boa acessibilidade em botões como esse, que tem o estado "aberto" e "fechado" e muita pouca gente utiliza. A Grace tem um artigo perfeito que cobre isso, e é mais simples do que parece. Segue o link do artigo
    • Não dê ações a elementos não interagíveis, como span e div por exemplo. No botão bookmark você estruturou assim:
    <div>
        <img />
        <span>Bookmark</span>
    </div>
    

    Esse componente acima deveria ser um <button>, visto que você clica nele e ele faz uma ação. Então o correto a se fazer seria da forma abaixo, onde o aria-hidden="true" serve para esconder essa imagem de tecnologias de acessibilidade, como screen readers, visto que ela é apenas decorativa

    <button>
        <img aria-hidden="true" /> 
        <span>Bookmark</span>
    </button>
    
    • O botão que está desativado é legal você adicionar o attribute disabled, então <button disabled />, assim usuários de tecnologias de acessibilidade vão conseguir saber que o botão está desativado, visto que a única forma de saber atualmente é tendo visão
    • Um bug referente aquilo que citei do modal. Se você clicar no botão hamburguer, e em seguida clicar em um dos botões que abre o modal, acaba se tornando impossível de fechá-lo no mobile, pois o hamburguer menu vai ficar em cima do botão X do modal.
    • Ainda sobre esse bug, algo que você pode fazer para ajudar é, quando o usuário clicar fora da caixa do hamburguer menu, ela automática fecha
    • Seria bacana você organizar mais a estrutura do código. Por exemplo, ao invés de deixar o css, scss, e js tudo na raiz da página, você deixa apenas o index.html lá. Ai você cria uma pasta chamada src, e dentro dela você cria uma para o js, e outra para o scss (com o css dentro também). E move a pasta componentes para dentro da do css. Normalmente nomeamos a do scss como style e a do javascript pode ser script. Para as imagens, você pode criar uma pasta chamada assets e colocar a pasta das imagens lá. E futuramente, quando você começar a deixar suas fontes direto no código ao invés de puxar do google, você pode colocá-las dentro do assets também.

    Bom trabalho ai como sempre!

    Marked as helpful

    3
  • @MDEGORRE

    Submitted

    On small screens the content is not horizontally centered. The body should be centered with flexbox but does not work.

    P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Hey.

    The issue is you're handling the containers' widths in a weird way. For you to fix that (however you might need to do some other tweaks after, this is no definite solution), you need to:

    • Remove the max-width: 60%; from the main tag, which is in a media query.
    • Remove the width: 100% from the section class="introduction" tag, which is also in a media query
    • And finally, remove the display: block; and width: 100%; from the div class="container", which is also in a media query.

    Bear in mind it is good practice to start mobile first, that way this issues wouldn't have happened cz it is harder to change from desktop to mobile sometimes. This is not a definitive solution either, some other issue might appear after you do this fix I wrote above, tho I couldn't find any from quickly looking

    Marked as helpful

    0
  • P

    @amporabipo

    Submitted

    I need help knowing how to measure designs and achieve pixel perfect, as well as concepts for managing states in react.

    P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Hey, well done on completing this challenge!

    Regarding pixel perfect, that shouldn't be your goal, pixel perfect is pointless since we'd have to do it for every screen size. However I always try to go for pixel perfect too because I'm a perfectionist haha, there is an extension called PerfectPixel that allows you to add an image as an overlay on top of the website to compare them, that way achieving pixel perfect

    Regarding state managing, this project is very simple when it comes to states, so the way you did is good already, lifting up state is perfctly normal

    Some feedback:

    • The score numbers are wrapped around by a <ul> list, however you should replace it with a <ol> since the order matters
    • There is a bit of repetition in your code that you could address. For example, instead of doing this
    <ul>
        <li><button value={1} onClick={() => handleResult(1)}>1</button></li>
        <li><button value={2} onClick={() => handleResult(2)}>2</button></li>
        <li><button value={3} onClick={() => handleResult(3)}>3</button></li>
        <li><button value={4} onClick={() => handleResult(4)}>4</button></li>
        <li><button value={5} onClick={() => handleResult(5)}>5</button></li>
    </ul>
    

    You can do something like this:

    const entries = Array.from({ length: 5 }, (_, index) => index + 1)
    
    <ul>
        {entries.map((value) => (
            <li key={value}>
                <button value={value} onClick={() => handleResult(value)}>
                    {value}
                </button>
            </li>
        ))}
    </ul>
    

    This way you don't need to write the button 5 times, and if the app ever has to scale to a score of 1-10, all you'd have to do is replace the length: 5 with length: 10 and it would automatically add the buttons for you

    • There is also currently a bug where you have to click twice on the score for it to count. So I have to pick a score, click submit, and pick a score again, then click submit again.

    Marked as helpful

    0
  • P
    Abel Muro 1,580

    @AbelMuro

    Submitted

    A fun app to develop. The most challenging part was utilizing an algorithm that evaluates a string that has a math expression. I ended up using the postfix algorithm to do exactly that. But first, I needed to convert the math expression from infix (5 + 5) to postfix (5 5 +). Postfix strings are perfect for evaluating math expressions using a stack data structure (my leetcode skills finally helped me for once....). And of course, the app is fully responsive and will look great on any device.

    P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Well done on completing this challenge! A calculator is honestly so hard to make, it looks very simple but a lot of logic goes into that, so props to you

    Feedback time:

    • x / 0 = I n f i n i t y. Love that! It's always the first thing I check haha It would be nice if you erased everything after user types something with Infinity on screen. Right now if I do x / 0 and then I try to do more math, the infinity will still be on screen, which will result in undefined
    • If I input a dot . when there is a 0, there is an error on console which won't let me do stuff like 0.4 + 0.3 unless I input 0 first. Since the zero is already on screen, it shouldn't be necessary to input it again
    • Your page lacks an <h1> tag. You could make the calc an <h1>, or then add a screen reader only h1, that way assistive tools and SEO will work better in your website. A screen reader only h1 is basically invisible to users, so it won't appear anywhere, but it will still work for SEO and screen readers.

    Marked as helpful

    1
  • P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Well done on completing this challenge. It looks good and it seems you really took your time honing it, props to you!

    Feedback:

    • First thing I always do when I see the calculator challenge: Any number / 0. Well done on taking that into consideration haha the only thing is that when I do something like " x + x / 0 + x" it doesn't show any feedback.
    • Also, it would be nice if, when the "can't divide" error pop up, the error would go away after I try typing something else, so you automatically erase for me instead of having to click on erase, because if I'm just using my keyboard, it means I have to tab all the way to the erase since some users may not know Esc erases everything (it took me a few to see that)

    I tested a screen reader emulator and it works really well too. I don't have much feedback to offer because you've already done an excelent job! However, I wanted to mention a few minor details for improvement, hence the nitpicking above hehe

    Marked as helpful

    1
  • lsilva021 80

    @lsilva021

    Submitted

    Olá, pessoal!

    Este é meu terceiro desafio realizado. Particularmente foi o desafio o qual tive mais facilidade, pois não exigiu de mim conceitos os quais eu não dominava.

    Única coisa com a qual ainda tenho um pouco de dificuldade é a propriedade "position: relative/absolute;" e um pouco de dificuldade com porcentagem como unidade de medida para tamanho e posicionamento.

    Me senti à vontade para adicionar alguns outros estilos ao projeto, que foram a função ‘scale: ;’ na imagem do perfil, e os 'box-shadow: ;' ao card e aos links.

    Estou aberto a críticas ou qualquer outro tipo de comentário que me ajude no meu crescimento profissional.

    No mais é isso. Obrigado.

    Hello, guys!

    This is my third challenge completed. In particular, it was the challenge that I had the easiest time with, as it did not require concepts that I did not master.

    The only thing I still have a little trouble with is the "position: relative/absolute;" property. and a little difficulty with percentage as a unit of measurement for size and positioning.

    I felt free to add some other styles to the project, which was the 'scale: ;' function. in the profile image, and the 'box-shadow: ;' to the card and links.

    I am open to criticism or any other type of comment that helps me in my professional growth.

    That's it anyway. Thanks.

    P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Salve meu mano, parabéns ai por concluir o desafio, esse ai ajuda bastante a fortificar os conceitos de flexbox. Segue meu feedback, vou me referir as tags específicas pelo nome que você deu na classe:

    • Essa tag <article> que tu usou ao redor do .card não é necessária. Se você quiser manter o seu site com uma semântica bacana, subsitua por <main>, que significa que é o corpo principal da página
    • Sobre o uso do relative/absolute, qual a sua dúvida exatamente? Nesse desafio não tem nada que necessite alteração da propriedade position
    • Eu vi aqui que você usou relative/absolute para centralizar sua página. Isso não é algo recomendado, pois vai causar problemas em páginas maiores, então é legal você aprender a forma correta de fazer (usar o absolute para centralizar ainda é útil em alguns casos específicos, mas não para centralizar a página principal, saca?). Segue abaixo:
    // Tudo que eu colocar abaixo, é o que você tem que remover dentro do .card
    // O resto que não está aqui você pode manter
    .card {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        margin: auto;
    }
    

    Agora para centralizar após remover o position e as propriedades que o afetam:

    //Troca o nome da taga <article> por <main> e coloque o seguinte estilo nela
    
    main {
        display: flex;
        height: 100vh;
        width: 100%;
        align-items: center; // Isso vai centralizar verticalmente
        justify-content: center; // Isso vai centralizar horizontalmente
    }
    

    Marked as helpful

    0
  • @aybegu

    Submitted

    This was my first React project, I did the same card on localhost but somehow I messed up the files and I realized while pushing to Github 😄 I am still learning and I would appreciate any feedback!

    P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Well done on completing this challenge!

    Just a heads-up, the react developers don't recommend starting a project with create-react-app, there are better alternatives, the best one (imo and what most people here use) would be using vite. If you do npm create vite@latest it will create a react app just like the create-react-app. It won't change how you code don't worry, this is just the compiler

    To fix the current issue of github not finding your index.html, just move your index.html from the public folder to the root (where the readme.MD and config files are).

    Marked as helpful

    1
  • @AhmarIftikhar123

    Submitted

    Hey developers,

    I've just pushed my code online and would love your input! If you have a moment, could you please take a look and share any suggestions or improvements? Your expertise is invaluable, and I'm eager to enhance my project. Thanks a bunch!

    Repository Link: [https://calculator-app-ahmar-iftikhar.netlify.app/ ] \ https://github.com/AhmarIftikhar123/Calculator-app

    Cheers, [Your Name]

    P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Well done on completing this challenge! I remember trying once a few months ago and giving up because I was finding it so hard haha so good job

    Here's some feedback, starting with bugs I found:

    1. Currently the user can input a bunch of dots, and this should not be allowed, so you might wanna add some regex to take care of that. (For example, I can type 5 + 5.5.5.5....5.5.5 and so on)
    2. If I input, any number divided by 0, then try to add, it throws a console error, but no UI error. Try the following to reproduce the error: 5 / 0, press = , then add 5 +
    3. If user tries to del the numbers after doing some math, the delete actually deletes the result one by one too. How to reproduce: 222 + 222 =, then input a few other numbers and try to delete
    4. The mobile version doesn't have enough padding between the result and the input box

    Feedback not related to bugs:

    1. Look up LocalStorage in javascript, with this you can save the theme the user picks, and save it across sections. For example, if I like the theme 3, you save it locally with localStorage, then if I refresh the page, it will still be with the theme 3 selected

    Marked as helpful

    1
  • Renata 170

    @An-Renata

    Submitted

    It was an interesting challenge. It was nice to work with this project and practice react-router deeper. Of course, I need more practice with it and probably build a more complex app, to apply move navigation within the program. Also, my first try using tailwindCSS, appreciate it more than Bootstrap so far. :)

    React, React Router v6.4, tailwindCSS project

    #react#react-router#tailwind-css#fetch

    1

    P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Hey, Renata. Well done on completing this challenge!

    Here goes some feedback:

    • If user reloads your page, it throws a 404 error (you can test it yourself, just reload the page). There is a config to fix that, I don't host in netlify so I can't tell you how to do it, only hosted in vercel but I'm sure you can find a solution!
    • Take a look at prefer-color-theme on css or js/react. This ensures the page's theme respect the user's device. So if my device is on dark mode, your website will automatically be on dark mode when I visit your website for the first time.
    • Look up a bit more on localStorage, that way you can save the theme locally so when user refreshes your page, or revisit some other time, it will still be in the same theme they left it
    • I recommend adding the following classes in the div the wraps everything below the header to ensure your page doesn't stretch too much when users zoom out or, in my case, has a wider screen (it makes the page looks cleaner)
    max-w-7xl mx-auto
    
    • It would be nice if user could click the border of a country, and this would take the user to that country
    • Still on the border, some countries have a lot of borders, and right now the spacing between them is breaking when you look up a country wich has a lot of borders (try searching for Russia to test it)
    • Some countries have multiple top level domain. Currently you're only displaying one (see Russia again to test it, Russia has 3 top level domain: .ru, .su and .рф)
    • Regarding the alternative text in the images, there is currently over 50 countries that have no alt text. I know the api has an alt text, however it is extremely long, and not all countries have it, so I'd consider adding one of your own, for example: "${currentCountry} flag" or something else short and descriptive
    • You skipped a heading level. You started with an <h1>, which is the logo, and then you went to <h3>. You should always follow the correct order, so instead of h3, consider using h2 and if you need it to be smaller, just do that with tailwind css instead.
    • Use more semantic html tags, right now you are using divs for almost everything. You could, for example, use a <header> to wrap the logo and theme toggle, and you could use a <main> to wrap all the countries card (one main to wrap them all)

    Marked as helpful

    1
  • P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Opa, tá metralhando esses desafios, que bom que ta focado haha continue assim!

    Feedback:

    • Não sei se notou, mas ele não centraliza horizontalmente em telas maiores. Isso acontece pois você adicionou max-width: 1440px; no <body>. Se você remover, vai notar que isso já resolve e ele centraliza corretamente.
    • Referente a semântica, você iniciou com um <h1> no título, muito bom, mas em seguida pulou direto para o <h3>. O correto é você sempre seguir na ordem. Se você usou o <h1>, o próximo deveria ser o <h2>. Caso você queira deixar o h2 menor, não tem problema, só estilizar com CSS
    • Sobre o responssivo, você não utilizou @media query em lugar algum, da uma olhadinha melhor sobre como usar esse recurso, pois ele que resolve a questão da responsividade. Você pode ler mais sobre aqui nesse artigo

    Marked as helpful

    1
  • P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Salve, jovem! Parabéns pelo projeto

    Sobre o CSS, algumas dicas:

    • Nunca use porcentagem para margins ou paddings. Opte por usar px, ou rem esse articlo explica melhor sobre quando usar px ou rem. Mas se você estiver na dúvida, use rem.
    • Você separou o illustration e content (falando por classes pra você conseguir achar) que fica meio confuso. Se você quiser que dois itens ocupem metade da tela, você pode usar grid:
    .exemplo-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr); // O 2 é o tanto de colunas que você quer, no caso 1 quando for mobile, e 2 quando for desktop, use media query para alterar
    }
    

    Isso vai dividir dois pela metade. Você também pode usar Flex pra isso e você precisaria alterar alguams coisas no seu código pra isso funcionar, como por exemplo alterar o width: 108% da sua imagem para width: 100%. Remover o width: 50% e width:48% do seu illustration e content, teria que mexer em algumas coisas, mas você está no caminho certo! Parabéns ai pelo projeto

    Marked as helpful

    0
  • P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Hey, well done on completing this challenge! I just finished it a few days ago and it was one of my favourites challenges!

    I don't know Angular, so I'll just say a few things I noticed that could do with some improvement feature-wise:

    • You should take a look at prefers-color-scheme property in CSS (or Js too which is what I used). This ensures your pages theme is set to whatever the users device is on. My device is on dark mode, wich means your page would be on dark mode as soon as I open for the first time too.
    • Still on the theme topic, you could add localStorage, that way the theme is saved across section, so if I close your page and open again, it will still be in dark mode. Also, after doing that, you could add local storage to the font selection too, so that the user's preferred font will always be the same across sections.
    • Make so when a user types and press enter, that triggers the data fetching request. Right now the only way to search a word is clicking the search icon, and since it doesn't look like a button, it can make some users think the app is not working
    • The loading status is not working as it should. I took a look at the network tab in the devs tool, and the loading status only appears after data has been fetched. The loading status should be visible while the data is being fetched, and then dissappear once the data has been fetched
    • The antonyms/synonyms could be a button, then after user clicks that, the clicked word appears on screen. It would help users find similar (or opposite) words more quickly without having to type something they could just click

    All in all your project looks great! I can't talk about the code since I don't know angular haha but you did a great job

    Marked as helpful

    1
  • Kim 440

    @01057057kim

    Submitted

    It's difficult to install Tailwind and Vue. There is an issue with git, and there is a lot of work to do before deploying vue. Do you have any advice on how to use Vue efficiently? I still use Vue like standard html. How can I improve? Please suggest. Thank you. the screenshot is not right, click the preview site!

    P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Well done on completing this challenge!

    There are a few SOLID principles for coding in Vue. I don't really know Vue, only React, but this article covers it. The one I use in react, and I see it is the same in Vue, is the Single Responsability Principle (SRP), where you have one component take care of a single thing, so you wouldn't end up with all your html in a single file for example.

    Also, the link to your github page is broken at the moment, so I can't really see your folder structure

    Regarding vue and tailwind installation, it is actually very simple to install if you use Vue with VIte. You should follow the steps in the documentation, you can find them here.

    Marked as helpful

    0
  • @ElsonMartins

    Submitted

    Olá, comunidade, sou o Elson, mas um projeto realizado.

    Foi um projeto mais tranquilo, comparado aos que fiz, porém, tem o detalhe da foto não consegui fazer, tentei, mas eu acho que é um pouco mais complexo do que parece.

    Hello, community, I'm Elson, but a completed project.

    It was a calmer project, compared to the ones I've done, however, there's the detail in the photo that I couldn't do, I tried, but I think it's a little more complex than it seems.

    Projeto Feito com Flex

    #accessibility

    1

    P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Salve maninho, espero que esteja curtindo essa jornada, vi que você começou recentemente, e ta mandando bem!

    Algumas dicas ai que possam te ajudar, desculpa que vai ficar um textão kk

    • É legal evitar o uso essessivo de divs, mas é importante também não usar as tags erradas. Digo isso pois você utilizou duas vezes a tag <section>, uma para englobar a parte onde mostra os days left e a outra na foto de perfil. Nesses dois casos o correto seria usar div e não **section. Section você usa quando é literalmente separar uma seção de páginas, por exemplo, aqui no frontendmentor tem 4 seções dentro da main tag:
    1. A seção onde mostra a imagem de fundo com o seu projeto e o botão de preview e de visitar o código
    2. A seção do design comparison, onde da para comparar o seu projeto com o design oficial
    3. A seção onde você deixa a sua mensagem com perguntas ou dúvidas sobre o projeto
    4. E finalmente, essa seção que estou usando agora que engloba a parte de deixar um feedback pra você

    Então aqui você pode ver que a seção está separando temas distintos. No caso do seu projeto, ele tem apenas uma seção, que seria a que mostra o card todo e você está usando a tag <main> (correto inclusive). Então caso você queira utilizar a tag section, por exemplo, o correto seria você criar uma tag <section class="container"> e remover o class="container" da tag <main> mas sem remover a tag main, faz sentido? Espero que eu não tenha deixado mais confuso haha mas qualquer dúvida pode perguntar

    Marked as helpful

    1
  • @AlanPinhon

    Submitted

    Hello everyone. 👋

    This is the Frontend Mentor challenge to search information of all countries around the world.

    The challenge is to build out this app, integrate with the REST Countries API to pull country data and display it like in the designs.

    It is built on React , Vite , TypeScript , Vitest, React Router & Mock Service Worker.

    I am open to any suggestion to improve code or carry out good practices. 😄

    Thanks for watching. 🤓

    Hola a todos. 👋

    Este es el reto de Frontend Mentor para buscar información de todos los países del mundo.

    El reto es desarrollar esta aplicación, integrarla con la API de REST Countries para extraer los datos de los países y mostrarlos como en los diseños.

    Está construido en React, Vite, TypeScript, Vitest, React Router y Mock Service Worker.

    Estoy abierto a cualquier sugerencia para mejorar código o realizar buenas prácticas. 😄

    Gracias por ver. 🤓

    P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Hey, well done on completing this challenge!

    • There is currently an issue where if a user loads your page, it re-directs them to a 404 error page (you can try it yourself, just reload the page and an error will occur). There is a config to fix that, since you are using netlify I honestly don't know how to do it, but in vercel you can fix by creating a file called vercel.json and adding { "routes": [{ "src": "/[^.]+", "dest": "/", "status": 200 }] } to it. So try and look up if netlify would be the same way or if they have a different config file.
    • I see that you have added local storage for the theme switch. It would be nice if you also added a prefers-color-scheme so that the first time a user opens your page, the theme will be switched automatically to whatever the user's device is on. In my case, my device is always on dark mode, so your page should be in dark mode on a first visit, and then store this value in the local storage too. You can see more here
    • Another tip would be to add a max-width to your containers, that way your page will not stretch all the way when a user zooms out or, in my case, has a wider screen. A max-width: 90rem; margin-inline: auto; on your <body> tag will show you more or less what I mean.

    All in all this is a very good project, well done, I see that you even added testing cases, so I'll definitely take a deeper look at your project to see if I can learn how to implement that myself haha good job

    Marked as helpful

    0
  • P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Well done on completing this challenge!

    A few things you could add to improve your skills even more:

    • Add localStorage so the theme can be saved across sections, this means if I pick dark mode and reload the page, the page will be in dark mode instead of hard-coded to light mode.
    • Still on the theme, you could take a look at prefers-color-scheme in this article. This way the theme will be automatically set based on what the user's browser/device is set, so if the user's device is on dark mode, the website will automatically be on dark mode too without user having to toggle
    • I'm not sure what the issue is, but right now there is a bug where not all countries are loading. Only 8 countries are shown, even if I scroll down or zoom in or zoom out. However I can see that they are in the page if I write in the search input
    • You wrapped the country cards in a <button> tag, however when you click the country card, it takes you to another page. This is an <a> anchor tag behaviour, so you should change from button to anchor tag. This discussion covers when to use which
    • When you click a country border button, this sends a request to fetch every single country. Since you already have all the country data when a user opens your page, you don't need to make any more requests, save this data in a state so you can access it seamlessly, or if you don't want to, use the endpoint that fetches a single country instead of all of them, you can take a look at the country api documantation on how to fetch a single country

    Hope it helps! Once again, well done, this is a hard challenge!

    Marked as helpful

    0
  • @allan-hanauer

    Submitted

    Hello again, I'm currently diving into the world of web development and eager to learn React and Sass. However, I could use some guidance on getting started with these technologies.

    Resources: Could anyone recommend some beginner-friendly resources or tutorials for learning React and Sass? I'm looking for resources that offer hands-on exercises and practical examples to help me grasp the concepts effectively.

    Best Practices: What are some best practices to keep in mind while working with React and Sass? Any tips or tricks that can help me write cleaner and more efficient code?

    Any advice or insights you can provide would be greatly appreciated. Thank you for your help!

    Best regards, Allan Hanauer

    FAQ accordion with SASS and React

    #react#sass/scss#accessibility

    1

    P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Gratz on complething this challenge!

    In terms of best practice for writing clean code in React - and bear in mind some people prefer other methods - would be using the Single Responsability Principle. It basically means you should have one component handle a single thing. I like this method as it makes it very easy to revisit your project, as you know one component will be doing only one thing. You can watch this video that goes a bit more in depth into it, or here if you prefer to read.

    Also, if you have components, it makes it more organized for you Sass files too. As you could have one folder for a component, and in that folder have the sass file that interacts with it, for example:

    src
    -- components
    ----Container
    - container.jsx
    - container.scss
    ----Card
    - card.jsx
    - card.sass
    ----Button
    - button.jsx
    - button.sass
    
    --styles
    // ...and here would be your variables 
    // and where the other styles would be imported to 
    

    Of course, this is a very simple example but it still shows how it could go.

    About resources with hands-on exercises, do remember the best way to learn is by creating projects, there is this website that I hear is very good for beginners though, it has hands-on exercises and it doesn't hold your hand too much so it could be very useful, but it focus on full stack but you can look just at the react bits. There is also the Odin project which is very famous among learners, and they launched a react course last year

    Marked as helpful

    1
  • Rob Meijer 100

    @robmeijer

    Submitted

    Getting more familiar with using nested CSS.

    Spent a lot of time extracting as much unique CSS as I could to avoid duplication across multiple sections.

    Would like to look at using this approach from the start, rather than cleaning up afterwards.

    P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Well done on complething this challenge!

    CSS sure has come a long way, nice to see someone using its new features, :has and containers are so powerful!

    As a tip, it is not recommended to use px units when dealing with media queries, you should use rem or, even slighly better, em. This article explains why, even showing examples of what happens when you use px as opposed to rem or em

    0
  • Pratik 10

    @PratikThoratNortheastern

    Submitted

    This project was a fairly easily challenge and a good warm. Or so i thought. I can say that a decent understanding of HTML and CSS is an absolute must. I was able to quickly build the design using flexbox. In challenges coming forth, I will focus more on best practices and code quality over just building and making it work.

    P
    Luciano Lima 1,290

    @LucianoDLima

    Posted

    Well done and welcome to the community :D

    Just a few corrections you could make since your project already looks very good:

    • You're adding all the text directly inside the <div> tag. Consider using correctly semantic HTML, so instead of div, you could use a <p> tag, which represents a paragraph:
    <div class="qr-text-thin">
    Scan the QR code to visit Frontend Mentor and take your coding skills
    to the next level
    </div>
    

    you could

    <p class="qr-text-thin">
        Scan the QR code to visit Frontend Mentor and take your coding skillsto the next level
    </p>
    

    Marked as helpful

    0