diff --git a/_includes/style.css b/_includes/style.css index 603e6ec..f140c7d 100644 --- a/_includes/style.css +++ b/_includes/style.css @@ -1,7 +1,3 @@ - - - - :root{--px-size:2.5%;--progress-size:13px} *{box-sizing:border-box} html{font-size:12px} @@ -9,7 +5,7 @@ html{font-size:12px} body{display:flex;flex-direction:column;gap:.25rem;scrollbar-width:thin;margin:0 0;padding:0 0;margin:auto;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:inherit;line-height:1.25;counter-reset:reversed(section);text-rendering:optimizeLegibility;overflow-y:hidden} date{margin-right:.5rem;text-transform:uppercase} header{padding:.85rem 0;position:sticky;top:0;z-index:100;background:#fff;border-bottom:1px solid #ccc} -footer{flex:1;/*! padding:2rem .1rem; */margin-top:1rem} +footer{flex:1;margin-top:1rem} header h1{padding-left:var(--px-size);padding-right:var(--px-size)} footer p{border-top:1px solid #aaa;padding-top:1rem;text-align:right} main{gap:2rem;position:relative;padding-left:var(--px-size);padding-right:var(--px-size);width:100%;scrollbar-width:thin;overflow-y:scroll;margin-bottom:0;display:block;padding:calc(1rem/2) var(--px-size);height:100%} @@ -38,15 +34,24 @@ ol{padding-left:0} ol li{list-style:none;padding-left:0} q:after,q:before{content:""} q{white-space:pre-wrap} -section{flex:10/} +section{flex:10} +small a{color:inherit;text-decoration:inherit} +small a:hover{opacity:.75} table{line-height:1.3;border-collapse:collapse;width:95%} -td,th{vertical-align:top;padding-top:.25rem;padding-bottom:.5rem} -td.flex{padding-left:.75rem} -td label{font-size:.95em} +td{vertical-align:top;margin-bottom:.5rem} +td,th{vertical-align:top} +td label{font-size:.9em} th date{white-space:pre;font-weight:400;color:#8e8e8e} -th{text-align:right;min-width:25%;padding-right:.5rem;border-right:1px solid #aaa} +th{border-right:1.5px dotted #222} +th[data-level="1"]{text-align:right;border:0;font-size:1.4em;white-space:pre;transition:all .6s linear;max-width:min-content} +th[data-level="2"]{text-align:right} td[colspan]{padding-left:20%} tr{line-height:1.2} +.align-right{text-align:right} +.total strong{color:#fff;background:#222;padding:0 2px;font-size:.9em;display:inline-flex;align-items:center;align-content:center} +.total th{visibility:hidden} +.total th{border-right:0} +.total td{padding-bottom:1rem;padding-top:.85rem} [colspan] h2{padding-top:1.5rem} .bookmark .meta{font-size:.9rem;color:#aaa;text-transform:uppercase;font-variant:proportional-nums} .bookmark a{text-decoration:none} @@ -62,17 +67,17 @@ tr{line-height:1.2} .content span{white-space:pre-wrap} .content ul{gap:1rem} .flex{display:flex} -.fw-500{font-weight:400 !important;} -.header{margin-top:1rem;margin-bottom:.5rem} +.fw-500{font-weight:400!important} .header a{color:inherit;text-decoration:none;text-transform:capitalize} .gap{gap:var(--gap,.25rem)} .list>li{padding:0 0} .mark q{background:#fff0b1;line-height:1.4} -.meta a:hover{text-decoration:none;/*! opacity: .8; */color:#222} -.meta a{/*! color:gray; */font-weight:700} +.meta a:hover{text-decoration:none;color:#222} +.meta a{font-weight:700} .meta a:hover{text-decoration:none;color:#36c} .meta a{color:#000;font-weight:700} .meta{margin-top:.25rem} +.padded{padding-left:.75rem;padding-right:.75rem} .chapters{flex:1} .toc{max-height:min(300px,40vh);position:sticky;top:0;list-style:none;padding:0 0;margin:0 0;z-index:1;width:20px;max-width:20px} .toc div{padding:0 0;font-size:.9em;position:relative} @@ -80,9 +85,9 @@ tr{line-height:1.2} .toc a{color:#222;white-space:pre;text-align:center;padding:0 4px;line-height:1} .toc a:hover{text-decoration:none;font-weight:700} .toc a:before{font-weight:500} -/* .toc div{height:calc((var(--length)/ var(--total)) * 100%)} */ .site-title a{text-decoration-color:rgba(0,0,0,.1);text-underline-offset:2px;text-decoration-thickness:1.75px;font-family:times;font-weight:700;font-size:.9em;text-decoration-skip-ink:all} [id]>a:hover:after{content:"#";color:#aaa} +aside ul{display:inline-flex;gap:.1rem;position:relative} @media (max-width:750px){ aside .container{min-height:20vh} main>.flex{display:flex;flex-direction:column-reverse} @@ -90,11 +95,4 @@ main>.flex{display:flex;flex-direction:column-reverse} aside ul{margin:1rem .5rem} ol{padding:0 2.5rem} ol li{list-style:unset;padding-left:unset} -} -aside ul {display:inline-flex;gap:.1rem;position:relative} -/* .progress{position:absolute;display:flex;width:var(--progress-size);height:var(--progress-size);min-width:var(--progress-size);max-width:var(--progress-size);min-height:var(--progress-size);max-height:var(--progress-size);justify-content:center;align-items:center;border-radius:50%;background:conic-gradient(#ccc var(--progress),#f2f2f2 0deg);font-size:0px!important;left:-15px} */ -/* .progress::after{content:"";display:flex;justify-content:center;flex-direction:column;width:60%;height:60%;border-radius:100%;background:#fff;font-size:0rem;text-align:center;margin:auto auto;left:0; right:0;position:absolute} */ - -.header th {padding-top:1rem;padding-bottom:1rem} - - \ No newline at end of file +} \ No newline at end of file diff --git a/index.md b/index.md index aa40cd2..df8e9e9 100644 --- a/index.md +++ b/index.md @@ -6,20 +6,23 @@ layout: default
{%- for books in books_by_date %} - {% assign count = 0 %} {%- assign list = books.items | sort: 'created' |reverse %} - + + + + + {%- for book in list %} - {% assign count = count | plus: book.count %} + {%- assign statcount = site.data.stats.bookmarks_per_month[books.name] %} - - {%- endfor %} - - - - + + + + - + {%- endfor -%}

{{books.name| replace: "-", " " |capitalize}}

{{books.name| replace: "-", " " |capitalize}}

started {{list.size}} books
- - {{book.tags}} +
+ + {{book.tags}}
+ {{book.title}}
Total: {{list.size}} books, {{count}} bookmarks
Summary:... and created {{statcount}} bookmarks

diff --git a/scripts/build-data.sh b/scripts/build-data.sh index 2a3a1bf..92c605e 100755 --- a/scripts/build-data.sh +++ b/scripts/build-data.sh @@ -65,6 +65,17 @@ create_word_data() { })' } +create_stats() { + mkdir -p $OUTDIR/stats + _log "Creating stats for monthly bookmarks" + cat $OUTDIR/activity.json | + jq 'sort_by(.created) + | map(. + {groupby_label: (.created|fromdate|strftime("%b %Y"))}) + | group_by(.groupby_label) + | map({key: .[0].groupby_label, value: length}) + | from_entries' >$OUTDIR/stats/bookmarks_per_month.json +} + while true; do case $1 in -o | --out) OUTDIR="$2" && shift ;; @@ -86,7 +97,9 @@ if [[ -s $ANNOTATIONS_FILE ]]; then create_book_data >$OUTDIR/books.json create_genre_data >$OUTDIR/genre.json create_activity_data >$OUTDIR/activity.json + create_stats else _log "annotations is empty" fi + # cat $ANNOTATIONS_FILE | jq -L $DIR -r 'include "books"; map({tag: get_tags(.ZGENRE)})' >$OUTDIR/tags.json