layout |
---|
default |
<style> /* Add CSS styling for the book containers */ .book-container { border: none; /* Remove the bounding outline */ display: flex; flex-direction: column; align-items: center; /* Center the contents horizontally */ } .book-image { max-width: 100%; } .book-title { text-align: center; /* Center the title text */ margin-top: 10px; /* Add some top margin for spacing */ } .book-author { margin-top: auto; /* Push the author text to the bottom */ } </style>
{% assign count = site.books | size %}
{% assign total_highlights = 0 %} {% assign total_pages = 0 %} {% for book in site.books %} {% assign highlights_count = book.highlights | size %} {% assign total_highlights = total_highlights | plus: highlights_count %} {% assign total_pages = total_pages | plus: book.page_number %} {% endfor %}
{% assign start_date = '2004-05-12' | date: '%s' %} {% assign today = 'now' | date: '%s' %} {% assign secondsSince = today | minus: start_date %} {% assign daysSince = secondsSince | divided_by: 86400 %}
{% if daysSince > 0 %} {% assign pages_per_day_raw = total_pages | times: 1.0 | divided_by: daysSince %} {% assign pages_per_day = pages_per_day_raw | times: 100.0 | round: 0 | divided_by: 100.0 %} {% else %} {% assign pages_per_day = 0 %} {% endif %}
How I made this | 📖 Books: {{count}} | 💡 Total Highlights: {{total_highlights}} | 📚 Pages per Day (lifetime): {{pages_per_day}}
{{ book.authors | join: ', ' }}