From dbdf49995e25f2d925bdb6169e0e4afdb13e0b93 Mon Sep 17 00:00:00 2001 From: Brian Evans Date: Sat, 4 Nov 2023 16:07:27 +0000 Subject: [PATCH] Adjust column widths of events To try and reduce wasted space on infrequent streams Signed-off-by: Brian Evans --- client-pure/src/styles/events.scss | 197 +++++++++++++++-------------- server/package.json | 3 +- 2 files changed, 103 insertions(+), 97 deletions(-) diff --git a/client-pure/src/styles/events.scss b/client-pure/src/styles/events.scss index 8ac7fb0..3a8399f 100644 --- a/client-pure/src/styles/events.scss +++ b/client-pure/src/styles/events.scss @@ -1,128 +1,135 @@ -#events{ - display: grid; - grid-template-columns: repeat(9, 1fr); - gap: 10px; +#events { + display: grid; + // this is to reduce wasted space on columns that don't get (m)any events + grid-template-columns: 1fr 1fr 1fr 1fr 0.7fr 0.5fr 0.4fr 0.4fr 0.2fr; + gap: 10px; } -.event-column{ - display: grid; - justify-items: center; - align-content: start; - gap: 10px; -} -.event-column:nth-child(odd){ - //.stream-title{ - // background: #0001; - //} + +.event-column { + display: grid; + justify-items: center; + align-content: start; + gap: 10px; } -.events-container{ - display: flex; - flex-direction: column; - gap: 10px; - align-content: start; - justify-self: stretch; + +.events-container { + display: flex; + flex-direction: column; + gap: 10px; + align-content: start; + justify-self: stretch; } -.event-card{ - border-radius: 2px; - padding: 1rem; - font-size: smaller; - - h3{ - margin-top: 0; - } - .published-at{ - display: none; - } - code{ - //cursor: copy; - margin-right: 5px; - display: inline-flex; - gap: 4px; - align-items: center; - } - button{ - background-color: #0004; - border: 2px solid black; - font-family: 'JetBrains Mono', monospace; - cursor: copy; - display: inline-flex; - gap: 4px; - align-items: center; - } +.event-card { + border-radius: 2px; + padding: 1rem; + font-size: smaller; + + h3 { + margin-top: 0; + } + + .published-at { + display: none; + } + + code { + //cursor: copy; + margin-right: 5px; + display: inline-flex; + gap: 4px; + align-items: center; + } + + button { + background-color: #0004; + border: 2px solid black; + font-family: 'JetBrains Mono', monospace; + cursor: copy; + display: inline-flex; + gap: 4px; + align-items: center; + } } -.filings{ - background-color: #c7c7c7; - animation: none; +.filings { + background-color: #c7c7c7; + animation: none; } -.companies{ - background-color: #e0c88a; +.companies { + background-color: #e0c88a; } -.officers{ - background-color: #e9c069; +.officers { + background-color: #e9c069; } -.persons-with-significant-control{ - background-color: #c7ed8b; + +.persons-with-significant-control { + background-color: #c7ed8b; } -.charges{ - background-color: #b0cbe3; + +.charges { + background-color: #b0cbe3; } -.insolvency-cases{ - background-color: #e0acb5; + +.insolvency-cases { + background-color: #e0acb5; } -.disqualified-officers{ - background-color: #b15050; +.disqualified-officers { + background-color: #b15050; } -.stream-title{ - font-size: 1rem; +.stream-title { + font-size: 1rem; + margin: 0; + padding: 0.5rem; + background: #0001; + border-radius: 2px; + justify-self: stretch; + + h2 { + font-size: 1.1rem; margin: 0; - padding: 0.5rem; - background: #0001; - border-radius: 2px; - justify-self: stretch; + } - h2{ - font-size: 1.1rem; - margin: 0; - } + code { + font-size: 0.8rem; - code{ - font-size: 0.8rem; + } - } - .delay{ - font-size: 0.8rem; - } + .delay { + font-size: 0.8rem; + } } // animation for appearing cards @keyframes appear { - from{ - max-height: 0; - } - to{ - max-height: 15rem; - } + from { + max-height: 0; + } + to { + max-height: 15rem; + } } + @keyframes disappear { - from{ - opacity: 1; - } - to{ - opacity: 0; - } + from { + opacity: 1; + } + to { + opacity: 0; + } } -.event-card-container{ - overflow: hidden; - width: 100%; - animation: appear .4s ease-out, disappear 3s ease-in 12s; - position: relative; + +.event-card-container { + overflow: hidden; + width: 100%; + animation: appear .4s ease-out, disappear 3s ease-in 12s; + position: relative; } diff --git a/server/package.json b/server/package.json index b472342..ab0bd6d 100644 --- a/server/package.json +++ b/server/package.json @@ -6,9 +6,8 @@ "build": "tsc --build", "watch": "tsc --build --watch", "clean": "tsc --build --clean", - "status": "bun ../examples/testStreamStatus.ts", "stream-pub": "bun src/chStreamToRedis/streamToRedis.ts", - "stream-sub": "bun src/api/streamFromRedis.ts" + "stream-sub": "bun src/api/server.ts" }, "devDependencies": { "@types/node": "^20.8.7",