Implementing the timeline
We will continue with the code from the preceding chapter, which implemented a fully working and collapsible sidebar.
The timeline consists of the following two main sections:
- The input section
- The timeline/feed section
Implementing the input section
The input field can vary from social media site to social media site, and how it appears can also vary. On Twitter, it is simple and always at the top of the page, but, on some websites, it can appear as a modal-style popup after some kind of add/post button is clicked on. We will keep things simple and use the Twitter style input field.
Add the following code to the index.php
file:

The code doesn't require too much description and is very similar to the contact form code from Chapter 6, Creating a Contact Us Section; the biggest difference being that there's only a single input field instead of multiple fields for name, email address, and so on. Let's take a look at the fruits of our clearly strenuous labor:

Looking good...