We first need to download the actual Bootstrap file from the official website at https://getbootstrap.com/docs/4.0/getting-started/download/. On the resulting page, we're going to click on the Download button after the Compiled CSS and JS title.
The downloaded file, bootstrap-4.0.0-dist.zip, is a zip file that's just 592 KB in size - pretty small. We should unzip it using either Winrar, 7zip or other similar tools. After unzipping it, we will have a folder with the name bootstrap-4.0.0-dist on our system.
After opening the URL, we may see a bunch of code in our browser. All we need to do to save it locally is to press Ctrl + S on Windows OS or Cmd + S on MacOS. This will prompt our browser to save the file with the name jquery-3.6.0.js in our Downloads folder.
We got all the files we need now, let's connect them together in a sample project.
Let's create an example project to demonstrate how to use all the files locally. First, we'll create a new folder called bootstrap-offline. This will be the root folder of our project. It is called root because it will contain other folders and files.
Next, we will create two new folders in the bootstrap-offline, namely:
Now, we will copy bootstrap-4.0.0-dist/css/bootstrap.css to bootstrap-offline/css/bootstrap.css.
Furthermore, we will copy bootstrap-4.0.0-dist/js/bootstrap.js to bootstrap-offline/js/bootstrap.js.
Lastly, we will copy the jquery-3.6.0.js we downloaded earlier into bootstrap-4.0.0-dist/js/jquery-3.6.0.js.
To wrap it up, we will create a new HTML file called bootstrap-offline/hello.html with the following content:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Offline Bootstrap</title> <link rel="stylesheet" href="./css/bootstrap.css"> <script src="./js/jquery-3.6.0.js"></script> <script src="./js/bootstrap.js"></script> </head> <body> <div class="jumbotron text-center"> <h1>My Offline Bootstrap Page</h1> <p>This page is using local Bootstrap CSS and JS files</p> </div> </body> </html>
In the snippet above, note that we added jquery-3.6.0.js before adding bootstrap.js. This is because bootstrap.js requires jquery-3.6.0.js to work.
We can open the hello.html file in the browser to see the awesome page, turn off the internet and it will still work.
We will be looking at the request-validator library, which is able to compare the user input against a pre-defined set of rules like required,max,min
Why upload the file, when all you need is the data in it? Cleaner, faster avoid connection timeouts, corrupted data just by adding excel_uploader js
Export your MySQL database to a zip file, send the generated SQL dump to your email, Amazon S3, Google Drive etc. Plus automate the process #DevOps
In this article, we are going to look at how to configure Spring boot to handle exceptions and customise the error responses
Maven Central to the World, deploy your open-source Java library for other people to use in their projects as a dependency
This is a comprehensive architectural guide on how to secure important APIs of your application including the signup, reset password and retry OTP API
We'll build a complete desktop application that'll translate English text to Morse Code and vice-versa plus an overview of Java GUI
Create a Spring Boot application, set up your server and configure Gitlab to build your app, run tests and deploy automatically to your server
Being able to read log files on a production server can boost the quality of your emergency readiness and response. Read on to learn how.
Interacting with the Formstack API v2 just got better with this new fstackapi_php library. We'll use it to submit form dynamically and more
Here is a curation of the different technologies that power the web and the ones you should learn to make a living as a web developer
How to use Terraform to create a DigitalOcean droplet for a Java (Spring Boot) web application
Ever wish there is a way you insert default data into the database during application startup in a SpringBoot environment? Read on!
This is a recap of how I moved from Laragon 2 to v3, my mistakes and how you can avoid them. Plus undocumented changes I discovered
Learn how to handle exceptions in a monolith Spring Boot application and return custom error pages. You'll also learn how the default handling works