Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
subugoe
emo
TIDO
Commits
139220aa
Commit
139220aa
authored
Jun 18, 2021
by
schneider210
Browse files
feat: in- or decrease the fontsize in the text panel on click
parent
2b3d2218
Pipeline
#204510
passed with stages
in 4 minutes and 29 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/App.vue
View file @
139220aa
...
...
@@ -58,7 +58,7 @@ export default {
config
:
{},
contentTypes
:
[],
contentUrls
:
[],
fontsize
:
1
4
,
fontsize
:
1
,
imageurl
:
''
,
isCollection
:
false
,
item
:
{},
...
...
@@ -394,6 +394,7 @@ export default {
display
:
flex
;
flex
:
1
;
flex-direction
:
column
;
font-size
:
1em
;
overflow
:
hidden
;
}
...
...
src/components/content.vue
View file @
139220aa
...
...
@@ -80,7 +80,7 @@ export default {
},
fontsize
:
{
type
:
Number
,
default
:
()
=>
1
4
,
default
:
()
=>
1
,
},
manifests
:
{
type
:
Array
,
...
...
@@ -110,7 +110,7 @@ export default {
watch
:
{
fontsize
()
{
this
.
$refs
.
contentsize
.
style
.
fontSize
=
`
${
this
.
fontsize
}
px
`
;
this
.
$refs
.
contentsize
.
style
.
fontSize
=
`
${
this
.
fontsize
}
em
`
;
},
async
activeTab
(
url
)
{
const
data
=
await
this
.
request
(
url
,
'
text
'
);
...
...
@@ -134,7 +134,7 @@ export default {
},
mounted
()
{
this
.
$refs
.
contentsize
.
style
.
fontSize
=
`
${
this
.
fontsize
}
px
`
;
this
.
$refs
.
contentsize
.
style
.
fontSize
=
`
${
this
.
fontsize
}
em
`
;
this
.
$root
.
$on
(
'
update-sequence-index
'
,
(
index
)
=>
{
if
(
this
.
supportType
)
{
...
...
@@ -144,17 +144,21 @@ export default {
},
methods
:
{
decrease
()
{
const
min
=
8
;
const
min
=
0.875
;
let
textsize
=
this
.
fontsize
;
textsize
-=
textsize
>
min
?
1
:
0
;
textsize
-=
textsize
>
min
?
0.125
:
0
;
if
(
textsize
<
min
)
textsize
=
min
;
this
.
$root
.
$emit
(
'
update-fontsize
'
,
textsize
);
},
increase
()
{
const
max
=
32
;
const
max
=
1.5
;
let
textsize
=
this
.
fontsize
;
textsize
+=
textsize
<
max
?
1
:
0
;
textsize
+=
textsize
<
max
?
0.125
:
0
;
if
(
textsize
>
max
)
textsize
=
max
;
this
.
$root
.
$emit
(
'
update-fontsize
'
,
textsize
);
},
getSupport
(
support
)
{
...
...
src/index.template.html
View file @
139220aa
...
...
@@ -31,7 +31,7 @@
-->
<script
id=
"tido-config"
type=
"application/json"
>
{
"
entrypoint
"
:
""
,
"
entrypoint
"
:
"
https://ahikar-dev.sub.uni-goettingen.de/api/textapi/ahikar/syriac/collection.json
"
,
"
annotations
"
:
{
"
show
"
:
true
,
"
types
"
:
[
...
...
src/views/mainview.vue
View file @
139220aa
...
...
@@ -107,7 +107,7 @@ export default {
},
fontsize
:
{
type
:
Number
,
default
:
()
=>
1
4
,
default
:
()
=>
1
,
},
imageurl
:
{
type
:
String
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment