From dafd01676ab9b7d7811a50e77fcc3b54459d17fd Mon Sep 17 00:00:00 2001 From: nntrn <17685332+nntrn@users.noreply.github.com> Date: Mon, 23 Sep 2024 20:06:06 -0500 Subject: [PATCH] layout changes --- _includes/docs.css | 8 +++++--- _includes/postlist.html | 22 +++++++++++----------- _includes/theme.css | 28 +++++++++++++--------------- _layouts/book.html | 2 +- _layouts/default.html | 5 +++-- _layouts/genre.html | 2 +- _pages/feed.html | 2 +- _pages/tags.html | 37 +++++++++++++------------------------ scripts/group.sh | 15 +++++++++++---- 9 files changed, 59 insertions(+), 62 deletions(-) diff --git a/_includes/docs.css b/_includes/docs.css index a60d7a2..9504505 100644 --- a/_includes/docs.css +++ b/_includes/docs.css @@ -1,8 +1,6 @@ aside{border-top:dotted 2px gray;padding-top:2rem} h2{margin:.5rem 0} -h3,h4,h5{margin-bottom:.25rem} -h3,h4,h5{margin-top:0} -h3{margin:0 0} +h3,h4,h5{margin:0 0} q:after{content:""} q:before{content:""} .bookmark q{white-space:pre-wrap} @@ -14,3 +12,7 @@ q:before{content:""} .toc a:hover{text-decoration:none;background:#eee} .toc a:hover:after{text-decoration:none;border:0;content:attr(title);position:absolute;right:1.5rem;background:#fff;padding:2px 4px;z-index:1;font-size:.8rem} .mark q{background:var(--bs-highlight-bg)} +.smaller{font-size:.9em} +.muted{color:#aaa} +.sans-serif{font-family:var(--bs-font-sans-serif)} +a{text-decoration-skip-ink:none} \ No newline at end of file diff --git a/_includes/postlist.html b/_includes/postlist.html index 53cd77c..dc42c3b 100644 --- a/_includes/postlist.html +++ b/_includes/postlist.html @@ -1,17 +1,17 @@ {%- assign pagetag = page.tags %} {%- assign books = site.data.books | where: 'tags', pagetag |sort: 'title' %} \ No newline at end of file diff --git a/_includes/theme.css b/_includes/theme.css index c0b5c5f..7bafa88 100644 --- a/_includes/theme.css +++ b/_includes/theme.css @@ -1,23 +1,21 @@ -root{ - --line-height:1.3 -} -[data-layout="monospace"]{ - --bs-body-font-family: courier,monospace; -} - -[data-layout="serif"]{ - --bs-body-font-family: times,serif; +[data-layout=monospace] { + font-family: courier, monospace; + line-height: 1.15; + font-size: 14px } -[data-layout="sans-serif"]{ - --bs-body-font-family: Helvetica Neue, Helvetica, Arial, sans-serif; +[data-layout=serif] { + font-family: times, serif; + line-height: 1.3; + font-size: 14px } -body{ - font-family: var(--bs-body-font-family); - line-height:1.2; +[data-layout=sans-serif] { + font-family: Helvetica Neue, Helvetica, Arial, sans-serif; + line-height: 1.3; + font-size: 14px } @media (min-width:900px){ -body > .container{max-width:80%;margin:0 auto} +body>.container{max-width:80%;margin:0 auto} } \ No newline at end of file diff --git a/_layouts/book.html b/_layouts/book.html index aba33e0..f91e341 100644 --- a/_layouts/book.html +++ b/_layouts/book.html @@ -30,7 +30,7 @@

{{chapter.name|replace:'
  • {{annotation.text}}
    - #{{annotation.id}} + #{{annotation.id}}
    diff --git a/_layouts/default.html b/_layouts/default.html index 5a64c64..3000fa4 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -32,10 +32,11 @@

    {{site.title}}

    -
    +
    {%- for link in site.links %} - {{link}} + {{link}} {%- endfor %} + github
    diff --git a/_layouts/genre.html b/_layouts/genre.html index be1d60b..51259b6 100644 --- a/_layouts/genre.html +++ b/_layouts/genre.html @@ -8,7 +8,7 @@

    #{{page.tag}}

      {%- for book in booklist %}
    • -

      {{book.title}} by {{book.author|split: ","|first}}

      +

      {{book.title}} by {{book.author|split: ","|first}}

      {{book.count}} annotation{% if book.count > 1 %}s{%- endif -%} diff --git a/_pages/feed.html b/_pages/feed.html index 094ebb8..9783b9e 100644 --- a/_pages/feed.html +++ b/_pages/feed.html @@ -16,7 +16,7 @@ {%- assign statcount = site.data.stats.bookmarks_per_month[books.name] %} -
      {{book.tags}} +
      {{book.tags}}

      {{book.title}}

      diff --git a/_pages/tags.html b/_pages/tags.html index 0b35eb8..a151477 100644 --- a/_pages/tags.html +++ b/_pages/tags.html @@ -18,32 +18,21 @@ {% assign genres = site.data.genres %}
      -{%- for genre in genres -%} +{%- for genre in genres %}

      {{genre.tag}}

      -
        - {%- assign books = genre.books %} - {%- for book in books -%} - {%- assign bookmodified = book.modified | date: "%b %Y" -%} -
      • -

        {{book.title}}

        - {{book.author}} -
        - {{ bookmodified }} - {%- comment -%} - {%- assign bookcreated = book.created | date: "%b %d" -%} - {%- assign bookmodified = book.modified | date: "%b %Y" -%} - {%- if bookmodified != bookcreated %} - - {{book.modified|date: '%b %-d %Y'}} - {%- endif -%} - {%- endcomment %} - - {{book.count}} -
        -
      • - {%- endfor -%} -
      +
        + {%- assign books = genre.books %} + {%- for book in books %} + {%- assign bookmodified = book.modified | date: "%b %Y" -%} + {%- assign bookcreated = book.created | date: "%b %Y" %} +
      1. + {{book.title}} + {{book.author}} + {{ bookmodified }} • {{book.count}} +
      2. + {%- endfor %} +
      {%- endfor -%}
      diff --git a/scripts/group.sh b/scripts/group.sh index 7b3648c..53b105c 100755 --- a/scripts/group.sh +++ b/scripts/group.sh @@ -43,13 +43,20 @@ permalink: /activity --- # Reading Activity - = started book ' jq -r --slurpfile books $DATADIR/books.json '($books[] | @@ -62,8 +69,8 @@ jq -r --slurpfile books $DATADIR/books.json '($books[] | | map(.date as $d2 | [ "* **\(.date)**" , "", - (.books | map(" - \(.count) annotation\(if .count > 1 then "s" else "" end) for [" + $asset[.assetid].title + "][\(.assetid)]" - + (if $asset[.assetid].cdate == $d2 then " " else "" end) )),""][] )|flatten|join("\n")) + (.books | map(" - [" + $asset[.assetid].title + "][\(.assetid)] - \(.count) annotation\(if .count > 1 then "s" else "" end)" + + (if $asset[.assetid].cdate == $d2 then " \n - **Started [\($asset[.assetid].title)][\(.assetid)]**" else "" end) )),""][] )|flatten|join("\n")) ]) | flatten(2) | join("\n\n") +"\n"' $HISTORYDATAPATH