Giter Club home page Giter Club logo

Comments (7)

xunxdd avatar xunxdd commented on August 24, 2024 1

oh, thanks a lot. I have never forked any repo. Guess one more thing learned. pr done. feel free to comment, reject, or anything you see fit

from home.

xd-hearst avatar xd-hearst commented on August 24, 2024 1

Sure, I'll test this locally. 🔥

that is terrible code, discard it. i have learned a lot. thank you though

from home.

hashirshoaeb avatar hashirshoaeb commented on August 24, 2024

Hi @xunxdd,

I'm glad to see your version of portfolio. It's really tempting. 😃 I'll probably showcase your version in my readme.
Yess, setting an active tab in navigation bar would be a nice contribution. ✨

Best,
Hashir

from home.

xunxdd avatar xunxdd commented on August 24, 2024

Thanks. @hashirshoaeb . I tried to do a pr, however found that I am not permissioned.
`

   const sections = document.querySelectorAll(".target-section");
   sections.forEach(function(current) {
    const sectionHeight = current.offsetHeight;
    const sectionTop = current.offsetTop - 50;
    const sectionId = current.getAttribute("id");
    const pos = navBottom - scrollPosition;
   /* If our current scroll position enters the space where current section 
    * on screen is, set active section
    */
    if (pos > sectionTop && pos <= sectionTop + sectionHeight) {
      setActive(sectionId);
    } `

I basically add a class to each relevant section and onScroll did the above, it is also done here

https://github.com/xunxdd/portfolio/blob/master/src/components/Navbar.jsx

Though since your menu is light-gray colored, the active menu style is not very obvious, so the pr is probably not necessary anyway

Please let me know if the above is the right approach though. I'd appreciate. Thanks

from home.

hashirshoaeb avatar hashirshoaeb commented on August 24, 2024

hmm, seems like you have not forked this repo.

  1. fork this repo.
  2. clone your forked repo into your computer.
  3. create a branch.
  4. make changes in that branch.
  5. push the branch to your forked repo.
  6. create a pull request.

learn more from, here https://www.neonscience.org/resources/learning-hub/tutorials/version-control-github

Feel free to ping me via email or linkedin, if you face any issues.

Best,
Hashir

from home.

hashirshoaeb avatar hashirshoaeb commented on August 24, 2024

Sure, I'll test this locally. 🔥

from home.

hashirshoaeb avatar hashirshoaeb commented on August 24, 2024

Adding your portfolio link in my Readme.

from home.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.