New Learnings: JavaScript and Hugo
Yesterday I kicked off blogging using Hugo. I also carried on with Scrimba's Frontend Developer Path.
Hugo
What: Hugo is a lightweight framework for building static websites that are fast.
Why: Blogging the next day enhances learning. It enables producing knowledge which is the next necessary step after consuming knowledge. I decided to use Hugo as it is lightweight and comes with very nice themes to pick from. I picked a themes based on VMWare's Clarity Design System.
How: It's very easy to get going.
- Install Hugo
- Create a new site
- Add content
- Configure the site
- Publish it
I copied the theme's example site as it gives me a good starting point. I also added a GitHub Actions workflow, so that I have a nice deployment pipeline that takes my changes to production immediately.
Learn more about Hugo here
JavaScript
I continued with learning frontend skills and gaining hands-on experience using Scrimba's Frontend Career Path. Yesterday I re-started Module 5: JavaScript Essentials. Key concepts I went through yesterday:
- How to have a modal removed from the normal flow of elements and get position fixed to the view port. The
steps in CSS are:
position: fixed;
top: 0px;
left: 0px;
bottom: 0px;
right: 0px;
margin: auto;
- Hide an element using
display: none;
- Use
setTimeout()
to run some function after a set timeout in milliseconds. - Change the style of an element using
[element].style.[property] = "[value]"
- Forms and submitting forms