Skip to content

Commit

Permalink
Implement a bookshelf (#2)
Browse files Browse the repository at this point in the history
* Implement a bookshelf
  • Loading branch information
drupol authored Apr 15, 2020
1 parent 14ea805 commit 4039936
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 3 deletions.
9 changes: 6 additions & 3 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
baseURL: 'https://not-a-number.io/'
languageCode: en-us
title: Not A Number
title: Not a Number
theme:
- hugo-theme-bootstrap4-blog
paginate: 10
Expand All @@ -17,6 +17,9 @@ menu:
- name: About
url: /about

- name: Bookshelf
url: /bookshelf

author:
name: "Pol Dellaiera"

Expand All @@ -30,8 +33,8 @@ params:
wordCount: true
hideAuthor: true
description: >-
Welcome to my repository of non-convergent suite of random letters.Here, you
may contemplate the variation of 26 letters and some other weird characters.
Welcome to my repository of non-convergent suite of random letters.
Here, you may contemplate the variation of 26 letters and some other weird characters.
header_visible: true
date_format: '02 Jan 2006 @ 15:04 MST'
sharingicons: true
Expand Down
7 changes: 7 additions & 0 deletions content/page/bookshelf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "Bookshelf"
description: In this part of the site, you will find the list of my favorite books from my bookshelf.
date: 2020-04-08T09:52:21+02:00
draft: false
layout: bookshelf
---
108 changes: 108 additions & 0 deletions data/books.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
- title: Structure and Interpretation of Computer Programs
isbn: "0262510871"
tags:
- functional programming
- lisp
- logic
- programming
- title: Types and programming languages
isbn: "0262162091"
purchase: 2020
tags:
- functional programming
- logic
- mathematics
- title: How to mock a mockingbird
isbn: "0192801422"
purchase: 2019
tags:
- logic
- puzzle
- title: Infinite powers
isbn: "1328879984"
purchase: 2019
tags:
- mathematics
- title: Théorie des graphes
isbn: "9782842251895"
purchase: 2018
tags:
- graph theory
- title: Théorème vivant
isbn: 9782246798828
purchase: 2014
tags:
- biography
- mathematics
- title: Le gorille invisible
isbn: "0307459667"
purchase: 2016
tags:
- perception
- thought and thinking
- memory
- title: Thinking, Fast and Slow
isbn: "9780141033570"
purchase: 2016
tags:
- intuition
- thought and thinking
- reasoning
- title: Les objects fractals
isbn: 2081246171
purchase: 2015
tags:
- geometry
- fractals
- title: Le choix du meilleur urinoir
isbn: "270119766X"
purchase: 2016
tags:
- mathematics
- title: La formule du savoir
isbn: "2759822605"
purchase: 2018
tags:
- statistics
- mathematics
- title: Nonlinear Dynamics and Chaos
isbn: "0813350840"
purchase: 2016
tags:
- mathematics
- title: The First Six Books of the Elements of Euclid
isbn: "3836544717"
purchase: 2017
- title: Calcul differentiel integral
isbn: "2729893407"
purchase: 2014
- title: Calcul differentiel integral
isbn: "2729893415"
purchase: 2014
- title: "How not to be wrong: The Power of Mathematical Thinking"
isbn: "0143127535"
purchase: 2017
- title: "Calculus: A complete course"
isbn: "0321549287"
purchase: 2014
- title: 17 équations qui ont changé le monde
isbn: "9782221133347"
purchase: 2014
- title: Dieu joue-t-il aux dés?
isbn: "2082112004"
purchase: 2014
- title: Le nombre d'or
isbn: "2020259168"
purchase: 2014
- title: Y a t-il un grand architecte dans l'Univers?
isbn: "2738131964"
purchase: 2014
- title: La relativité
isbn: "2228882542"
purchase: 2014
- title: Histoire des codes secrets
isbn: "2253150975"
purchase: 2014
- title: Einstein à la plage
isbn: "2100722239"
purchase: 2015
13 changes: 13 additions & 0 deletions layouts/page/bookshelf.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{ define "main" }}
<article>
<header class="text-justify">
<h1 itemprop="name headline">{{ .Title | markdownify }}</h1>
<p class="text-muted mb-2"><em>{{ .Params.description | markdownify }}</em></p>
</header>

{{ partial "books.html" . }}

</article>
{{ end }}


29 changes: 29 additions & 0 deletions layouts/partials/book.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<div class="card mb-3">
<div class="row no-gutters">
<div class="col-sm-4">
<img src="https://covers.openlibrary.org/b/isbn/{{ .isbn }}-M.jpg" alt="{{ .title }}" class="img-fluid"/>
</div>
<div class="col-sm-8">
<div class="card-body">
<div class="card-title"><h3>{{ .title }}</h3></div>
<dl class="row">
<dt class="col-sm-4">ISBN</dt>
<dd class="col-sm-8"><code>{{ .isbn }}</code></dd>
{{ if .purchase }}
<dt class="col-sm-4">Purchase date</dt>
<dd class="col-sm-8">{{ .purchase }}</dd>
{{ end }}
{{ if .tags }}
<dt class="col-sm-4">Tags</dt>
<dd class="col-sm-8">{{ delimit .tags ", " }}</dd>
{{ end }}
<dt class="col-sm-4">Link</dt>
<dd class="col-sm-8"><a href="https://openlibrary.org/search?q={{ .isbn }}">Link to OpenLibrary</a></dd>
</dl>
{{ if .description }}
<p>{{ .description | markdownify }}</p>
{{ end }}
</div>
</div>
</div>
</div>
3 changes: 3 additions & 0 deletions layouts/partials/books.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{ range $.Site.Data.books }}
{{ partial "book.html" . }}
{{ end }}

0 comments on commit 4039936

Please sign in to comment.