Bar graph CSS

FossilOrigin-Name: 8902e070cb86527e0493582907c56d42e5bdb8a9ae07a0587bac700419e8d445
This commit is contained in:
me@ow.nekobit.net 2022-05-07 03:13:44 +00:00
parent 42134409ee
commit 8d8c26fee9
6 changed files with 42 additions and 4 deletions

View file

@ -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

32
dist/treebird20.css vendored
View file

@ -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 *
*************************************************/

View file

@ -25,7 +25,6 @@
// Pages
#include "../static/hashtag.chtml"
#include "../static/hashtag_page.chtml"
#include "../static/hashtag_statistics.chtml"
#define TAG_SIZE_INITIAL 12

3
static/bar.html Normal file
View file

@ -0,0 +1,3 @@
<div class="bar">
<div style="height: %d%%;"></div>
</div>

3
static/bar_graph.html Normal file
View file

@ -0,0 +1,3 @@
<div class="bar-graph">
%s
</div>

View file

@ -1 +0,0 @@
<div>[STATISTICS]</div>