appscms-tools-theme 2.2.7 → 2.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/script.html +5 -1
- data/_layouts/frame.html +1 -1
- data/assets/css/frame.css +9 -0
- data/assets/js/frame.js +11 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e4be658111009450112257e2ea1e76a2e322292b16d675922e03620e3af6137
|
4
|
+
data.tar.gz: '092b8e9e9c34a9dc84ae4ee83940be478f2ecd652ab23011e34004d3dea3e490'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e3186c9f5ee05df8b2342fc569f84581724a7bbdeba9236284504e4ed0ba16e95a6c30edf57bb64474c3fab471bfe977ada83db7d0482dce576f4cc2fe5f584
|
7
|
+
data.tar.gz: 5605b4ef9808198fe1614a8084a6671a833160df7ded24d99dc95d4e06bc1f2be5197bb5b5550cecb6179d4b432262b77c24f15c9ad63d6b3523d2f16538d669
|
data/_includes/script.html
CHANGED
@@ -26,7 +26,11 @@ replace: "$tool", page.tool }}
|
|
26
26
|
{%- endfor -%}
|
27
27
|
{%- endif -%}
|
28
28
|
<script src="//cdnjs.cloudflare.com/ajax/libs/webfont/1.6.28/webfontloader.js" crossorigin="anonymous"></script>
|
29
|
-
|
29
|
+
{%- assign font = "Source Sans Pro" -%}
|
30
|
+
{%- if page.layout == "frame" -%}
|
31
|
+
{%- assign font = "PT Sans" -%}
|
32
|
+
{%- endif -%}
|
33
|
+
<script>WebFont.load({ google: { families: ['{{font}}:200,300,400,500,600,700,800&display=swap'] } })</script>
|
30
34
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"
|
31
35
|
integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w=="
|
32
36
|
crossorigin="anonymous" referrerpolicy="no-referrer" />
|
data/_layouts/frame.html
CHANGED
data/assets/css/frame.css
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
body {
|
2
|
+
font-family: 'PT Sans', sans-serif !important;
|
3
|
+
}
|
1
4
|
#img-svg {
|
2
5
|
margin: auto;
|
3
6
|
margin-top: 16px;
|
@@ -462,3 +465,9 @@ input {
|
|
462
465
|
font-size: 0.95em;
|
463
466
|
border-radius: 1px;
|
464
467
|
}
|
468
|
+
.categories-list .card {
|
469
|
+
padding: 7px 9px;
|
470
|
+
}
|
471
|
+
.categories-list .accordion > .card > .card-header {
|
472
|
+
height: auto;
|
473
|
+
}
|
data/assets/js/frame.js
CHANGED
@@ -117,6 +117,16 @@ const drawImage = () => {
|
|
117
117
|
myFont.load().then(function (font) {
|
118
118
|
ctx.save()
|
119
119
|
document.fonts.add(font)
|
120
|
+
let textValue = document.querySelector(`#${item.id}`).value
|
121
|
+
if (textValue.length > 10 && item.fontSizeOption1) {
|
122
|
+
item.fontSize = item.fontSizeOption1
|
123
|
+
}
|
124
|
+
if (textValue.length > 20 && item.fontSizeOption2) {
|
125
|
+
item.fontSize = item.fontSizeOption2
|
126
|
+
}
|
127
|
+
if (textValue.length > 30 && item.fontSizeOption3) {
|
128
|
+
item.fontSize = item.fontSizeOption3
|
129
|
+
}
|
120
130
|
ctx.font = `${item.fontSize}px ${item.font}`
|
121
131
|
if (item.shadowColor) {
|
122
132
|
ctx.shadowColor = `${item.shadowColor}`
|
@@ -136,11 +146,7 @@ const drawImage = () => {
|
|
136
146
|
}
|
137
147
|
ctx.textAlign = 'center'
|
138
148
|
ctx.fillStyle = `${item.color}`
|
139
|
-
ctx.fillText(
|
140
|
-
document.querySelector(`#${item.id}`).value,
|
141
|
-
item.x,
|
142
|
-
item.y
|
143
|
-
)
|
149
|
+
ctx.fillText(textValue, item.x, item.y)
|
144
150
|
ctx.restore()
|
145
151
|
})
|
146
152
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appscms-tools-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vivek-appscms
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|