When you click the green check mark, it sends you to non-edit mode
Also, when you click anywhere outside the input textbox, it sends you to non-edit mode
But when you enter non-edit mode, the “save” button (checkbox) switches back to being an edit button
What was happening was that the user would click outside the input textbox, so we’d leave edit mode, but then while the user is clicking the “save” button transformed into the “edit” button and would receive the mouse button release event and treat it as a click, sending the user back to edit mode.
I actually still haven’t found a good solution to this.
My current workaround is on the blur event from the textbox to check the element that the user clicked on and drop the event if they clicked the save button.
Added a pricing page and added some more copy to the subscribe page.
Launched a rebooted Is It Keto, implemented in Gridsome.
I’d been meaning to rewrite the Is It Keto site for a while because it’s implemented in Python2 AppEngine, which Google announced they’re shutting off at an unspecified date.
I started this process last week when I discovered VuePress, the first Vue-based static site generator I’ve ever seen.
Ironically, when I was searching for VuePress’ Twitter handle to tag them in last week’s update, I found Gridsome.
Gridsome is like everything I loved about VuePress and they had done even more work I expected to do myself.
It seems like VuePress is focused on the niche of developer documentation, whereas Gridsome is more interested in general purpose websites.
The Gridsome implementation is 68% fewer lines of code than the previous implementation
Old: 8,431 LOC (Python, HTML, CSS, JavaScript)
New: 2,646 LOC (Vue, JavaScript)
Best of all, there’s no database. All the articles are stored in the repo as Markdown files.
I never have to worry about syncing the database between production and development or doing a complicated dance because I want to change a field in a database.
Functionality is mostly the same, except:
I dropped the blog posts because they got so little traffic that they weren’t worth migrating.
I feel SO dumb for putting this off for so long with the old version of the site.
It makes navigation so much easier AND I wouldn’t have had to implement all this dumb code for fuzzy-matching food names, like mapping cherry to cherries.