Binary file not shown.
@@ -13,7 +13,7 @@ root_content_path = 'dashboard_static'
|
|||||||
# the action will be called with the context and the event
|
# the action will be called with the context and the event
|
||||||
@event('init')
|
@event('init')
|
||||||
def setup(ctx, e):
|
def setup(ctx, e):
|
||||||
start_offline_tweets('sports1.txt', event_name="tweet", time_factor=0.1)
|
start_offline_tweets('sports1.txt', event_name="tweet", time_factor=0.01)
|
||||||
ctx.count = 0
|
ctx.count = 0
|
||||||
# fire('sample', {'previous': 0.0})
|
# fire('sample', {'previous': 0.0})
|
||||||
|
|
||||||
|
|||||||
@@ -24,16 +24,19 @@ function showFeeds() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function tweetCell(tweet) {
|
function tweetCell(tweet) {
|
||||||
|
const date = new Date(tweet.created_at);
|
||||||
|
console.log(new Intl.DateTimeFormat('en-GB').format(date));
|
||||||
var cell = document.createElement("div");
|
var cell = document.createElement("div");
|
||||||
cell.innerHTML =
|
cell.innerHTML =
|
||||||
`<div class="tweet">
|
`<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>
|
<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-content">
|
||||||
<div class="tweet-name">
|
<div class="tweet-name">
|
||||||
<a class="tweet-nickname" href = "https://www.twitter.com/${tweet.user.screen_name}" target = "_blank">${tweet.user.name}</a>
|
<div>
|
||||||
<a class="tweet-username" href = "https://www.twitter.com/${tweet.user.screen_name}" target = "_blank">@${tweet.user.screen_name}</a>
|
<a class="tweet-nickname" href = "https://www.twitter.com/${tweet.user.screen_name}" target = "_blank">${tweet.user.name}</a>
|
||||||
<!-- add tweet date called created_at-->
|
<a class="tweet-username" href = "https://www.twitter.com/${tweet.user.screen_name}" target = "_blank">@${tweet.user.screen_name}</a>
|
||||||
<p class="tweet-date">${tweet.created_at}</p>
|
</div>
|
||||||
|
<span class="tweet-date"><em>${date.getHours()}:${date.getMinutes()}</em></span>
|
||||||
</div>
|
</div>
|
||||||
<span class="tweet-text">${tweet.text}</span>
|
<span class="tweet-text">${tweet.text}</span>
|
||||||
<div class="tweet-interactions">
|
<div class="tweet-interactions">
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ body {
|
|||||||
|
|
||||||
.tweet {
|
.tweet {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
background-color: var(--tweet-color);
|
background-color: var(--tweet-color);
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
@@ -108,6 +109,17 @@ body {
|
|||||||
|
|
||||||
.tweet-content {
|
.tweet-content {
|
||||||
padding-left: 16px;
|
padding-left: 16px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tweet-name {
|
||||||
|
display: flex;
|
||||||
|
gap: 1.5%;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tweet-date {
|
||||||
|
align-self: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tweet-interactions {
|
.tweet-interactions {
|
||||||
@@ -150,6 +162,13 @@ body {
|
|||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tweet-date {
|
||||||
|
color: var(--main-light);
|
||||||
|
text-decoration: none;
|
||||||
|
justify-self: flex-end;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
.filters-search input {
|
.filters-search input {
|
||||||
height: 28px;
|
height: 28px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -301,4 +320,4 @@ body {
|
|||||||
|
|
||||||
.current-sort {
|
.current-sort {
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user