diff --git a/_includes/breadcrumb.html b/_includes/breadcrumb.html index 5df435a..51fb791 100644 --- a/_includes/breadcrumb.html +++ b/_includes/breadcrumb.html @@ -1,7 +1,7 @@ {%- assign crumbs = page.url | split: '/' -%} {%- for crumb in crumbs -%} {%- if forloop.last -%} - /{{crumb}} + /{{crumb|replace:".html",""}} {% elsif forloop.first %} home {%- else -%} diff --git a/_includes/docs.css b/_includes/docs.css index 35b0ac0..defe7af 100644 --- a/_includes/docs.css +++ b/_includes/docs.css @@ -28,6 +28,7 @@ a:hover{color:#222} .mark q{background:var(--bs-highlight-bg)} .muted{color:#656d76} .gray{color:#aaa} +.accent{color:rgba(var(--bs-primary-rgb),.5)} .sans-serif{font-family:var(--bs-font-sans-serif)} .serif{font-family:var(--bs-font-serif)} .pre{white-space:pre} diff --git a/_layouts/book.html b/_layouts/book.html index 3fa05f4..79cd996 100644 --- a/_layouts/book.html +++ b/_layouts/book.html @@ -15,6 +15,8 @@

{{page.author}}

{{annotations.size}} annotation{% if annotations.size > 1 %}s{%- endif -%} {{pagecreated}}{%- if pagemodified != pagecreated -%} – {{pagemodified}}{%- endif %} + + data
diff --git a/_layouts/default.html b/_layouts/default.html index 91078c8..bf5be11 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -30,8 +30,8 @@
-
-
+
+

{{site.title}}

{%- for link in site.links %} diff --git a/_layouts/genre.html b/_layouts/genre.html index b0cad55..5a7d6b8 100644 --- a/_layouts/genre.html +++ b/_layouts/genre.html @@ -7,11 +7,11 @@

{{page.tag|replace: "-"," "}}

    {%- for book in booklist %} -
  • +
  • {{book.title}} by {{book.author|split: ","|first}}

    - last read on -  /  - {{book.count}} annotation{% if book.count > 1 %}s{%- endif -%} + last read on +  /  + {{book.count}} annotation{% if book.count > 1 %}s{%- endif -%}
  • {%- endfor %}
diff --git a/scripts/books.jq b/scripts/books.jq index 5a9464c..1041f63 100644 --- a/scripts/books.jq +++ b/scripts/books.jq @@ -83,24 +83,25 @@ def identify_subsection: def getnum($str): $str | gsub("(?[^0-9])(?[0-9]+)";.w + " " + .n) - | [match("(\\b[0-9]+)";"g").string|tonumber]|last|tostring; + | [match("(\\b[0-9]+)";"g").string|tonumber]|first|tostring; def format_chapter: ([.]|flatten|unique) as $input | ($input | join(" ") - | gsub("x?[0-9]{8,}"; .n; "x")) as $str + | gsub("x?[0-9 ]{8,}"; ""; "x")) as $str | $str | - if test("[cC][chapter]{1,}") or test("^[cC].*([0-9]+)") then "Chapter " + getnum($str) + if test("[cC][chapter]{1,}";"i") then "Chapter " + getnum($input|map(select("^[cChapter]{2,}"))|first) elif test("toc_marker") then getnum($str) else $str | gsub("(epub|EPUB|[[:punct:]]?xhtml|html|ji[0-9]+|sup[0-9]+|nav_|div[0-9]+)"; "") | gsub("^[^a-zA-Z0-9]+";"") + # | if ($input[0]| test("^[cC][chapter]{1,}")) then "Chapter " + getnum($str) end ; def format_location: [match("\\[([^\\]]+)\\]+";"g").captures[].string] as $raw | ($raw|join(" ")|identify_subsection) as $sec - | (if $sec then $sec else ($raw|format_chapter) end) + | (if $sec then $sec else ($raw|first|format_chapter) end) ;