Skip to content

Commit 1d45135

Browse files
committed
new version
1 parent 02bf9fa commit 1d45135

File tree

15 files changed

+2898
-620
lines changed

15 files changed

+2898
-620
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ All notable changes to this project will be documented in this file.
66
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this
77
project adheres to [Semantic Versioning](http://semver.org/).
88

9+
## [0.1.3] - 2024-12-31
10+
### Added
11+
- Footnotes support.
12+
13+
### Changed
14+
- Use *A esmorga* as demo book.
15+
16+
### Fixed
17+
- H1 margin top.
18+
919
## [0.1.2] - 2024-12-25
1020
### Fixed
1121
- CSS compatibility for old browsers
@@ -18,6 +28,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
1828
## [0.1.0] - 2024-12-24
1929
First version
2030

31+
[0.1.3]: https://github.com/lumeland/theme-ebook/compare/v0.1.2...v0.1.3
2132
[0.1.2]: https://github.com/lumeland/theme-ebook/compare/v0.1.1...v0.1.2
2233
[0.1.1]: https://github.com/lumeland/theme-ebook/compare/v0.1.0...v0.1.1
2334
[0.1.0]: https://github.com/lumeland/theme-ebook/releases/tag/v0.1.0

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"imports": {
33
"lume/": "https://deno.land/x/[email protected]/",
4-
"lume/cms/": "https://cdn.jsdelivr.net/gh/lumeland/cms@v0.7.6/"
4+
"lume/cms/": "https://cdn.jsdelivr.net/gh/lumeland/cms@v0.8.0/"
55
},
66
"lock": false,
77
"tasks": {

plugins.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
Options as GoogleFontsOptions,
1010
} from "lume/plugins/google_fonts.ts";
1111
import toc from "https://deno.land/x/[email protected]/toc.ts";
12+
import footnotes from "https://deno.land/x/[email protected]/footnotes.ts";
1213
import { merge } from "lume/core/utils/object.ts";
1314

1415
import "lume/types.ts";
@@ -48,6 +49,7 @@ export default function (userOptions?: Options) {
4849
.use(toc({
4950
level: 1,
5051
}))
52+
.use(footnotes())
5153
.copy("scripts")
5254
.data("layout", "layouts/book.vto")
5355
.copy("img")

src/_data.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
lang: gl
22

3-
title: Follas novas
4-
description: Versos en Gallego
5-
author: Rosalía de Castro
3+
title: A esmorga
4+
description: Relato tráxico dunha destrutiva peripecia polos arrabaldos de Auria.
5+
author: Eduardo Blanco Amor
66
cover: /img/cover.jpg
77

88
metas:

src/_includes/css/book.css

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
}
2828
h1 {
2929
font-size: 2.5em;
30-
margin-top: var(--column-height);
30+
margin-top: calc(var(--column-height) / 5);
31+
break-before: always;
32+
break-inside: avoid;
3133
}
3234
h2 {
3335
font-size: 1.75em;
@@ -220,3 +222,54 @@
220222
}
221223
}
222224
}
225+
226+
.footnotes {
227+
font-size: 0.85em;
228+
229+
& > dl {
230+
margin: 0;
231+
232+
& > div {
233+
padding: 0.5em;
234+
235+
&:target {
236+
outline: 1px dashed var(--color-spot);
237+
}
238+
239+
& + div {
240+
margin-top: 0.5em;
241+
}
242+
}
243+
}
244+
245+
& dt {
246+
float: left;
247+
margin-right: 1em;
248+
font-weight: bold;
249+
250+
& a {
251+
text-decoration: none;
252+
color: var(--color-text);
253+
254+
&:hover {
255+
text-decoration: underline;
256+
}
257+
}
258+
}
259+
260+
& dd {
261+
margin: 0;
262+
padding-left: 2em;
263+
264+
& p {
265+
margin: 0.25em 0;
266+
}
267+
268+
& > :first-child {
269+
margin-top: 0;
270+
}
271+
& > :last-child {
272+
margin-bottom: 0;
273+
}
274+
}
275+
}

src/_includes/layouts/book.vto

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,19 @@
118118
119119
{{ content }}
120120
121+
{{ if it.footnotes.length }}
122+
<aside role="note" class="page footnotes">
123+
<dl>
124+
{{ for note of footnotes }}
125+
<div id="{{ note.id }}" class="footnote">
126+
<dt><a href="#{{ note.refId }}">{{ note.label }}</a></dt>
127+
<dd>{{ note.content }}</dd>
128+
</div>
129+
{{ /for }}
130+
</dl>
131+
</aside>
132+
{{ /if }}
133+
121134
{{ set nextPage = search.nextPage(url, "", "url") }}
122135
123136
{{ if nextPage }}

src/chapter1.md

Lines changed: 776 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)