From 8d8c26fee9e783869d1fa90cb7b8d4510a67a8d0 Mon Sep 17 00:00:00 2001 From: "me@ow.nekobit.net" Date: Sat, 7 May 2022 03:13:44 +0000 Subject: [PATCH] Bar graph CSS FossilOrigin-Name: 8902e070cb86527e0493582907c56d42e5bdb8a9ae07a0587bac700419e8d445 --- Makefile | 6 ++++-- dist/treebird20.css | 32 ++++++++++++++++++++++++++++++++ src/hashtag.c | 1 - static/bar.html | 3 +++ static/bar_graph.html | 3 +++ static/hashtag_statistics.html | 1 - 6 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 static/bar.html create mode 100644 static/bar_graph.html delete mode 100644 static/hashtag_statistics.html diff --git a/Makefile b/Makefile index fec4ebd..8b7d107 100644 --- a/Makefile +++ b/Makefile @@ -106,8 +106,10 @@ $(PAGES_DIR)/hashtag.chtml: $(PAGES_DIR)/hashtag.html ./filec $< data_hashtag_html > $@ $(PAGES_DIR)/hashtag_page.chtml: $(PAGES_DIR)/hashtag_page.html ./filec $< data_hashtag_page_html > $@ -$(PAGES_DIR)/hashtag_statistics.chtml: $(PAGES_DIR)/hashtag_statistics.html - ./filec $< data_hashtag_statistics_html > $@ +$(PAGES_DIR)/bar_graph.chtml: $(PAGES_DIR)/bar_graph.html + ./filec $< data_bar_graph_html > $@ +$(PAGES_DIR)/bar.chtml: $(PAGES_DIR)/bar.html + ./filec $< data_bar_html > $@ $(MASTODONT_DIR): git clone $(MASTODONT_URL) || true diff --git a/dist/treebird20.css b/dist/treebird20.css index 56542b3..978a2ad 100644 --- a/dist/treebird20.css +++ b/dist/treebird20.css @@ -265,6 +265,38 @@ table.present th, table.present td background-color: yellow; } +.bar-graph +{ + background: linear-gradient(#fff, #f7f7f7); + display: flex; + flex-direction: row; + border: 1px solid #cacaca; + border-radius: 8px; + height: 100px; + margin: 4px; +} + +.bar +{ + flex-grow: 1; + border-radius: 8px; + background-color: #efefef; + border: 1px solid #cacaca; + margin: 4px; + overflow: hidden; + display: flex; + flex-direction: column-reverse; +} + +.bar div +{ + flex-grow: 1; + background: linear-gradient(#aa0000, #600000); + border-radius: 8px; + +} + + /************************************************* * BUTTONS * *************************************************/ diff --git a/src/hashtag.c b/src/hashtag.c index 1882d85..75d977d 100644 --- a/src/hashtag.c +++ b/src/hashtag.c @@ -25,7 +25,6 @@ // Pages #include "../static/hashtag.chtml" #include "../static/hashtag_page.chtml" -#include "../static/hashtag_statistics.chtml" #define TAG_SIZE_INITIAL 12 diff --git a/static/bar.html b/static/bar.html new file mode 100644 index 0000000..4159c47 --- /dev/null +++ b/static/bar.html @@ -0,0 +1,3 @@ +
+
+
diff --git a/static/bar_graph.html b/static/bar_graph.html new file mode 100644 index 0000000..b50d6e1 --- /dev/null +++ b/static/bar_graph.html @@ -0,0 +1,3 @@ +
+ %s +
diff --git a/static/hashtag_statistics.html b/static/hashtag_statistics.html deleted file mode 100644 index 3624a7b..0000000 --- a/static/hashtag_statistics.html +++ /dev/null @@ -1 +0,0 @@ -
[STATISTICS]