From 85beae6554834ea89089560b25c163669ea71459 Mon Sep 17 00:00:00 2001 From: msoliman3 Date: Thu, 3 Nov 2022 12:43:57 +0100 Subject: [PATCH 1/3] light/dark mode pt.3 --- dashboard_static/style/style.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dashboard_static/style/style.css b/dashboard_static/style/style.css index c580b0c..4207dbe 100644 --- a/dashboard_static/style/style.css +++ b/dashboard_static/style/style.css @@ -7,7 +7,9 @@ --column-color: #1E1E1E; --secondary: #1D9BF0; } - +body { + overflow: hidden; +} body, html, .container { width: 100%; height: 100%; @@ -195,6 +197,7 @@ body { .leftcol, .centercol, .rightcol, .searchcontainer, .popchart { background-color: var(--column-color); + overflow: hidden; } .rightcol { From a6e3a127619830d8c16fd0fb0075c04cf09a686a Mon Sep 17 00:00:00 2001 From: msoliman3 Date: Thu, 3 Nov 2022 14:23:49 +0100 Subject: [PATCH 2/3] twitter hour help me lol --- dashboard.py | 2 +- dashboard_static/js/code.js | 3 +++ dashboard_static/style/style.css | 21 ++++++++++++++++----- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/dashboard.py b/dashboard.py index fa975ac..7196e39 100644 --- a/dashboard.py +++ b/dashboard.py @@ -13,7 +13,7 @@ root_content_path = 'dashboard_static' # the action will be called with the context and the event @event('init') 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 # fire('sample', {'previous': 0.0}) diff --git a/dashboard_static/js/code.js b/dashboard_static/js/code.js index 43be3fd..91a3ed4 100644 --- a/dashboard_static/js/code.js +++ b/dashboard_static/js/code.js @@ -25,6 +25,8 @@ 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 = `
@@ -33,6 +35,7 @@ function tweetCell(tweet) {
${tweet.user.name} @${tweet.user.screen_name} +

${date.getHours()}:${date.getMinutes()}

${tweet.text}
diff --git a/dashboard_static/style/style.css b/dashboard_static/style/style.css index 3b04eee..691191b 100644 --- a/dashboard_static/style/style.css +++ b/dashboard_static/style/style.css @@ -7,9 +7,7 @@ --column-color: #1E1E1E; --secondary: #1D9BF0; } -body { - overflow: hidden; -} + body, html, .container { width: 100%; height: 100%; @@ -95,6 +93,7 @@ body { .tweet { display: flex; + gap: 10px; background-color: var(--tweet-color); border-radius: 16px; padding: 16px; @@ -112,6 +111,12 @@ body { padding-left: 16px; } +.tweet-name { + display: flex; + gap: 1.5%; + +} + .tweet-interactions { display: flex; margin-top: 8px; @@ -152,6 +157,13 @@ body { opacity: 0.8; } +.tweet-date { + color: var(--main-light); + text-decoration: none; + justify-self: flex-end; + opacity: 0.8; +} + .filters-search input { height: 28px; width: 100%; @@ -197,7 +209,6 @@ body { .leftcol, .centercol, .rightcol, .searchcontainer, .popchart { background-color: var(--column-color); - overflow: hidden; } .rightcol { @@ -280,4 +291,4 @@ body { .radius-bottom { border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; -} \ No newline at end of file +} From 71fea5aef9f7361727ceacc8f1a60dfdf53c742d Mon Sep 17 00:00:00 2001 From: Tim Wijma Date: Thu, 3 Nov 2022 14:37:31 +0100 Subject: [PATCH 3/3] flexbpox --- __pycache__/dashboard.cpython-310.pyc | Bin 1562 -> 1562 bytes dashboard_static/js/code.js | 8 +++++--- dashboard_static/style/style.css | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/__pycache__/dashboard.cpython-310.pyc b/__pycache__/dashboard.cpython-310.pyc index 8e88d6080d3215bc1a15d6c85dbf30afd3dd732c..52532bb389045f8607b3aac5917967b06d3703c8 100644 GIT binary patch delta 35 pcmbQmGmD2epO=@50SIaiCnp
- ${tweet.user.name} - @${tweet.user.screen_name} -

${date.getHours()}:${date.getMinutes()}

+ + ${date.getHours()}:${date.getMinutes()}
${tweet.text}
diff --git a/dashboard_static/style/style.css b/dashboard_static/style/style.css index 691191b..8115c53 100644 --- a/dashboard_static/style/style.css +++ b/dashboard_static/style/style.css @@ -109,12 +109,17 @@ body { .tweet-content { padding-left: 16px; + width: 100%; } .tweet-name { display: flex; gap: 1.5%; + justify-content: space-between; +} +.tweet-date { + align-self: flex-end; } .tweet-interactions {