Skip to content

Commit

Permalink
/reading tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
brookback committed May 13, 2024
1 parent 2b2d95a commit 4779a00
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
8 changes: 7 additions & 1 deletion src/_includes/css/utils.css
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ TYPOGRAPHY

.Badge {
font-family: var(--sans);
border-radius: 4px;
border-radius: 5px;
font-weight: 550;
background-color: var(--neon);
color: var(--color-bg);
Expand All @@ -989,6 +989,12 @@ TYPOGRAPHY
&.Badge--warn {
background-color: var(--yellow);
}

&.Badge--outline {
background-color: transparent;
border: 2px solid var(--border-color);
color: var(--grey);
}
}

@media (max-width: 1215px) {
Expand Down
24 changes: 15 additions & 9 deletions src/reading.njk
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,26 @@ menu:
{{ book.author }}
</td>
<td>
<div class="prose f6">{{ book.notes | excerpt | md | safe }}</div>
{% if book.notes %}
<div class="prose f6">{{ book.notes | excerpt | md | safe }}</div>

{% if didExcerpt(book.notes) %}
<p class="f6 mb0">
<a class="muted" href="{{ '/reading' | url }}/{{book.slug}}/">Continued ⇢</a>
</p>
{% if didExcerpt(book.notes) %}
<p class="f6 mb0">
<a class="muted" href="{{ '/reading' | url }}/{{book.slug}}/">Continued ⇢</a>
</p>
{% endif %}
{% else %}
<br />
<br />
<br />
{% endif %}
</td>
<td class="f6 no-wrap {% if not book.finished %}align-middle{% endif %}" width="10%">
<td class="f6 no-wrap" width="10%">
{% if book.dropped %}
<span class="Badge Badge--muted">Dropped</span>
<span class="Badge Badge--outline">Dropped</span>
{% else %}
{% if book.paused %}
<span class="Badge Badge--warn">Paused</span>
<span class="Badge Badge--outline">Paused</span>
{% else %}
{% if book.finished %}
{% if book.finishedAt %}
Expand All @@ -63,7 +69,7 @@ menu:
<small class="font-sans muted" title="Finished in">{{ book.location }}</small>
{% endif %}
{% else %}
<span class="Badge Badge--positive">Reading</span>
<span class="Badge">Reading</span>
{% endif %}
{% endif %}
{% endif %}
Expand Down

0 comments on commit 4779a00

Please sign in to comment.