-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
3,252 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
h2{margin:.5rem 0} | ||
h3,h4,h5{margin-bottom:.25rem} | ||
h3,h4,h5{margin-top:0} | ||
h3{margin:0 0} | ||
q:after{content:""} | ||
q:before{content:""} | ||
.bookmark q{white-space:pre-wrap} | ||
.clamp{display:-webkit-box!important;-webkit-line-clamp:var(--clamp-lines,1);-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis} | ||
.gap{gap:var(--gap)} | ||
.toc{max-height:min(300px,40vh);position:sticky;top:1rem;font-size:.9rem;z-index:1;width:20px;max-width:20px} | ||
.toc a{display:block;text-decoration:none;font-weight:400;white-space:pre;padding:0 4px;line-height:1;color:#222} | ||
.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)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
body{font-size:var(--font-size);font-family:var(--body-font);line-height:1.2} | ||
a{color:#0063c4;text-decoration-color:currentColor} | ||
a:hover{color:#5393da} | ||
aside ul{display:flex;flex-direction:column;gap:.5rem;width:80%} | ||
aside{padding:2rem 0} | ||
body{width:100%;height:100%;overflow-x:hidden;margin:0 0;padding:0 0;font-variant:proportional-nums;word-break:break-word} | ||
footer{padding:1rem 0} | ||
h2{margin:.5rem 0} | ||
h3,h4,h5{margin-bottom:.25rem} | ||
h3,h4,h5{margin-top:0} | ||
h3{margin:0 0} | ||
header{padding:1rem 0;margin-bottom:.5rem;background:#fff;position:sticky;top:0} | ||
hr{border:0;border-bottom:1px solid #aaa;box-shadow:0} | ||
q:after{content:""} | ||
q:before{content:""} | ||
table .small{font-family:sans-serif} | ||
table tr .padded{padding-bottom:var(--gap)} | ||
.acenter{align-content:center;align-items:center} | ||
.bookmark .meta{color:#a5a5a5;margin-top:.25rem} | ||
.bookmark .meta a:hover+span{color:#0063c4} | ||
.bookmark q{white-space:pre-wrap} | ||
.chapters{width:100%} | ||
.chapters ul[data-label]:before{font-size:1.35rem;content:attr(data-label);margin-top:1.5rem;font-family:times;font-weight:700;margin-left:-1.25rem} | ||
.clamp{display:-webkit-box!important;-webkit-line-clamp:var(--clamp-lines,1);-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis} | ||
.col{flex-direction:column} | ||
.column-reverse{flex-direction:column-reverse} | ||
.flex{display:flex} | ||
.gap{gap:var(--gap,1rem)} | ||
.mark q{background:#ff0} | ||
.muted{color:#9e9e9e} | ||
.my-0{margin-top:0;margin-bottom:0} | ||
.no-under{text-decoration:none!important} | ||
.sb{justify-content:space-between} | ||
.site-title{margin:0 0;font-size:1.5rem} | ||
.small{font-size:.85rem} | ||
.smaller{font-size:90%} | ||
.toc{max-height:min(300px,40vh);position:sticky;top:1rem;font-size:.9rem;z-index:1;width:20px;max-width:20px} | ||
.toc a{display:block;text-decoration:none;font-weight:400;white-space:pre;padding:0 4px;line-height:1;color:#222} | ||
.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} | ||
.up{text-transform:uppercase} | ||
.under,a,u{text-decoration-thickness:1.5px;text-decoration-skip-ink:none} | ||
.wrap{flex-wrap:wrap} | ||
[data-level]{padding-right:calc(var(--gap)*2);text-align:right} | ||
[data-level="1"] h2{font-family:sans-serif;text-transform:uppercase;margin-bottom:.5rem;white-space:pre} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
const $ = query => document.querySelector(query) | ||
const $$ = query => Array.from(document.querySelectorAll(query)) | ||
|
||
{% include scripts/font.js %} | ||
|
||
{% include scripts/theme.js %} | ||
{% include scripts/book.js %} | ||
|
||
window.addEventListener("load", function () { | ||
if (localStorage.getItem('font')) { | ||
setFont(localStorage.getItem('font')) | ||
if (localStorage.getItem('theme')) { | ||
setTheme(localStorage.getItem('theme')) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
function setTheme(theme) { | ||
const _theme = theme || $("select#theme").value || "monospace" | ||
$(`select#theme [name="${_theme}"]`).selected = true | ||
document.body.dataset.layout = _theme | ||
localStorage.setItem("theme", _theme) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
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="sans-serif"]{ | ||
--bs-body-font-family: Helvetica Neue, Helvetica, Arial, sans-serif; | ||
} | ||
|
||
body{ | ||
font-family: var(--bs-body-font-family); | ||
line-height:1.2; | ||
} | ||
|
||
@media (min-width:900px){ | ||
body > .container{max-width:80%;margin:0 auto} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
title: Feed | ||
layout: default | ||
permalink: /feed | ||
--- | ||
{% assign books_by_date = site.data.books|sort:'created'|reverse|group_by_exp:"item","item.created|date: '%b %Y'" -%} | ||
<section class="books"> | ||
<table> | ||
{%- for books in books_by_date %} | ||
{%- assign list = books.items|sort:'created'|reverse %} | ||
<tr> | ||
<th data-level="1"><h2 id="{{books.name|slugify:'latin'}}" class="my-0">{{books.name|replace:"-"," "|capitalize}}</h2></th> | ||
<td></td> | ||
</tr> | ||
{%- for book in list %} | ||
{%- assign statcount = site.data.stats.bookmarks_per_month[books.name] %} | ||
<tr data-genre="{{book.tags}}" data-created="{{book.created}}" data-author="{{book.author}}" data-count="{{book.count}}"> | ||
<th data-level="2" class="pb-3"> | ||
<time>{{book.created|date: '%F'}}</time><br><a class="small text-muted text-decoration-none" href="{{book.tags}}">{{book.tags}}</a> | ||
</th> | ||
<td class="pb-3"> | ||
<h4 class="h6"><a href="./{{book.tags}}/{{book.slug}}.html">{{book.title}}</a></h4> | ||
<div class="small">{{book.author|split: ","|first}} • <span class="text-muted">{{book.count}} annotation{% if book.count > 1 %}s{%- endif -%}</span></div> | ||
</td> | ||
</tr> | ||
{%- endfor %} | ||
<tr> | ||
<td></td> | ||
<td class="pt-2 small text-muted"> | ||
<span>started <strong>{{list.size}}</strong> book{% if list.size > 1 %}s{%- endif -%}</span> | ||
<span>/</span> | ||
<span>created <strong>{{statcount}}</strong> bookmark{% if statcount > 1 %}s{%- endif -%}</span> | ||
</td> | ||
</tr> | ||
<tr><td colspan="2"></td></tr> | ||
{%- endfor -%} | ||
</table> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
layout: default | ||
permalink: / | ||
--- | ||
|
||
<style> | ||
.pre{white-space:pre} | ||
.column-container{margin:auto;column-width:max(250px,20vw);column-fill:balance;gap:3rem;column-count:1} | ||
.column-group{page-break-inside:avoid;margin-bottom:1rem} | ||
h2{border-bottom:2px solid currentColor} | ||
h2>a{color:#222;text-decoration:none;font-weight:700} | ||
@media (min-width:650px){ | ||
.column-container{column-count:2} | ||
} | ||
@media (min-width:950px){ | ||
.column-container{column-count:3} | ||
} | ||
</style> | ||
{% assign genres = site.data.genres %} | ||
<div class="column-container"> | ||
{%- for genre in genres -%} | ||
<div class="column-group"> | ||
<h2 id="{{genre.tag}}" class="h5 text-uppercase"><a href="{{ site.baseurl }}/{{genre.tag}}" >{{genre.tag}}</a></h2> | ||
<ul class="posts d-flex flex-column gap-3 py-3 px-0" data-tag="{{genre.name}}"> | ||
{%- assign books = genre.books %} | ||
{%- for book in books -%} | ||
{%- assign bookmodified = book.modified | date: "%b %Y" -%} | ||
<li class="d-flex flex-column w-100" data-modified="{{book.modified|date: '%F' }}"> | ||
<h3 class="h6"><a href="{{ site.baseurl }}/{{genre.tag}}/{{book.slug}}">{{book.title}}</a></h3> | ||
<span class="clamp small">{{book.author}}</span> | ||
<div class="d-flex text-muted text-uppercase gap-1 small"> | ||
<span data-label="last read">{{ bookmodified }}</span> | ||
{%- comment -%} | ||
{%- assign bookcreated = book.created | date: "%b %d" -%} | ||
{%- assign bookmodified = book.modified | date: "%b %Y" -%} | ||
{%- if bookmodified != bookcreated %} | ||
<span>•</span> | ||
<span data-label="updated">{{book.modified|date: '%b %-d %Y'}}</span> | ||
{%- endif -%} | ||
{%- endcomment %} | ||
<span>•</span> | ||
<span class="pre">{{book.count}}</span> | ||
</div> | ||
</li> | ||
{%- endfor -%} | ||
</ul> | ||
</div> | ||
{%- endfor -%} | ||
</div> | ||
|
Oops, something went wrong.