Skip to content
Merged
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
22 changes: 22 additions & 0 deletions assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,25 @@ html.dark blockquote {
margin-right: 30px;
}
}

/* book pages: cover beside the details, stacked on narrow screens */
.book {
display: flex;
gap: 2rem;
align-items: flex-start;
}
.book .book-cover {
width: 240px;
max-width: 100%;
margin: 0;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.book .book-info p:first-child {
margin-top: 0;
}
@media only screen and (max-width: 600px) {
.book {
flex-direction: column;
align-items: center;
}
}
7 changes: 6 additions & 1 deletion content/books/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
title: "Books"
draft: true
groupByYear: false
cascade:
showDate: false
showReadingTime: false
showWordCount: false
showAuthor: false
---

Books I'm writing, with a page each for samples, errata, and companion material.
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
---
title: "The Algorithmic Foundations of Music Theory"
draft: true
description: "Pitch, rhythm and harmony, from first principles."
layout: "book"
authors:
- "gilles"
---

A book in progress.
<div class="book">
<img class="book-cover" src="cover.png" alt="Cover of The Algorithmic Foundations of Music Theory, by Gilles Chehade">
<div class="book-info">

*Pitch, rhythm and harmony, from first principles.*

Published December 2026.

</div>
</div>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions layouts/books/book.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{{/* A book's landing page: the theme's list header and content, without
the "no articles" note, and a plain list of sub-pages when there are any. */}}
{{ define "main" }}
<header>
{{ if site.Params.list.showBreadcrumbs | default false }}
{{ partial "breadcrumbs.html" . }}
{{ end }}
<h1 class="mt-5 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
{{ .Title | emojify }}
</h1>
</header>

<section class="mt-6 prose max-w-full dark:prose-invert mb-10">
<div class="min-w-0 max-w-prose w-full">
{{ .Content }}
</div>

{{ with .Pages.ByWeight }}
<ul>
{{ range . }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}
</section>
{{ end }}
Loading