Let’s say you have your portfolio, like
www.glynlewington.com, hosted on Netlify and want to add your projects onto the same domain. They are all separate git repositories and Netlify is made for hosting from a single repository…but don’t fear! We can host them on subdomains like
project.glynlewington.com with just a little work.
Netlify makes it super easy to host your static sites with them for free. I recently moved my portfolio from a VPS over to them, and it’s great that they automatically update your site every time you push to your git repository.
In the past, I had all…
Are you building a full-stack app and want to let users upload an image but you’re not sure how? In my experience, this is always achieved by having users input a link and saving this string to your database. This works great and is quick and easy, but it’s also kind of cheating. What kind of app makes you first go to another site and upload your image, and then come back and link to it?
So, what’s the solution?
Not as simple as it sounds…
1.1 — Create a Navbar
Here’s a simple example with links to sections on the same page with #id’s.
<li class='navbar__list__item><a href='#intro'>Intro</a></li>
<li class='navbar__list__item><a href='#meatnpotatoes'>Meat 'n' Potatoes</a></li>
<li class='navbar__list__item><a href='#stuff'>Stuff</a></li>
1.2 — Add Tab Index to html Sections
If you don’t set the tabindex you won’t be able to set focus when writing…
If you want to implement the minimax algorithm, it will bust your balls…
Step 1: Don’t think about the minimax algorithm! (Whattt?)
Before implementing minimax for the AI move, build the game. I made it with the AI choosing a completely random move from the available squares. As you can imagine, not very difficult to beat… but effective for putting together all the styles and other logic. At this point, you might also be content and happy to leave out the algorithm. But this just didn’t feel right for me.
After hours/days of frustration implementing (trying to) minimax I felt…