I built this site to get experience with Bootstrap 4 and the Fat-Free Framework.
Bootstrap is a popular front-end framework for building responsive websites.
Fat-Free is ranked in the top ten PHP frameworks.
It’s easy to create a professional looking website using WordPress or other content management systems (CMS), but if you want your site to look a little different from a stock theme, you have to customize the design. That can get complicated. (I find it easier to modify straight HTML code than to modify a WordPress theme.)
If you’re creating an e-commerce site, or need users to login, then WordPress is a good option as it includes the security you’ll want.
But, if the most complicated interaction you require with users is a contact form, and you want pages built from shared templates, clean URLs, automatic language selection, and more flexibility in the site design, then the setup demonstrated here could be a good solution.
I’ve provided explanations for how I setup the site in the Detail sections, and all of my files are on GitHub.
Bootstrap 4 provides a responsive grid that adjusts across different display sizes, and, because of its popularity, there are a large number of code snippets available at Bootstrap and on GitHub. There’s also plenty of information about using Bootstrap 4 available via Google.
In May 2021, Bootstrap released version 5 with new features, but dropped support for older browsers, such as Internet Explorer 10 & 11. Microsoft ended support for IE11 on June 15, 2022 and in Q1 2023, they started permanently disabling Internet Explorer on some versions of Windows 10. As I’m still seeing some visitors using Internet Explorer (< 1%), I’ll keep supporting it on my existing sites for a while longer, but I’ll not support Internet Explorer on new sites I create. I suspect that a few people at home as well as some schools are still using old PCs with Windows XP or 7 that use Internet Explorer.
While the Fat-Free Framework isn’t the most popular PHP framework (that would be Laravel), it does work on shared hosting plans (Laravel doesn’t, at least not easily) and Fat-Free is considered to have a fast learning curve.
The main Fat-Free components I’m using are:
Accept-Language string from a user’s GET request, which I use for selecting the appropriate language subdirectory when a user requests the root directory.