bookish-press 0.4.35 → 0.4.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/chapter/Link.svelte +2 -2
- package/components/chapter/Quote.svelte +7 -10
- package/components/page/EditionLoader.svelte +2 -2
- package/components/page/Index.svelte +2 -2
- package/components/page/Outline.svelte +2 -2
- package/components/page/Search.svelte +1 -1
- package/components/page/TableOfContents.svelte +3 -4
- package/components/page/TableOfContentsRow.svelte +3 -2
- package/package.json +1 -1
|
@@ -40,13 +40,13 @@ function isInvalidChapterLink() {
|
|
|
40
40
|
<a href={'#' + url.split(':')[1]}><Text node={content} /></a>
|
|
41
41
|
{:else}
|
|
42
42
|
<!-- If it is specified, include the base relative chapter ID and the label -->
|
|
43
|
-
<a href={`${$base}
|
|
43
|
+
<a href={`${$base}/${url.split(':')[0]}#${url.split(':')[1]}`}
|
|
44
44
|
><Text node={content} /></a
|
|
45
45
|
>
|
|
46
46
|
{/if}
|
|
47
47
|
{:else}
|
|
48
48
|
<!-- If this is internal link, make a route link to the chapter. -->
|
|
49
|
-
<a href={`${$base}
|
|
49
|
+
<a href={`${$base}/${url}`}><Text node={content} /></a>
|
|
50
50
|
{/if}
|
|
51
51
|
|
|
52
52
|
<style>
|
|
@@ -9,16 +9,13 @@ $: credit = node.getCredit();
|
|
|
9
9
|
|
|
10
10
|
<Positioned position={node.getPosition()}>
|
|
11
11
|
<figure>
|
|
12
|
-
<blockquote class={'
|
|
12
|
+
<blockquote class={'quote'} data-nodeid={node.nodeID}>
|
|
13
13
|
{#each node.getBlocks() as element (element.nodeID)}
|
|
14
14
|
<Block node={element} />
|
|
15
15
|
{/each}
|
|
16
16
|
</blockquote>
|
|
17
17
|
{#if credit}
|
|
18
|
-
<figcaption
|
|
19
|
-
class="bookish-blockquote-caption {credit.isEmptyText()
|
|
20
|
-
? 'empty'
|
|
21
|
-
: ''}"
|
|
18
|
+
<figcaption class="caption {credit.isEmptyText() ? 'empty' : ''}"
|
|
22
19
|
><Format node={credit} placeholder="credit" /></figcaption
|
|
23
20
|
>
|
|
24
21
|
{/if}
|
|
@@ -26,7 +23,7 @@ $: credit = node.getCredit();
|
|
|
26
23
|
</Positioned>
|
|
27
24
|
|
|
28
25
|
<style>
|
|
29
|
-
.
|
|
26
|
+
.quote {
|
|
30
27
|
clear: both;
|
|
31
28
|
border: none;
|
|
32
29
|
font-family: var(--bookish-header-font-family);
|
|
@@ -40,12 +37,12 @@ $: credit = node.getCredit();
|
|
|
40
37
|
position: relative;
|
|
41
38
|
}
|
|
42
39
|
|
|
43
|
-
.
|
|
40
|
+
.quote > :global(p) {
|
|
44
41
|
margin: 0;
|
|
45
42
|
padding: 0;
|
|
46
43
|
}
|
|
47
44
|
|
|
48
|
-
.
|
|
45
|
+
.caption {
|
|
49
46
|
margin-top: 0.5em;
|
|
50
47
|
text-align: right;
|
|
51
48
|
font-family: var(--bookish-header-font-family);
|
|
@@ -53,7 +50,7 @@ $: credit = node.getCredit();
|
|
|
53
50
|
color: var(--bookish-muted-color);
|
|
54
51
|
}
|
|
55
52
|
|
|
56
|
-
.
|
|
53
|
+
.quote:before {
|
|
57
54
|
content: '\201C';
|
|
58
55
|
position: relative;
|
|
59
56
|
top: 80pt;
|
|
@@ -65,7 +62,7 @@ $: credit = node.getCredit();
|
|
|
65
62
|
z-index: -1;
|
|
66
63
|
}
|
|
67
64
|
|
|
68
|
-
.
|
|
65
|
+
.caption:not(.empty):before {
|
|
69
66
|
content: '--';
|
|
70
67
|
margin-right: 0.25em;
|
|
71
68
|
}
|
|
@@ -91,8 +91,8 @@ onDestroy(() => {
|
|
|
91
91
|
<Edition
|
|
92
92
|
edition={$edition}
|
|
93
93
|
base={write
|
|
94
|
-
? `/write/${$book.getRefID()}/${$edition.getEditionNumber()}
|
|
95
|
-
: `/${$book.getSubdomain() ?? $book.getRefID()}
|
|
94
|
+
? `/write/${$book.getRefID()}/${$edition.getEditionNumber()}`
|
|
95
|
+
: `/${$book.getSubdomain() ?? $book.getRefID()}`}
|
|
96
96
|
>
|
|
97
97
|
<slot />
|
|
98
98
|
</Edition>
|
|
@@ -81,7 +81,7 @@ $: {
|
|
|
81
81
|
<nav class="letters">
|
|
82
82
|
{#each 'abcdefghijklmnopqrstuvwxyz'.split('') as symbol, index}
|
|
83
83
|
{#if symbol in letters && letter !== symbol}
|
|
84
|
-
<Link to={$base
|
|
84
|
+
<Link to="{$base}/index/{symbol}">{symbol}</Link>
|
|
85
85
|
{:else if letter === symbol}
|
|
86
86
|
<strong
|
|
87
87
|
><span style="font-size: 200%">{symbol}</span
|
|
@@ -122,7 +122,7 @@ $: {
|
|
|
122
122
|
{/if}</ChapterNumber
|
|
123
123
|
>
|
|
124
124
|
<ChapterTitle
|
|
125
|
-
link={`${$base}
|
|
125
|
+
link={`${$base}/${chapterID}?word=${word}`}
|
|
126
126
|
>{$edition.getChapterName(
|
|
127
127
|
chapterID
|
|
128
128
|
)}</ChapterTitle
|
|
@@ -140,7 +140,7 @@ let darkLabel = '\u263E';
|
|
|
140
140
|
<div class="outline-headers">
|
|
141
141
|
<!-- Book navigation links -->
|
|
142
142
|
<div class="outline-header-nav">
|
|
143
|
-
{#if previous !== null}<Link to={$base
|
|
143
|
+
{#if previous !== null}<Link to="{$base}/{previous}">
|
|
144
144
|
>{previousLabel}</Link
|
|
145
145
|
>{:else}<span class="outline-header-nav-disabled"
|
|
146
146
|
>{previousLabel}</span
|
|
@@ -148,7 +148,7 @@ let darkLabel = '\u263E';
|
|
|
148
148
|
·
|
|
149
149
|
<Link to="{$base}/">Home</Link>
|
|
150
150
|
·
|
|
151
|
-
{#if next !== null}<Link to={$base
|
|
151
|
+
{#if next !== null}<Link to="{$base}/{next}">{nextLabel}</Link
|
|
152
152
|
>{:else}<span class="outline-header-nav-disabled"
|
|
153
153
|
>{nextLabel}</span
|
|
154
154
|
>{/if}
|
|
@@ -45,7 +45,7 @@ $: {
|
|
|
45
45
|
.toLowerCase()
|
|
46
46
|
.indexOf(lowerQuery);
|
|
47
47
|
results.push({
|
|
48
|
-
link: `${$base}
|
|
48
|
+
link: `${$base}/${chapter.getID()}?word=${match.match.toLowerCase()}&number=${index}`,
|
|
49
49
|
left: match.left +
|
|
50
50
|
match.match.substring(0, start),
|
|
51
51
|
match: match.match.substring(start, start + query.length),
|
|
@@ -119,9 +119,8 @@ function addChapter() {
|
|
|
119
119
|
<Description />
|
|
120
120
|
|
|
121
121
|
<Instructions {editable}>
|
|
122
|
-
This will appear on the <Link to={$base
|
|
123
|
-
|
|
124
|
-
> page and in your table of contents. Write an informative description
|
|
122
|
+
This will appear on the <Link to="{$base}/read">book browsing</Link>
|
|
123
|
+
page and in your table of contents. Write an informative description
|
|
125
124
|
of what your book is about.
|
|
126
125
|
</Instructions>
|
|
127
126
|
|
|
@@ -255,7 +254,7 @@ function addChapter() {
|
|
|
255
254
|
|
|
256
255
|
<PageParagraph>
|
|
257
256
|
Want to print this book or generate a PDF? See <Link
|
|
258
|
-
to={$base
|
|
257
|
+
to="{$base}/print">all chapters on a single page</Link
|
|
259
258
|
> and then print or export. Long books can take some time to render.
|
|
260
259
|
</PageParagraph>
|
|
261
260
|
|
|
@@ -53,8 +53,9 @@ function moveDown() {
|
|
|
53
53
|
<ChapterNumber>{'Chapter ' + number}</ChapterNumber>
|
|
54
54
|
{/if}
|
|
55
55
|
<ChapterTitle
|
|
56
|
-
link={forthcoming && !editable
|
|
57
|
-
|
|
56
|
+
link={forthcoming && !editable
|
|
57
|
+
? undefined
|
|
58
|
+
: `${$base}/${chapterID}`}>{title}</ChapterTitle
|
|
58
59
|
>
|
|
59
60
|
<p><Muted><em><slot name="annotation" /></em></Muted></p>
|
|
60
61
|
</td>
|