merged from main
This commit is contained in:
@@ -24,14 +24,19 @@ function showFeeds() {
|
||||
}
|
||||
|
||||
function tweetCell(tweet) {
|
||||
const date = new Date(tweet.created_at);
|
||||
console.log(new Intl.DateTimeFormat('en-GB').format(date));
|
||||
var cell = document.createElement("div");
|
||||
cell.innerHTML =
|
||||
`<div class="tweet">
|
||||
<a href ="https://www.twitter.com/${tweet.user.screen_name}"><img src="${tweet.user.profile_image_url}" onerror="this.src='media/logo.png';" class="tweet-profilepicture"></a>
|
||||
<div class="tweet-content">
|
||||
<div class="tweet-name">
|
||||
<a class="tweet-nickname" href = "https://www.twitter.com/${tweet.user.screen_name}" target = "_blank">${tweet.user.name}</a>
|
||||
<a class="tweet-username" href = "https://www.twitter.com/${tweet.user.screen_name}" target = "_blank">@${tweet.user.screen_name}</a>
|
||||
<div>
|
||||
<a class="tweet-nickname" href = "https://www.twitter.com/${tweet.user.screen_name}" target = "_blank">${tweet.user.name}</a>
|
||||
<a class="tweet-username" href = "https://www.twitter.com/${tweet.user.screen_name}" target = "_blank">@${tweet.user.screen_name}</a>
|
||||
</div>
|
||||
<span class="tweet-date"><em>${date.getHours()}:${date.getMinutes()}</em></span>
|
||||
</div>
|
||||
<span class="tweet-text">${tweet.text}</span>
|
||||
<div class="tweet-interactions">
|
||||
|
||||
@@ -38,15 +38,6 @@ $(window).on("load", function() {
|
||||
showFeeds()
|
||||
})
|
||||
|
||||
$(".sortby").on("click", function() {
|
||||
$(".sort-dropdown").toggle()
|
||||
// $(".sort-btn").toggleClass("radius-bottom")
|
||||
})
|
||||
|
||||
$(".sort-dropdown-list li").on("click", function() {
|
||||
$(".sort-dropdown").toggle()
|
||||
})
|
||||
|
||||
let root = document.querySelector(":root")
|
||||
|
||||
$(".logo").on("click", function() {
|
||||
@@ -89,6 +80,19 @@ $(window).on("filter", function() {
|
||||
}
|
||||
})
|
||||
|
||||
$(".current-sort").on("click", function() {
|
||||
$(".sort-dropdown-list li:not(:first-of-type)").toggle()
|
||||
})
|
||||
|
||||
$(".sort-btn").on("click", function() {
|
||||
$(".sort-dropdown-list li:not(:first-of-type)").toggle()
|
||||
})
|
||||
|
||||
$(".sort-dropdown-list li:not(:first-of-type)").on("click", function() {
|
||||
$(".sort-dropdown-list li:not(:first-of-type)").toggle()
|
||||
$(".current-sort").html($(this).html())
|
||||
})
|
||||
|
||||
|
||||
$(".order-btn").on("click", function() {
|
||||
if($(this).html() == "arrow_downward") { // Descending to ascending
|
||||
|
||||
Reference in New Issue
Block a user