diff --git a/src/static/css/App.css b/src/static/css/App.css index abcdfce..d50914e 100644 --- a/src/static/css/App.css +++ b/src/static/css/App.css @@ -25,6 +25,7 @@ html, body { overflow-x: hidden; + scroll-behavior: smooth; } body { @@ -323,7 +324,7 @@ a { .col { width: calc(50% - 3rem); margin-bottom: 3em; - float: left; + float: left; } .rightCol { @@ -662,6 +663,40 @@ a { color: #db7e3b; } +.bookshelf { + width: 360px; + padding: 10px; + display: flex; + justify-content: space-around; + flex-wrap: wrap; + background-color: #a58a45; +} + +.book { + width: 90px; + display: inline-block; +} + +.book img { + display: block; + margin: auto; + width: 75px; + height: 112px; +} + +.book h4 { + font-size: x-small; + color: black; +} + +.bookReview { + margin-top: 3em; +} + +.bookcover { + width: 10em; +} + .timeitem { transition: .4s; overflow-y: clip; @@ -781,7 +816,7 @@ a { position: inherit; margin-right: inherit; } - + .footer { position: relative; width: 100%; diff --git a/src/static/json/books.json b/src/static/json/books.json new file mode 100644 index 0000000..c3ad24f --- /dev/null +++ b/src/static/json/books.json @@ -0,0 +1,13 @@ +{ + "selection": ["Freakonomics", "Zero To One", "The Accidental Superpower", "Courage is Calling"], + "books": { + "Freakonomics": { "filename": "freakonomics.jpeg" }, + "Disunited Nations": { "filename": "disunitedNations.jpeg" }, + "The Accidental Superpower": { "filename": "theAccidentalSuperpower.jpeg" }, + "Give Me a Break": { "filename": "giveMeABreak.jpeg" }, + "Zero To One": { "filename": "zeroToOne.jpeg" }, + "Courage is Calling": { "filename": "courageIsCalling.jpeg"}, + "On Grand Strategy": { "filename": "onGrandStrategy.jpeg"}, + "The Parasitic Mind": { "filename": "theParasiticMind.jpeg"} + } +} diff --git a/src/static/json/pages.json b/src/static/json/pages.json index cc087d8..e6696a5 100644 --- a/src/static/json/pages.json +++ b/src/static/json/pages.json @@ -16,5 +16,11 @@ "title": "Andrew Simonson - About Me", "description": "About Andrew Simonson", "canonical": "/about" + }, + "books": { + "template": "books.html", + "title": "Andrew Simonson - Bookshelf", + "description": "Some of the books I've read", + "canonical": "/books" } } diff --git a/src/static/photos/books/courageIsCalling.jpeg b/src/static/photos/books/courageIsCalling.jpeg new file mode 100644 index 0000000..1e63638 Binary files /dev/null and b/src/static/photos/books/courageIsCalling.jpeg differ diff --git a/src/static/photos/books/disunitedNations.jpeg b/src/static/photos/books/disunitedNations.jpeg new file mode 100644 index 0000000..bcfb01e Binary files /dev/null and b/src/static/photos/books/disunitedNations.jpeg differ diff --git a/src/static/photos/books/freakonomics.jpeg b/src/static/photos/books/freakonomics.jpeg new file mode 100644 index 0000000..a614d25 Binary files /dev/null and b/src/static/photos/books/freakonomics.jpeg differ diff --git a/src/static/photos/books/giveMeABreak.jpeg b/src/static/photos/books/giveMeABreak.jpeg new file mode 100644 index 0000000..9161636 Binary files /dev/null and b/src/static/photos/books/giveMeABreak.jpeg differ diff --git a/src/static/photos/books/onGrandStrategy.jpeg b/src/static/photos/books/onGrandStrategy.jpeg new file mode 100644 index 0000000..6742800 Binary files /dev/null and b/src/static/photos/books/onGrandStrategy.jpeg differ diff --git a/src/static/photos/books/theAccidentalSuperpower.jpeg b/src/static/photos/books/theAccidentalSuperpower.jpeg new file mode 100644 index 0000000..36edc20 Binary files /dev/null and b/src/static/photos/books/theAccidentalSuperpower.jpeg differ diff --git a/src/static/photos/books/theParasiticMind.jpeg b/src/static/photos/books/theParasiticMind.jpeg new file mode 100644 index 0000000..f2b4bc4 Binary files /dev/null and b/src/static/photos/books/theParasiticMind.jpeg differ diff --git a/src/static/photos/books/zeroToOne.jpeg b/src/static/photos/books/zeroToOne.jpeg new file mode 100644 index 0000000..3f2169f Binary files /dev/null and b/src/static/photos/books/zeroToOne.jpeg differ diff --git a/src/templates/books.html b/src/templates/books.html new file mode 100644 index 0000000..ef8f96b --- /dev/null +++ b/src/templates/books.html @@ -0,0 +1,22 @@ +{% block content %} +
+

These are my books lol

+

+ This page is under construction but I felt like at least publishing a list + of books even if they didn't have reviews on them yet +

+ {% for i in var.books.books %} +
+

{{i}}

+
+ {{i}} cover +

{{ var.books.books[i].review }}

+
+
+ {% endfor %} +
+{% endblock %} diff --git a/src/templates/home.html b/src/templates/home.html index 086a376..d833fe0 100644 --- a/src/templates/home.html +++ b/src/templates/home.html @@ -13,10 +13,13 @@ class="langstats" alt="Language stats" /> +
{% from 'partials/chess.html' import chess %} {{ chess('asimonson1125') }}
+
+ {% from 'partials/bookshelf.html' import bookshelf %} {{ bookshelf(var.books) }} diff --git a/src/templates/partials/bookshelf.html b/src/templates/partials/bookshelf.html new file mode 100644 index 0000000..59cd7a9 --- /dev/null +++ b/src/templates/partials/bookshelf.html @@ -0,0 +1,17 @@ +{% macro bookshelf(books) %} + +
+ {% for i in books.selection %} {% set book = books.books[i] %} + +
+ {{ i }} cover +

{{ i }}

+
+
+ {% endfor %} +
+ +{% endmacro %}