Creating comment sections using media objects
In this recipe, we will create a responsive comments section using media objects. We will enhance the design with the help of the HTML's <time>
element and Bootstrap's badge component. We will also use Font Awesome's icons for comment liking and sharing. We will add interactivity using Bootstrap's alert
component, which will be triggered after clicking on a Font Awesome icon.
Getting ready
Everything is already set up in our chapter3-start
folder to start working on this recipe. Now that all the files are there, we just need to add code to them.
How to do it...
- Navigate to
app/recipe2.ejs
and add the following code to it:
<!-- Create Comment Areas Using Media Objects --> <div class="container mt-5"> <h1>Chapter 3, Recipe 2:</h1> <p class="lead">Create Comment Sections Using Media Objects</p> <ul class="custom-media"> <li class="media list-group-item media p...