That involves the navigation, tweets list, and trending hashtags section.
Use Mockup for styles like border
It needs to follow a class structure like this:
class navigation
class logo
<i class="fab fa-twitter"></i>
class home-link
<i class="fas fa-home"></i>
class profile-container
class profile
It needs to follow a class structure like this:
class tweet-user-info
class tweet-user-profile
class tweet-user-name-container
class tweet-user-fullname
class tweet-user-username
User Profile: width: 30px; height: 30px;
User Full Name: font-size: 10px
User Twitter Handel: font-size: 8px
List Item: padding-left: 20px; padding-top and bottom: 8px
Return Hello World
for the root /
get request
Use axios for making an API request to Twitter API
Console log the data
Return as a response
- Create Twitter class inside `api/helpers/twitter.js`
- Create a `get()` function that takes in the necessary parameters
- Inside `get()` return `axios.get(...)`
- Import Twitter class in `app.js` with `const twitter = new Twitter();`
- Initialize and use the `twitter` object to now do somethong like `twitter.get(...).then(...).catch(...)`
For now, I want you to use the following static url to get data from api:
http://localhost:3000/tweets?q=coding&count=10
- Use `fetch()`
- Call function on load of js
- Console log response
This time you are building a dynamic url that will change based on the user's search input
- Call `getTwitterData()` function when a user clicks on search icon
- Use string literals to build out the url
- Console log response
- Call `buildTweets()` function from `getTwitterData()`
- Use List.map() to loop over the list of tweets
- Use string literals to replace html with the text from each tweet
- Replace html content inside `.tweets-list`
- Use `buildImages()` function
- Check if there is media using `.length`property to call `buildImages()` function
TODO(Together): Use moment.js to show the date of tweet
- Call `selectTrend()` function from list item click
- Get the inner text of list item
- Set the value of input search using the text
- Call `getTwitterData()` function
- Use `next-page-container` class
- border-radius: 20px; margin-top: 20px;
- Use arrow down font awesome icon
Here is how twitter pagination works