Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Digital bookshelf #2735

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions _books/the_godfather.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
layout: book-review
title: The Godfather
author: Mario Puzo
cover: assets/img/book_covers/the_godfather.jpg
olid: OL43499941M # use Open Library ID to fetch cover (if no `cover` is provided)
isbn: 7539967447 # use ISBN to fetch cover (if no `olid` is provided, dashes are optional)
categories: classics crime historical-fiction mystery novels thriller
tags: top-100
buy_link: https://www.amazon.com/Godfather-Deluxe-Mario-Puzo/dp/0593542592
started: 2024-08-23
finished: 2024-09-07
released: 1969
stars: 5
goodreads_review: 6318556633
status: Finished
---

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras sollicitudin eros sit amet ante aliquet, sit amet vulputate lectus mattis. Aenean ullamcorper pretium nunc, sed egestas lorem elementum id. Nulla id mi id neque ultrices egestas ut in urna. Sed ac ultricies nunc. Nam convallis placerat urna id egestas. Nulla porta, est interdum vestibulum venenatis, lorem odio laoreet sapien, in pulvinar tellus eros a dolor. Vivamus sapien justo, ullamcorper a mi eget, scelerisque euismod nunc. In augue augue, ultrices a ornare non, tincidunt quis justo. Donec sit amet consectetur eros. Nullam neque leo, tincidunt id ipsum ac, volutpat lobortis mi. Phasellus consequat ultricies arcu, eu semper ligula ultrices eget. Ut in fringilla elit, ac tincidunt nisi.

Nunc commodo elit nec turpis feugiat consectetur. Nullam in nisi egestas, fermentum ligula hendrerit, euismod enim. Nulla eu hendrerit eros. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin et velit ante. Vestibulum pretium vitae quam et sagittis. Proin eu nunc vel velit accumsan eleifend. Nulla facilisis, diam tempus imperdiet ultrices, massa ipsum consequat orci, sed efficitur eros mi a felis. Cras lobortis turpis sem, sed lobortis nunc ullamcorper tristique. Nam vehicula rhoncus ante, in faucibus sapien scelerisque et. Donec semper libero et tincidunt mattis. In vestibulum, nulla pretium dictum commodo, risus nulla vestibulum felis, at tincidunt massa mi in odio. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.

Donec efficitur ultrices purus sit amet imperdiet. Nam consequat metus in erat sodales faucibus. Aliquam maximus fermentum nulla id finibus. Aliquam iaculis sed odio vel rutrum. Curabitur sed odio est. Praesent nec sollicitudin tortor. Praesent pharetra, turpis quis porttitor rhoncus, ante massa fringilla lacus, nec porttitor magna turpis vitae felis. Nullam tristique massa id odio imperdiet, nec sodales massa egestas. Proin nisi metus, euismod sed accumsan vitae, facilisis vel risus. Morbi suscipit auctor erat, nec viverra elit fringilla eu. Mauris congue, purus id tristique facilisis, felis nisi efficitur magna, eu consectetur augue sem vitae lacus. Aliquam erat volutpat. Cras at nibh ultricies, volutpat arcu vitae, dictum est. In ac dolor sagittis, egestas lectus et, semper nisl. Etiam consectetur purus vitae sapien porttitor auctor.

Nulla sit amet venenatis odio. Suspendisse ac lacus quis augue mollis tempus vel in lorem. Donec augue turpis, eleifend nec nibh eu, elementum dictum metus. Proin ut est ligula. Etiam vehicula facilisis metus, sit amet consectetur risus ullamcorper porttitor. In congue nibh quis sollicitudin iaculis. Donec a mollis lorem, non mollis lacus. Nulla et leo ex. Aliquam erat volutpat. Nam sit amet tincidunt mauris. Vivamus vitae est sit amet nisi semper egestas. Donec in diam pharetra, commodo diam vitae, imperdiet ligula. Cras iaculis ac diam eget vehicula. Proin suscipit ante enim, quis vehicula mi porta bibendum. Aliquam a diam porttitor, sollicitudin justo vitae, tempor odio.

Cras fermentum dignissim pretium. Donec quis turpis eu neque lacinia facilisis in sit amet nibh. Nulla non tortor ultricies, euismod est in, blandit nibh. Ut a neque metus. Sed convallis condimentum nibh quis finibus. Praesent aliquam sem iaculis eros maximus accumsan. Nulla venenatis mauris id aliquet maximus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin at enim vitae ex porttitor vestibulum sed eget nibh. Suspendisse accumsan feugiat quam eget ultricies.
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,14 @@ newsletter:
# -----------------------------------------------------------------------------

collections:
books:
output: true
news:
defaults:
layout: post
output: true
permalink: /:collection/:title/
projects:
output: true
permalink: /:collection/:title/

announcements:
enabled: true
Expand Down
246 changes: 246 additions & 0 deletions _layouts/book-review.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
---
layout: default
---
{% assign year = page.started | date: '%Y' %}
{% assign tags = page.tags | join: '' %}
{% assign categories = page.categories | join: '' %}

{% if page._styles %}
<!-- Page/Post style -->
<style type="text/css">
{{ page._styles }}
</style>
{% endif %}

<div class="post">
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
{% if page.author or page.released %}
<p class="post-meta">
{% if page.author %}
{{ page.author }}
{% endif %}
{% if page.author and page.released %} &nbsp;&middot;&nbsp; {% endif %}
{% if page.released %}
{{ page.released }}
{% endif %}
</p>
{% endif %}

{% if page.started or page.finished or page.stars %}
<p class="post-meta">
{% if page.started %}
<i class="fa-solid fa-play fa-sm" style="color: var(--global-tip-block) !important"></i> <em>{{ page.started }}</em>
{% endif %}
{% if page.finished %}
{% if page.started %}
&nbsp;&middot;&nbsp;
{% endif %}
<i class="fa-solid fa-stop fa-sm" style="color: #e56565 !important"></i> <em>{{ page.finished }}</em>
{% endif %}
{% if page.stars %}
{% if page.started or page.finished %}
&nbsp;&middot;&nbsp;
{% endif %}
{% if page.goodreads_review %}
<a target="_blank" href="https://www.goodreads.com/review/show/{{ page.goodreads_review }}"><i class="fa-brands fa-goodreads-g"></i>
{% endif %}
{% assign full_stars = page.stars | floor %}
{% assign half_star = page.stars | minus: full_stars %}
{% assign empty_stars = 5 | minus: full_stars %}
{% if half_star > 0 %}
{% assign empty_stars = empty_stars | minus: 1 %}
{% endif %}
{% for i in (1..full_stars) -%}
<i class="fa-solid fa-star fa-sm"></i>
{%- endfor -%}
{%- if half_star > 0 %}<i class="fa-solid fa-star-half-stroke fa-sm"></i>{% endif -%}
{%- for i in (1..empty_stars) -%}
<i class="fa-regular fa-star fa-sm"></i>
{%- endfor -%}
{% if page.goodreads_review %}
</a>
{% endif %}
{% endif %}
{% if page.buy_link %}
{% if page.started or page.finished or page.stars %}
&nbsp;&middot;&nbsp;
{% endif %}
<a target="_blank" href="{{ page.buy_link }}"><i class="fa-solid fa-cart-shopping"></i>
{% assign is_amazon_link = page.buy_link | slice: 0, 19 %}
{% if is_amazon_link == 'https://www.amazon.' %}
<i class="fa-brands fa-amazon"></i>
{% endif %}
</a>
{% endif %}
</p>
{% endif %}
<p class="post-tags">
<i class="fa-solid fa-calendar fa-sm"></i> {{ year }}
{% if tags != '' %}
&nbsp;&middot;&nbsp;
{% for tag in page.tags %}
<i class="fa-solid fa-hashtag fa-sm"></i> {{ tag }}
{% unless forloop.last %}
&nbsp;
{% endunless %}
{% endfor %}
{% endif %}

{% if categories != '' %}
&nbsp;&middot;&nbsp;
{% for category in page.categories %}
<i class="fa-solid fa-tag fa-sm"></i> {{ category }}
{% unless forloop.last %}
&nbsp;
{% endunless %}
{% endfor %}
{% endif %}
</p>
<hr>
</header>

<article>
{% if content == "" %}
<figure class="empty-review">
{% if page.cover %}
<img class ="empty-review-cover" alt="{{ page.title }} cover" src="{{ site.baseurl }}/{{ page.cover }}" />
<figcaption class="empty-review-caption">Cover of <em>{{ page.title }}</em></figcaption>
{% elsif page.olid %}
<img class ="empty-review-cover" alt="{{ page.title }} cover" src="http://covers.openlibrary.org/b/olid/{{ page.olid }}-L.jpg?default=false"/>
<figcaption class="empty-review-caption">Cover of <em>{{ page.title }}</em> on the <a href="https://openlibrary.org/olid/{{ page.olid }}">Open Library</a>.</figcaption>
{% elsif page.isbn %}
<img class ="empty-review-cover" alt="{{ page.title }} cover" src="http://covers.openlibrary.org/b/isbn/{{ page.isbn }}-L.jpg?default=false"/>
<figcaption class="empty-review-caption">Cover of <em>{{ page.title }}</em> on the <a href="https://openlibrary.org/isbn/{{ page.isbn }}">Open Library</a>.</figcaption>
{% endif %}
</figure>
{% assign status = page.status | upcase %}
<div class="clearfix">
<h4> {{status}} </h4>
</div>
{% else %}
<figure>
{% if page.cover %}
<img alt="{{ page.title }} cover" src="{{ site.baseurl }}/{{ page.cover }}" />
<figcaption>Cover of <em>{{ page.title }}</em></figcaption>
{% elsif page.olid %}
<img alt="{{ page.title }} cover" src="http://covers.openlibrary.org/b/olid/{{ page.olid }}-L.jpg?default=false"/>
<figcaption>Cover of <em>{{ page.title }}</em> on the <a href="https://openlibrary.org/olid/{{ page.olid }}">Open Library</a>.</figcaption>
{% elsif page.isbn %}
<img alt="{{ page.title }} cover" src="http://covers.openlibrary.org/b/isbn/{{ page.isbn }}-L.jpg?default=false"/>
<figcaption>Cover of <em>{{ page.title }}</em> on the <a href="https://openlibrary.org/isbn/{{ page.isbn }}">Open Library</a>.</figcaption>
{% endif %}
</figure>
<br class="mobile-break" clear="right"/>
<h4>
{% if page.start %} Start Date: {{page.start| date: "%-d %B %Y"}}. {% endif %}
{% if page.end %} End Date: {{page.end | date: "%-d %B %Y"}}. {% endif %}
</h4>
{{content}}
{% endif %}
</article>

{% if site.giscus and page.giscus_comments %}
{% include giscus.liquid %}
{% endif %}
</div>

<style>
figure {
float: none;
width: auto;
display: block;
margin-right: auto;
margin-left: auto;

}
figure > img {

vertical-align: top;
display: block;
margin-right: 0px;
margin-left: 0px;
padding: 0px;

}
figure figcaption {

display: block;
caption-side: bottom;
text-align: center;
}

@media screen and (min-width: 600px) {

.empty-review{
float: left;
display: block; /* in-line block; */
margin: 0px 0px 0px 0px; /* adjust as needed */
padding: 0px 0px 0px 20px;
/* top right bottom left */
}

.empty-review-caption {
caption-side: left;
text-align: left;


}

.empty-review-cover {
width:250px;
vertical-align: top;
padding-right: 40px;
}

figure {

float: right;
display: in-line block; /* in-line block; */
margin: 0px 0px 0px 0px; /* adjust as needed */
padding: 0px 0px 0px 20px;
/* top right bottom left */
}

figure img {
width:300px;
vertical-align: top;

}

figure figcaption {
caption-side: bottom;
text-align: left;

}

.mobile-break { display: none; }

/* =Blockquote
-------------------------------------------------------------- */
blockquote {

position: relative;
marign: 0px;
display: table;

}
blockquote:before, blockquote:after {

/* properties to format the block quotes /*

}
blockquote:before {
top: 0;
left: 0;


}
blockquote:after {
top: 0;
right: 0;

}


</style>
48 changes: 48 additions & 0 deletions _layouts/book-shelf.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
layout: page
---

{{ content }}

{% if page.collection and page.collection.size > 0 %}
{% assign collection = site[page.collection] %}
{% if collection and collection.size > 0 %}
{% for item in collection reversed %}
{% assign currentdate = item.date | date: "%Y" %}
{% if currentdate != date %}
{% unless forloop.first %}
</ul>
{% endunless %}
<h1 id="y{{item.date | date: "%Y"}}">{{ currentdate }}</h1>
<ul>
{% assign date = currentdate %}
{% endif %}

<figure class="cover">
<a class="cover-link" href="{{ item.url | relative_url }}">
{% if item.cover %}
<img alt="{{ item.title }} cover" src="{{ site.baseurl }}/{{ page.covers }}/{{ item.cover }}" style="height:200px" />
{% elsif item.olid %}
<img alt="{{ item.title }} cover" src="http://covers.openlibrary.org/b/olid/{{ item.olid }}-L.jpg?default=false" style="height:200px" />
{% elsif item.isbn %}
<img alt="{{ item.title }} cover" src="http://covers.openlibrary.org/b/isbn/{{ item.isbn }}-L.jpg?default=false" style="height:200px" />
{% endif %}
{% if item.status %}
{% assign statuses = "abandoned,finished,interested,paused,queued,reading,reread" | split: ',' %}
{% assign status = item.status | downcase | strip %}
{% if statuses contains status %}
<figcaption class="{{ status | downcase }}">{{ status | upcase }}</figcaption>
{% else %}
<figcaption class="uncategorized"> UNCATEGORIZED </figcaption>
{% endif %}
{% else %}
<figcaption class="uncategorized"> UNCATEGORIZED </figcaption>
{% endif %}
</a>
</figure>
{% if forloop.last %}
</ul>
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
3 changes: 1 addition & 2 deletions _layouts/post.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ layout: default
{% assign year = page.date | date: '%Y' %}
{% assign tags = page.tags | join: '' %}
{% assign categories = page.categories | join: '' %}
{% assign url_beginning = page.url | slice: 0, 6 %}

{% if page._styles %}
<!-- Page/Post style -->
Expand All @@ -12,8 +13,6 @@ layout: default
</style>
{% endif %}

{% assign url_beginning = page.url | slice: 0, 6 %}

<div class="post">
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
Expand Down
13 changes: 13 additions & 0 deletions _pages/books.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
layout: book-shelf
title: bookshelf
permalink: /books/
nav: false
collection: books
---

> What an astonishing thing a book is. It's a flat object made from a tree with flexible parts on which are imprinted lots of funny dark squiggles. But one glance at it and you're inside the mind of another person, maybe somebody dead for thousands of years. Across the millennia, an author is speaking clearly and silently inside your head, directly to you. Writing is perhaps the greatest of human inventions, binding together people who never knew each other, citizens of distant epochs. Books break the shackles of time. A book is proof that humans are capable of working magic.
>
> -- Carl Sagan, Cosmos, Part 11: The Persistence of Memory (1980)
## Books that I am reading, have read, or will read
7 changes: 2 additions & 5 deletions _pages/dropdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ nav: true
nav_order: 8
dropdown: true
children:
- title: publications
permalink: /publications/
- title: divider
- title: projects
permalink: /projects/
- title: bookshelf
permalink: /books/
- title: divider
- title: blog
permalink: /blog/
Expand Down
Loading
Loading