My newest frontity creation!

https://therealmattbert.vercel.app/

https://github.com/matthewbert86/therealmattbert

I just built my 3rd frontity project today!!!

This is a personal website, I guess. I am sharing not only my dev stuff, but also mental health things, geek related topics, etc.

This was a fun project. I will write up a blog shortly on how I built it, and will also turn it into my own theme and have it available to download.

I am having an issue I could use help with…

I am having trouble getting the mobile menu to close when I click on a link. It just stays and I can only see the page if I click on the x at the top of the menu modal. Anyone want to take a look at my repo and see if you have any ideas?

4 Likes

Hi @matthewbertweb,

Really cool! Thanks for sharing it. I like this approach to share a portfolio and other topics in the same site. :slight_smile:

I will write up a blog shortly on how I built it.

That would be great! Looking forward to reading it.

I am having trouble getting the mobile menu to close when I click on a link. It just stays and I can only see the page if I click on the x at the top of the menu modal. Anyone want to take a look at my repo and see if you have any ideas?

I recommend opening a new topic in the Dev Talk & Questions category and share the repo there, that helps bring attention to your issue.

Hi @matthewbertweb

The site looks great - well done. :ok_hand:t2:

Regarding your mobile menu issue, in menu-modal.js change this:

<MenuLink
    key={name}
    link={link}
    aria-current={state.router.link === link ? "page" : undefined}
>

to this:

<MenuLink
    key={name}
    link={link}
    aria-current={state.router.link === link ? "page" : undefined}
    onClick={() => actions.theme.closeMobileMenu()}
>

And ensure that you pass actions to the <MenuModal> component:

const MenuModal = ({ state, actions }) => {
...
1 Like

Thank you, that worked! The only other thing I had to do was change

import Link from "@frontity/components/link";
to
import Link from "./link";
because the links were not visible for some reason. But now it works just fine.

I also am going to take this concept and build a simple starter theme people can install, just set up with the frontity wp endpoints instead of my own.

Once I get a few more things figured out, I will set that up and share it with you guys. I’ll make sure to have a little tutorial written for it as well.

1 Like

Hi, I really love the design of the page. It looks really clean but great!

1 Like

Thank you :pray::pray:

Hi @matthewbertweb

If you’re using mars-theme’s <Link> component instead of the one from @frontity/components/link you don’t need to pass the onClick function, as the <Link> component that mars-theme provides already calls the closeMobileMenu function.