paginar 0.1.0 → 0.1.2
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/README.md +5 -5
- package/demo/slot/slot-chapter1.html +40 -5
- package/demo/slot/slot-chapter2.html +7 -0
- package/demo/slot/slot-chapter3.html +6 -0
- package/demo/summary/_content/1chapter.html +5 -5
- package/demo/summary/_content/2chapter.html +2 -2
- package/demo/summary/index.html +25 -1
- package/dist/index.es.js +470 -268
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +63 -46
- package/package.json +4 -2
- package/src/App.ce.vue +62 -52
- package/src/assets/main.css +279 -13
- package/src/components/BookContent.vue +23 -0
- package/src/components/EngineWrapper.vue +2 -10
- package/src/components/FooterSlot.vue +32 -0
- package/src/components/HeaderSlot/{HeaderSlot.ce.vue → HeaderSlot.vue} +30 -37
- package/src/components/HeaderSlot/OptionsButton/{OptionsButton.ce.vue → OptionsButton.vue} +7 -9
- package/src/components/HeaderSlot/OptionsButton/OptionsColor.vue +2 -2
- package/src/components/HeaderSlot/OptionsButton/OptionsColumns.vue +5 -5
- package/src/components/HeaderSlot/OptionsButton/OptionsFontFamily.vue +2 -2
- package/src/components/HeaderSlot/SummaryButton/{SummaryButton.ce.vue → SummaryButton.vue} +2 -7
- package/src/components/HeaderSlot/SummaryButton/SummaryDropdown.vue +30 -29
- package/src/components/{NavigationButton.ce.vue → NavigationButton.vue} +0 -0
- package/src/components/ReferencePopup.vue +31 -0
- package/src/composables/useFootnotes.js +27 -0
- package/src/composables/usePagination.js +9 -0
- package/src/composables/useReferences.js +63 -0
- package/src/composables/useTextContent.js +35 -4
- package/src/main.js +1 -3
- package/src/tailwind.css +63 -46
- package/src/components/FileContent.ce.vue +0 -20
- package/src/components/FooterSlot.ce.vue +0 -22
package/src/assets/main.css
CHANGED
|
@@ -1,22 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
.border-primary { border-color: var(--theme-primary, #690000); }
|
|
2
|
+
.text-primary { color: var(--theme-primary, #690000); }
|
|
3
|
+
.bg-primary { background-color: var(--theme-primary, #690000); }
|
|
4
|
+
|
|
5
|
+
.border-primary-extralight { border-color: var(--theme-primary-extralight, #f3f4f6); }
|
|
6
|
+
.text-primary-extralight { color: var(--theme-primary-extralight, #f3f4f6); }
|
|
7
|
+
.bg-primary-extralight { background-color: var(--theme-primary-extralight, #f3f4f6); }
|
|
8
|
+
|
|
9
|
+
.border-secondary { border-color: var(--theme-secondary, #ffa03c); }
|
|
10
|
+
.text-secondary { color: var(--theme-secondary, #ffa03c); }
|
|
11
|
+
.bg-secondary { background-color: var(--theme-secondary, #ffa03c); }
|
|
12
|
+
|
|
13
|
+
.rootWrapper {
|
|
14
|
+
max-height: 100%;
|
|
15
|
+
height: 100%;
|
|
4
16
|
}
|
|
5
17
|
|
|
6
|
-
#
|
|
7
|
-
height:
|
|
8
|
-
|
|
9
|
-
right: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
bottom: 0;
|
|
12
|
-
width: 100%;
|
|
18
|
+
main#rootComponent {
|
|
19
|
+
height: 100%;
|
|
20
|
+
max-height: 100%;
|
|
13
21
|
|
|
14
22
|
&.light {
|
|
15
|
-
background-color: #fff7e0
|
|
23
|
+
background-color: var(--bg-light-mode, #fff7e0)
|
|
16
24
|
}
|
|
17
25
|
|
|
18
26
|
&.dark {
|
|
19
|
-
background-color: #2d2d2d;
|
|
27
|
+
background-color: var(--bg-dark-mode, #2d2d2d);
|
|
20
28
|
|
|
21
29
|
#content-area {
|
|
22
30
|
color: #fff
|
|
@@ -24,6 +32,20 @@ header.wrapper {
|
|
|
24
32
|
}
|
|
25
33
|
}
|
|
26
34
|
|
|
35
|
+
header.wrapper {
|
|
36
|
+
width: 200px;
|
|
37
|
+
margin: 0 auto;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
#engine {
|
|
41
|
+
height: calc(100% - 8.4rem);
|
|
42
|
+
position: relative;
|
|
43
|
+
right: 0;
|
|
44
|
+
left: 0;
|
|
45
|
+
bottom: 0;
|
|
46
|
+
width: 100%;
|
|
47
|
+
}
|
|
48
|
+
|
|
27
49
|
#reader-component {
|
|
28
50
|
width: 100%;
|
|
29
51
|
}
|
|
@@ -33,7 +55,7 @@ header.wrapper {
|
|
|
33
55
|
}
|
|
34
56
|
|
|
35
57
|
.engineWrapper {
|
|
36
|
-
height:
|
|
58
|
+
height: 100%;
|
|
37
59
|
display: flex;
|
|
38
60
|
justify-content: space-between;
|
|
39
61
|
position: relative;
|
|
@@ -95,6 +117,250 @@ header.wrapper {
|
|
|
95
117
|
}
|
|
96
118
|
}
|
|
97
119
|
|
|
120
|
+
#content-area *::selection {
|
|
121
|
+
color: var(--theme-primary-extralight, #690000);
|
|
122
|
+
background: var(--theme-secondary, #ffa03c);
|
|
123
|
+
}
|
|
124
|
+
|
|
98
125
|
.viewer-nav-icon {
|
|
99
126
|
@apply opacity-0 md:opacity-80;
|
|
100
127
|
}
|
|
128
|
+
/* slider */
|
|
129
|
+
|
|
130
|
+
.slider-target,.slider-target *{
|
|
131
|
+
-webkit-touch-callout:none;
|
|
132
|
+
-webkit-tap-highlight-color:rgba(0,0,0,0);
|
|
133
|
+
box-sizing:border-box;
|
|
134
|
+
touch-action:none;
|
|
135
|
+
-webkit-user-select:none;
|
|
136
|
+
-moz-user-select:none;
|
|
137
|
+
user-select:none
|
|
138
|
+
}
|
|
139
|
+
.slider-target{
|
|
140
|
+
position:relative
|
|
141
|
+
}
|
|
142
|
+
.slider-base,.slider-connects{
|
|
143
|
+
height:100%;
|
|
144
|
+
position:relative;
|
|
145
|
+
width:100%;
|
|
146
|
+
z-index:1
|
|
147
|
+
}
|
|
148
|
+
.slider-connects{
|
|
149
|
+
overflow:hidden;
|
|
150
|
+
z-index:0
|
|
151
|
+
}
|
|
152
|
+
.slider-connect,.slider-origin{
|
|
153
|
+
height:100%;
|
|
154
|
+
position:absolute;
|
|
155
|
+
right:0;
|
|
156
|
+
top:0;
|
|
157
|
+
-ms-transform-origin:0 0;
|
|
158
|
+
-webkit-transform-origin:0 0;
|
|
159
|
+
transform-origin:0 0;
|
|
160
|
+
-webkit-transform-style:preserve-3d;
|
|
161
|
+
transform-style:flat;
|
|
162
|
+
width:100%;
|
|
163
|
+
will-change:transform;
|
|
164
|
+
z-index:1
|
|
165
|
+
}
|
|
166
|
+
.slider-txt-dir-rtl.slider-horizontal .slider-origin{
|
|
167
|
+
left:0;
|
|
168
|
+
right:auto
|
|
169
|
+
}
|
|
170
|
+
.slider-vertical .slider-origin{
|
|
171
|
+
top:-100%;
|
|
172
|
+
width:0
|
|
173
|
+
}
|
|
174
|
+
.slider-horizontal .slider-origin{
|
|
175
|
+
height:0
|
|
176
|
+
}
|
|
177
|
+
.slider-handle{
|
|
178
|
+
-webkit-backface-visibility:hidden;
|
|
179
|
+
backface-visibility:hidden;
|
|
180
|
+
position:absolute
|
|
181
|
+
}
|
|
182
|
+
.slider-touch-area{
|
|
183
|
+
height:100%;
|
|
184
|
+
width:100%
|
|
185
|
+
}
|
|
186
|
+
.slider-state-tap .slider-connect,.slider-state-tap .slider-origin{
|
|
187
|
+
transition:transform .3s
|
|
188
|
+
}
|
|
189
|
+
.slider-state-drag *{
|
|
190
|
+
cursor:inherit!important
|
|
191
|
+
}
|
|
192
|
+
.slider-tooltip-drag .slider-tooltip,.slider-tooltip-focus .slider-tooltip{
|
|
193
|
+
display:none!important
|
|
194
|
+
}
|
|
195
|
+
.slider-tooltip-drag .slider-active .slider-tooltip,.slider-tooltip-drag.slider-state-drag .slider-tooltip:not(.slider-tooltip-hidden),.slider-tooltip-focus.slider-focused .slider-tooltip:not(.slider-tooltip-hidden){
|
|
196
|
+
display:block!important
|
|
197
|
+
}
|
|
198
|
+
.slider-horizontal{
|
|
199
|
+
height:var(--slider-height,6px)
|
|
200
|
+
}
|
|
201
|
+
.slider-horizontal .slider-handle{
|
|
202
|
+
height:var(--slider-handle-height,16px);
|
|
203
|
+
right:calc(var(--slider-handle-width, 16px)/2*-1);
|
|
204
|
+
top:calc((var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2*-1 + -1px);
|
|
205
|
+
width:var(--slider-handle-width,16px)
|
|
206
|
+
}
|
|
207
|
+
.slider-vertical{
|
|
208
|
+
height:var(--slider-vertical-height,300px);
|
|
209
|
+
width:var(--slider-height,6px)
|
|
210
|
+
}
|
|
211
|
+
.slider-vertical .slider-handle{
|
|
212
|
+
bottom:calc(var(--slider-handle-width, 16px)/2*-1);
|
|
213
|
+
height:var(--slider-handle-width,16px);
|
|
214
|
+
right:calc((var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2*-1 + -1px);
|
|
215
|
+
width:var(--slider-handle-height,16px)
|
|
216
|
+
}
|
|
217
|
+
.slider-txt-dir-rtl.slider-horizontal .slider-handle{
|
|
218
|
+
left:calc(var(--slider-handle-width, 16px)/2*-1);
|
|
219
|
+
right:auto
|
|
220
|
+
}
|
|
221
|
+
.slider-base{
|
|
222
|
+
background-color:var(--slider-bg,#d1d5db)
|
|
223
|
+
}
|
|
224
|
+
.slider-base,.slider-connects{
|
|
225
|
+
border-radius:var(--slider-radius,9999px)
|
|
226
|
+
}
|
|
227
|
+
.slider-connect{
|
|
228
|
+
background:var(--theme-secondary, #690000);
|
|
229
|
+
cursor:pointer
|
|
230
|
+
}
|
|
231
|
+
.slider-draggable{
|
|
232
|
+
cursor:ew-resize
|
|
233
|
+
}
|
|
234
|
+
.slider-vertical .slider-draggable{
|
|
235
|
+
cursor:ns-resize
|
|
236
|
+
}
|
|
237
|
+
.slider-handle{
|
|
238
|
+
background:var(--slider-handle-bg,#fff);
|
|
239
|
+
border:var(--slider-handle-border,0);
|
|
240
|
+
border-radius:var(--slider-handle-radius,9999px);
|
|
241
|
+
box-shadow:var(--slider-handle-shadow,.5px .5px 2px 1px rgba(0,0,0,.32));
|
|
242
|
+
cursor:-webkit-grab;
|
|
243
|
+
cursor:grab;
|
|
244
|
+
height:var(--slider-handle-height,16px);
|
|
245
|
+
width:var(--slider-handle-width,16px)
|
|
246
|
+
}
|
|
247
|
+
.slider-handle:focus{
|
|
248
|
+
box-shadow:0 0 0 var(--slider-handle-ring-width,3px) var(--slider-handle-ring-color,rgba(16,185,129,.188)),var(--slider-handle-shadow,.5px .5px 2px 1px rgba(0,0,0,.32));
|
|
249
|
+
outline:none
|
|
250
|
+
}
|
|
251
|
+
.slider-active{
|
|
252
|
+
box-shadow:var(--slider-handle-shadow-active,.5px .5px 2px 1px rgba(0,0,0,.42));
|
|
253
|
+
cursor:-webkit-grabbing;
|
|
254
|
+
cursor:grabbing
|
|
255
|
+
}
|
|
256
|
+
[disabled] .slider-connect{
|
|
257
|
+
background:var(--slider-connect-bg-disabled,#9ca3af)
|
|
258
|
+
}
|
|
259
|
+
[disabled] .slider-handle,[disabled].slider-handle,[disabled].slider-target{
|
|
260
|
+
cursor:not-allowed
|
|
261
|
+
}
|
|
262
|
+
[disabled] .slider-tooltip{
|
|
263
|
+
background:var(--theme-secondary, #690000);
|
|
264
|
+
border-color:var(--theme-secondary, #690000);
|
|
265
|
+
opacity: 0.5;
|
|
266
|
+
}
|
|
267
|
+
.slider-tooltip{
|
|
268
|
+
background:var(--theme-secondary, #690000);
|
|
269
|
+
border:1px solid var(--theme-secondary, #690000);
|
|
270
|
+
border-radius:var(--slider-tooltip-radius,5px);
|
|
271
|
+
color:var(--slider-tooltip-color,#fff);
|
|
272
|
+
display:block;
|
|
273
|
+
font-size:var(--slider-tooltip-font-size,.875rem);
|
|
274
|
+
font-weight:var(--slider-tooltip-font-weight,600);
|
|
275
|
+
line-height:var(--slider-tooltip-line-height,1.25rem);
|
|
276
|
+
min-width:var(--slider-tooltip-min-width,20px);
|
|
277
|
+
padding:var(--slider-tooltip-py,2px) var(--slider-tooltip-px,6px);
|
|
278
|
+
position:absolute;
|
|
279
|
+
text-align:center;
|
|
280
|
+
white-space:nowrap
|
|
281
|
+
}
|
|
282
|
+
.slider-horizontal .slider-tooltip-top{
|
|
283
|
+
bottom:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));
|
|
284
|
+
left:50%;
|
|
285
|
+
transform:translate(-50%)
|
|
286
|
+
}
|
|
287
|
+
.slider-horizontal .slider-tooltip-top:before{
|
|
288
|
+
border:var(--slider-tooltip-arrow-size,5px) solid transparent;
|
|
289
|
+
border-top-color:inherit;
|
|
290
|
+
bottom:calc(var(--slider-tooltip-arrow-size, 5px)*-2);
|
|
291
|
+
content:"";
|
|
292
|
+
height:0;
|
|
293
|
+
left:50%;
|
|
294
|
+
position:absolute;
|
|
295
|
+
transform:translate(-50%);
|
|
296
|
+
width:0
|
|
297
|
+
}
|
|
298
|
+
.slider-horizontal .slider-tooltip-bottom{
|
|
299
|
+
left:50%;
|
|
300
|
+
top:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));
|
|
301
|
+
transform:translate(-50%)
|
|
302
|
+
}
|
|
303
|
+
.slider-horizontal .slider-tooltip-bottom:before{
|
|
304
|
+
border:var(--slider-tooltip-arrow-size,5px) solid transparent;
|
|
305
|
+
border-bottom-color:inherit;
|
|
306
|
+
content:"";
|
|
307
|
+
height:0;
|
|
308
|
+
left:50%;
|
|
309
|
+
position:absolute;
|
|
310
|
+
top:calc(var(--slider-tooltip-arrow-size, 5px)*-2);
|
|
311
|
+
transform:translate(-50%);
|
|
312
|
+
width:0
|
|
313
|
+
}
|
|
314
|
+
.slider-vertical .slider-tooltip-left{
|
|
315
|
+
right:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));
|
|
316
|
+
top:50%;
|
|
317
|
+
transform:translateY(-50%)
|
|
318
|
+
}
|
|
319
|
+
.slider-vertical .slider-tooltip-left:before{
|
|
320
|
+
border:var(--slider-tooltip-arrow-size,5px) solid transparent;
|
|
321
|
+
border-left-color:inherit;
|
|
322
|
+
content:"";
|
|
323
|
+
height:0;
|
|
324
|
+
position:absolute;
|
|
325
|
+
right:calc(var(--slider-tooltip-arrow-size, 5px)*-2);
|
|
326
|
+
top:50%;
|
|
327
|
+
transform:translateY(-50%);
|
|
328
|
+
width:0
|
|
329
|
+
}
|
|
330
|
+
.slider-vertical .slider-tooltip-right{
|
|
331
|
+
left:calc(var(--slider-handle-height, 16px) + var(--slider-tooltip-arrow-size, 5px) + var(--slider-tooltip-distance, 3px));
|
|
332
|
+
top:50%;
|
|
333
|
+
transform:translateY(-50%)
|
|
334
|
+
}
|
|
335
|
+
.slider-vertical .slider-tooltip-right:before{
|
|
336
|
+
border:var(--slider-tooltip-arrow-size,5px) solid transparent;
|
|
337
|
+
border-right-color:inherit;
|
|
338
|
+
content:"";
|
|
339
|
+
height:0;
|
|
340
|
+
left:calc(var(--slider-tooltip-arrow-size, 5px)*-2);
|
|
341
|
+
position:absolute;
|
|
342
|
+
top:50%;
|
|
343
|
+
transform:translateY(-50%);
|
|
344
|
+
width:0
|
|
345
|
+
}
|
|
346
|
+
.slider-horizontal .slider-origin>.slider-tooltip{
|
|
347
|
+
left:auto;
|
|
348
|
+
transform:translate(50%)
|
|
349
|
+
}
|
|
350
|
+
.slider-horizontal .slider-origin>.slider-tooltip-top{
|
|
351
|
+
bottom:calc(var(--slider-tooltip-arrow-size, 5px) + (var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2 + var(--slider-tooltip-distance, 3px) + 1px)
|
|
352
|
+
}
|
|
353
|
+
.slider-horizontal .slider-origin>.slider-tooltip-bottom{
|
|
354
|
+
top:calc(var(--slider-tooltip-arrow-size, 5px) + (var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2 + var(--slider-tooltip-distance, 3px) + var(--slider-height, 6px) - 1px)
|
|
355
|
+
}
|
|
356
|
+
.slider-vertical .slider-origin>.slider-tooltip{
|
|
357
|
+
top:auto;
|
|
358
|
+
transform:translateY(calc((var(--slider-tooltip-line-height, 1.25rem) - var(--slider-tooltip-py, 2px))*-1 + 1px))
|
|
359
|
+
}
|
|
360
|
+
.slider-vertical .slider-origin>.slider-tooltip-left{
|
|
361
|
+
right:calc(var(--slider-tooltip-arrow-size, 5px) + var(--slider-height, 6px) + (var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2 + var(--slider-tooltip-distance, 3px) - 1px)
|
|
362
|
+
}
|
|
363
|
+
.slider-vertical .slider-origin>.slider-tooltip-right{
|
|
364
|
+
left:calc(var(--slider-tooltip-arrow-size, 5px) + var(--slider-height, 6px) + (var(--slider-handle-height, 16px) - var(--slider-height, 6px))/2 + var(--slider-tooltip-distance, 3px) - var(--slider-height, 6px) + 1px)
|
|
365
|
+
}
|
|
366
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { defineProps, onMounted, ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
import useTextContent from '../composables/useTextContent'
|
|
5
|
+
const { content, initContent } = useTextContent
|
|
6
|
+
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
bookContent: String
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
const contentWrapper = ref(null)
|
|
12
|
+
|
|
13
|
+
onMounted(() => {
|
|
14
|
+
initContent(props.bookContent, contentWrapper)
|
|
15
|
+
})
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<div ref="contentWrapper">
|
|
20
|
+
<div v-if="content" v-html="content"></div>
|
|
21
|
+
<slot v-else name="content"></slot>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import NavigationButton from './NavigationButton.
|
|
3
|
-
|
|
2
|
+
import NavigationButton from './NavigationButton.vue'
|
|
4
3
|
import usePagination from '../composables/usePagination'
|
|
5
|
-
import useReaderSettings from '../composables/useReaderSettings'
|
|
6
|
-
|
|
7
4
|
const { next, prev } = usePagination
|
|
8
|
-
const { mode } = useReaderSettings
|
|
9
|
-
|
|
10
5
|
</script>
|
|
11
6
|
|
|
12
7
|
<template>
|
|
13
|
-
<div id="engine"
|
|
14
|
-
class="pt-10 transition-colors"
|
|
15
|
-
:class="mode"
|
|
16
|
-
>
|
|
8
|
+
<div id="engine" class="pt-10 transition-colors">
|
|
17
9
|
<div class="engineWrapper overflow-hidden">
|
|
18
10
|
<NavigationButton target="prev" @clicked="prev()" />
|
|
19
11
|
<slot></slot>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
import Slider from '@vueform/slider'
|
|
4
|
+
|
|
5
|
+
import usePagination from '../composables/usePagination';
|
|
6
|
+
const { totalPages, currentPage, set } = usePagination
|
|
7
|
+
|
|
8
|
+
function format() {
|
|
9
|
+
return `${currentPage.value} de ${totalPages.value}`
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div class="py-2 px-10 text-gray-700 dark:text-white">
|
|
16
|
+
<slot name="footer">
|
|
17
|
+
<p> </p>
|
|
18
|
+
</slot>
|
|
19
|
+
|
|
20
|
+
<Slider
|
|
21
|
+
:modelValue="currentPage"
|
|
22
|
+
@update:modelValue="set(Math.round($event))"
|
|
23
|
+
:min="1"
|
|
24
|
+
:max="totalPages"
|
|
25
|
+
:step="-1"
|
|
26
|
+
showTooltip="drag"
|
|
27
|
+
:format="format"
|
|
28
|
+
:lazy="false"
|
|
29
|
+
class="w-full"
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
@@ -1,37 +1,30 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import SummaryButton from './SummaryButton/SummaryButton.
|
|
3
|
-
import OptionsButton from './OptionsButton/OptionsButton.
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<template>
|
|
7
|
-
<div class="bg-
|
|
8
|
-
<summary-button>
|
|
9
|
-
<template #summaryTop>
|
|
10
|
-
<slot name="summaryTop" />
|
|
11
|
-
</template>
|
|
12
|
-
<template #summaryBottom>
|
|
13
|
-
<slot name="summaryBottom" />
|
|
14
|
-
</template>
|
|
15
|
-
</summary-button>
|
|
16
|
-
|
|
17
|
-
<div>
|
|
18
|
-
<slot name="header" />
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
<options-button>
|
|
22
|
-
<template #optionsTop>
|
|
23
|
-
<slot name="optionsTop" />
|
|
24
|
-
</template>
|
|
25
|
-
<template #optionsBottom>
|
|
26
|
-
<slot name="optionsBottom" />
|
|
27
|
-
</template>
|
|
28
|
-
</options-button>
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<style>
|
|
33
|
-
.headerSlot {
|
|
34
|
-
text-align: center;
|
|
35
|
-
border: 1px dashed #000;
|
|
36
|
-
}
|
|
37
|
-
</style>
|
|
1
|
+
<script setup>
|
|
2
|
+
import SummaryButton from './SummaryButton/SummaryButton.vue';
|
|
3
|
+
import OptionsButton from './OptionsButton/OptionsButton.vue';
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<template>
|
|
7
|
+
<div class="bg-primary flex justify-between items-center p-4">
|
|
8
|
+
<summary-button>
|
|
9
|
+
<template #summaryTop>
|
|
10
|
+
<slot name="summaryTop" />
|
|
11
|
+
</template>
|
|
12
|
+
<template #summaryBottom>
|
|
13
|
+
<slot name="summaryBottom" />
|
|
14
|
+
</template>
|
|
15
|
+
</summary-button>
|
|
16
|
+
|
|
17
|
+
<div>
|
|
18
|
+
<slot name="header" />
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<options-button>
|
|
22
|
+
<template #optionsTop>
|
|
23
|
+
<slot name="optionsTop" />
|
|
24
|
+
</template>
|
|
25
|
+
<template #optionsBottom>
|
|
26
|
+
<slot name="optionsBottom" />
|
|
27
|
+
</template>
|
|
28
|
+
</options-button>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
@@ -22,11 +22,10 @@ const { toggle: toggleFullScreen } = useFullscreen()
|
|
|
22
22
|
<template>
|
|
23
23
|
<div ref="button" class="relative">
|
|
24
24
|
<div class="flex">
|
|
25
|
-
<button @click.prevent="toggleSummary()"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}" id="summary-menu" aria-haspopup="true" :aria-expanded="show">
|
|
25
|
+
<button @click.prevent="toggleSummary()"
|
|
26
|
+
class="border p-3 shadow flex items-center border-white text-white"
|
|
27
|
+
id="summary-menu" aria-haspopup="true" :aria-expanded="show"
|
|
28
|
+
>
|
|
30
29
|
<span class="block mr-3">
|
|
31
30
|
Opções
|
|
32
31
|
</span>
|
|
@@ -35,10 +34,9 @@ const { toggle: toggleFullScreen } = useFullscreen()
|
|
|
35
34
|
<IconThreeDots v-else class="w-6 h-6" />
|
|
36
35
|
</button>
|
|
37
36
|
|
|
38
|
-
<button @click.prevent="toggleFullScreen()"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}">
|
|
37
|
+
<button @click.prevent="toggleFullScreen()"
|
|
38
|
+
class="hidden md:flex items-center border p-3 shadow ml-3 border-white text-white"
|
|
39
|
+
>
|
|
42
40
|
<IconExpand class="w-6 h-6" />
|
|
43
41
|
</button>
|
|
44
42
|
</div>
|
|
@@ -12,7 +12,7 @@ const { mode, setMode } = useReaderSettings
|
|
|
12
12
|
title="Leitura diurna"
|
|
13
13
|
class="font-light text-base border border-urucum w-full h-10 flex justify-center items-center"
|
|
14
14
|
:class="{
|
|
15
|
-
'bg-
|
|
15
|
+
'bg-primary-extralight text-gray-800 border-2 border-primary': mode === 'light'
|
|
16
16
|
}">
|
|
17
17
|
<IconSun class="w-5 h-5" />
|
|
18
18
|
</button>
|
|
@@ -21,7 +21,7 @@ const { mode, setMode } = useReaderSettings
|
|
|
21
21
|
title="Leitura noturna"
|
|
22
22
|
class="font-light text-base border border-urucum w-full h-10 flex justify-center items-center"
|
|
23
23
|
:class="{
|
|
24
|
-
'bg-
|
|
24
|
+
'bg-primary-extralight text-gray-800 border-2 border-primary': mode === 'dark'
|
|
25
25
|
}">
|
|
26
26
|
<IconMoon class="w-5 h-5" />
|
|
27
27
|
</button>
|
|
@@ -12,10 +12,10 @@ const { width } = useWindowSize()
|
|
|
12
12
|
<template>
|
|
13
13
|
<div class="w-full hidden md:grid grid-cols-3 gap-2 mt-3">
|
|
14
14
|
<button
|
|
15
|
-
class="col-span-1 text-center cursor-pointer py-3 rounded-sm border"
|
|
15
|
+
class="col-span-1 text-primary text-center cursor-pointer py-3 rounded-sm border"
|
|
16
16
|
:class="{
|
|
17
17
|
'border-gray-300': columns !== 'singleColumns',
|
|
18
|
-
'bg-
|
|
18
|
+
'bg-primary-extralight border-2 border-primary': columns === 'singleColumns'
|
|
19
19
|
}"
|
|
20
20
|
@click.prevent="setColumns('singleColumns')"
|
|
21
21
|
aria-label="Coluna única"
|
|
@@ -25,11 +25,11 @@ const { width } = useWindowSize()
|
|
|
25
25
|
</button>
|
|
26
26
|
|
|
27
27
|
<button
|
|
28
|
-
class="col-span-2 text-center cursor-pointer py-3 rounded-sm border"
|
|
28
|
+
class="col-span-2 text-primary text-center cursor-pointer py-3 rounded-sm border"
|
|
29
29
|
:class="{
|
|
30
30
|
'border-gray-300': columns !== 'doubleColumns',
|
|
31
|
-
'bg-
|
|
32
|
-
'opacity-30
|
|
31
|
+
'bg-primary-extralight border-2 border-primary': columns === 'doubleColumns',
|
|
32
|
+
'opacity-30': width < 1024
|
|
33
33
|
}"
|
|
34
34
|
@click.prevent="width >= 1024 && setColumns('doubleColumns')"
|
|
35
35
|
aria-label="Coluna dupla"
|
|
@@ -7,9 +7,9 @@ const { textFont, fontsOptions, setTextFont } = useReaderSettings
|
|
|
7
7
|
<template>
|
|
8
8
|
<div class="w-full grid grid-cols-4 gap-2 my-3">
|
|
9
9
|
<button v-for="font in fontsOptions" :key="font.name" @click.prevent="setTextFont(font.name)"
|
|
10
|
-
class="font-light text-lg tracking-wide border border-urucum w-full h-10 flex justify-center items-center"
|
|
10
|
+
class="font-light text-lg text-primary tracking-wide border border-urucum w-full h-10 flex justify-center items-center"
|
|
11
11
|
:class="{
|
|
12
|
-
'bg-
|
|
12
|
+
'bg-primary-extralight border-2 border-primary': textFont === font.name
|
|
13
13
|
}" :style="`font-family: ${font.name}`" :title="font.label ?? font.name">
|
|
14
14
|
Ff
|
|
15
15
|
</button>
|
|
@@ -22,19 +22,14 @@ onKeyStroke('Escape', () => hide())
|
|
|
22
22
|
<div class="flex">
|
|
23
23
|
<a href="/" title="Homepage"
|
|
24
24
|
class="hidden md:flex items-center border p-3 shadow mr-3
|
|
25
|
-
border-
|
|
25
|
+
border-white text-white"
|
|
26
26
|
>
|
|
27
27
|
<IconHome class="w-6 h-6"/>
|
|
28
28
|
</a>
|
|
29
29
|
|
|
30
30
|
<button
|
|
31
31
|
@click.prevent="toggleSummary()"
|
|
32
|
-
class="border p-3 shadow flex items-center"
|
|
33
|
-
:class="{
|
|
34
|
-
'border-white text-white': invertBackground || show,
|
|
35
|
-
'border-gray-800 text-gray-800 dark:border-white dark:text-white': !invertBackground && !show,
|
|
36
|
-
'bg-terra': show
|
|
37
|
-
}"
|
|
32
|
+
class="border p-3 shadow flex items-center border-white text-white"
|
|
38
33
|
id="summary-menu" aria-haspopup="true" :aria-expanded="show"
|
|
39
34
|
>
|
|
40
35
|
<IconSummary v-if="!show" />
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import useTextContent from '../../../composables/useTextContent'
|
|
3
|
-
import usePagination from '../../../composables/usePagination'
|
|
4
|
-
const { summary } = useTextContent
|
|
5
|
-
|
|
6
|
-
function getChapter(item) {
|
|
7
|
-
useTextContent.getContent(item.file)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</
|
|
1
|
+
<script setup>
|
|
2
|
+
import useTextContent from '../../../composables/useTextContent'
|
|
3
|
+
import usePagination from '../../../composables/usePagination'
|
|
4
|
+
const { summary } = useTextContent
|
|
5
|
+
|
|
6
|
+
async function getChapter(item) {
|
|
7
|
+
const text = await useTextContent.getContent(item.file)
|
|
8
|
+
useTextContent.applyContent(text)
|
|
9
|
+
usePagination.set(1)
|
|
10
|
+
}
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<div class="absolute top-14 py-4 px-3 shadow-lg w-60 md:w-104
|
|
15
|
+
text-areia -left-2 md:left-16 z-10 bg-white" :role="Sumário" aria-orientation="vertical"
|
|
16
|
+
aria-labelledby="summary-menu">
|
|
17
|
+
<nav>
|
|
18
|
+
<slot name="summaryTop" />
|
|
19
|
+
|
|
20
|
+
<component v-for="item in summary" :is="item.link ? 'a' : 'button'" :key="item.link"
|
|
21
|
+
:href="item.link" :title="`Navegar para capítulo ${item.title}`"
|
|
22
|
+
class="w-full text-left block text-black py-2 px-3 hover:bg-gray-100 rounded mb-2"
|
|
23
|
+
@click="item.file ? getChapter(item) : null">
|
|
24
|
+
{{ item.title }}
|
|
25
|
+
</component>
|
|
26
|
+
|
|
27
|
+
<slot name="summaryBottom" />
|
|
28
|
+
</nav>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
File without changes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { onKeyStroke } from '@vueuse/core'
|
|
3
|
+
import useReferences from '../composables/useReferences'
|
|
4
|
+
const { reference, setHighlightedReference } = useReferences
|
|
5
|
+
|
|
6
|
+
function closeRef() {
|
|
7
|
+
setHighlightedReference(null)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
onKeyStroke('Escape', () => {
|
|
11
|
+
setHighlightedReference(null)
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<transition enter-active-class="transition ease-out duration-200" enter-from-class="transform opacity-0 scale-95"
|
|
18
|
+
enter-to-class="transform opacity-100 scale-100" leave-active-class="transition ease-in duration-200"
|
|
19
|
+
leave-from-class="transform opacity-100 scale-100" leave-to-class="transform opacity-0 scale-95">
|
|
20
|
+
<div v-if="reference" tabindex="0" class="[ reference-popup ] bg-gray-800 text-white fixed z-40 bottom-0 md:bottom-14 right-0 md:right-3
|
|
21
|
+
rounded flex justify-between
|
|
22
|
+
p-4 shadow w-full md:w-2/5
|
|
23
|
+
">
|
|
24
|
+
<p class="w-4/5" v-html="reference.ref"></p>
|
|
25
|
+
|
|
26
|
+
<div class="mt-3 flex self-end">
|
|
27
|
+
<button @click.prevent="closeRef()" class="button button-negative">OK</button>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</transition>
|
|
31
|
+
</template>
|