appscms-tools-theme 2.2.3 → 2.2.4

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.
data/assets/js/ads.js CHANGED
@@ -1,8 +1,8 @@
1
- ;(function (s, u, z, p) {
2
- ;(s.src = u), s.setAttribute('data-zone', z), p.appendChild(s)
3
- })(
4
- document.createElement('script'),
5
- 'https://inklinkor.com/tag.min.js',
6
- 5225477,
7
- document.body || document.documentElement
8
- )
1
+ ;(function (s, u, z, p) {
2
+ ;(s.src = u), s.setAttribute('data-zone', z), p.appendChild(s)
3
+ })(
4
+ document.createElement('script'),
5
+ 'https://inklinkor.com/tag.min.js',
6
+ 5225477,
7
+ document.body || document.documentElement
8
+ )
@@ -1,10 +1,10 @@
1
- ---
2
- ---
3
- function insertAfter(referenceNode, newNode) {
4
- referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling)
5
- }
6
- let themeContentBox = document.getElementById('theme-content-box')
7
- const div = document.createElement('div')
8
- const profitablecpmgateId = '{{site.profitablecpmgateId}}'
9
- div.setAttribute('id', `container-${profitablecpmgateId}`)
10
- insertAfter(themeContentBox, div)
1
+ ---
2
+ ---
3
+ function insertAfter(referenceNode, newNode) {
4
+ referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling)
5
+ }
6
+ let themeContentBox = document.getElementById('theme-content-box')
7
+ const div = document.createElement('div')
8
+ const profitablecpmgateId = '{{site.profitablecpmgateId}}'
9
+ div.setAttribute('id', `container-${profitablecpmgateId}`)
10
+ insertAfter(themeContentBox, div)
data/assets/js/frame.js CHANGED
@@ -19,7 +19,7 @@ let image = null
19
19
  const showLoader = () => {
20
20
  showLoading()
21
21
  }
22
- const closeLoader = () => { }
22
+ const closeLoader = () => {}
23
23
  const clickInput = (e) => {
24
24
  console.log(`#file-${e.dataset.index}`)
25
25
  document.querySelector(`#file-${e.dataset.index}`).click()
@@ -128,11 +128,6 @@ const drawImage = () => {
128
128
  if (item.shadowColor) {
129
129
  ctx.shadowColor = `${item.shadowColor}`
130
130
  }
131
- console.log(item)
132
- console.log((item.rotate * Math.PI) / 180)
133
- if (item.rotate) {
134
- ctx.rotate((item.rotate * Math.PI) / 180)
135
- }
136
131
  if (item.shadowOffsetX) {
137
132
  ctx.shadowOffsetX = 3
138
133
  }
@@ -142,15 +137,14 @@ const drawImage = () => {
142
137
  if (item.shadowBlur) {
143
138
  ctx.shadowBlur = 2
144
139
  }
140
+ ctx.rotate(-Math.PI / 2)
145
141
  ctx.textAlign = 'center'
146
142
  ctx.fillStyle = `${item.color}`
147
- ctx.save()
148
143
  ctx.fillText(
149
144
  document.querySelector(`#${item.id}`).value,
150
145
  item.x,
151
146
  item.y
152
147
  )
153
- ctx.restore()
154
148
  })
155
149
  }
156
150
  if (item.type === 'rectangle') {
@@ -1,56 +1,54 @@
1
- [
2
- {
3
- "name": "together_forever",
4
- "effectImagePath": "/assets/images/together_forever.png",
5
- "elements": [
6
- {
7
- "type": "image",
8
- "filter": "",
9
- "perspective": "",
10
- "height": 300,
11
- "width": 300,
12
- "x": 200,
13
- "y": 200,
14
- "id": "file-1"
15
- },
16
- {
17
- "label": "",
18
- "id": "text-1",
19
- "type": "text",
20
- "x": "100",
21
- "rotate": 0,
22
- "y": "100",
23
- "color": "red",
24
- "fontFamily": "Calligraphy",
25
- "fontPath": "/assets/fonts/Calligraphy.ttf",
26
- "fontWeight": "bold",
27
- "fontSize": 50
28
- },
29
- {
30
- "type": "image",
31
- "imagePath": "",
32
- "filter": "grayscale(100%)",
33
- "perspective": "",
34
- "rotate": 40,
35
- "height": 300,
36
- "width": 300,
37
- "x": 100,
38
- "y": 200,
39
- "id": "file-3"
40
- },
41
- {
42
- "label": "",
43
- "id": "text-2",
44
- "type": "text",
45
- "x": "200",
46
- "y": "200",
47
- "rotate": 40,
48
- "color": "red",
49
- "fontFamily": "Calligraphy",
50
- "fontPath": "/assets/fonts/Calligraphy.ttf",
51
- "fontWeight": "bold",
52
- "fontSize": 50
53
- }
54
- ]
55
- }
1
+ [
2
+ {
3
+ "name": "together_forever",
4
+ "effectImagePath": "/assets/images/together_forever.png",
5
+ "elements": [
6
+ {
7
+ "type": "image",
8
+ "filter": "",
9
+ "perspective": "",
10
+ "height": 300,
11
+ "width": 300,
12
+ "x": 200,
13
+ "y": 200,
14
+ "id": "file-1"
15
+ },
16
+ {
17
+ "label": "",
18
+ "id": "text-1",
19
+ "type": "text",
20
+ "x": "100",
21
+ "y": "100",
22
+ "color": "red",
23
+ "rotate": 40,
24
+ "fontFamily": "Calligraphy",
25
+ "fontPath": "/assets/fonts/Calligraphy.ttf",
26
+ "fontWeight": "bold",
27
+ "fontSize": 50
28
+ },
29
+ {
30
+ "type": "image",
31
+ "imagePath": "",
32
+ "filter": "grayscale(100%)",
33
+ "perspective": "",
34
+ "height": 300,
35
+ "width": 300,
36
+ "x": 100,
37
+ "y": 200,
38
+ "id": "file-3"
39
+ },
40
+ {
41
+ "label": "",
42
+ "id": "text-2",
43
+ "type": "text",
44
+ "x": "200",
45
+ "y": "200",
46
+ "color": "red",
47
+ "fontFamily": "Calligraphy",
48
+ "fontPath": "/assets/fonts/Calligraphy.ttf",
49
+ "fontWeight": "bold",
50
+ "fontSize": 50
51
+ }
52
+ ]
53
+ }
56
54
  ]
@@ -1,3 +1,4 @@
1
+ const opacity = document.querySelector("#opacity")
1
2
  const batchConversion = async (file, indexValue) => {
2
3
  return new Promise((resolve, reject) => {
3
4
  if (file) {
@@ -12,18 +13,9 @@ const batchConversion = async (file, indexValue) => {
12
13
  image.onload = () => {
13
14
  canvas.width = image.width
14
15
  canvas.height = image.height
15
- // counter.innerHTML = e.target.value + "%"
16
- let filters = document.querySelector('#applyFilter')
17
- if (filters.getAttribute('data-filter') === "opacity") {
18
- ctx.globalAlpha = filters.value
19
- ctx.drawImage(image, 0, 0, canvas.width, canvas.height)
20
- resolve([indexValue, canvas.toDataURL('image/png'), "image"])
21
- } else {
22
- ctx.filter = filters.getAttribute('data-filter') + '(' + filters.value + filters.getAttribute('data-scale') + ') '
23
- ctx.drawImage(image, 0, 0, canvas.width, canvas.height)
24
- resolve([indexValue, canvas.toDataURL('image/png'), "image"])
25
- }
26
-
16
+ ctx.globalAlpha = opacity.value
17
+ ctx.drawImage(image, 0, 0, canvas.width, canvas.height)
18
+ resolve([indexValue, canvas.toDataURL('image/png'), "image"])
27
19
  }
28
20
  image.src = e.target.result
29
21
  }
data/assets/js/theme.js CHANGED
@@ -1,11 +1,11 @@
1
- $(document).ready(function () {
2
- var safuiAlert = $('#safeui-alert')
3
- if (safuiAlert) {
4
- safuiAlert
5
- .first()
6
- .delay(10000)
7
- .slideUp(1000, function () {
8
- $(this).remove()
9
- })
10
- }
11
- })
1
+ $(document).ready(function () {
2
+ var safuiAlert = $('#safeui-alert')
3
+ if (safuiAlert) {
4
+ safuiAlert
5
+ .first()
6
+ .delay(10000)
7
+ .slideUp(1000, function () {
8
+ $(this).remove()
9
+ })
10
+ }
11
+ })
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.3
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - vivek-appscms
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-20 00:00:00.000000000 Z
11
+ date: 2022-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '12.0'
55
- description:
55
+ description:
56
56
  email:
57
57
  - vivek@appscms.com
58
58
  executables: []
@@ -2637,7 +2637,7 @@ homepage: https://github.com/Appscms-com/appscms-tools-theme
2637
2637
  licenses:
2638
2638
  - MIT
2639
2639
  metadata: {}
2640
- post_install_message:
2640
+ post_install_message:
2641
2641
  rdoc_options: []
2642
2642
  require_paths:
2643
2643
  - lib
@@ -2652,8 +2652,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2652
2652
  - !ruby/object:Gem::Version
2653
2653
  version: '0'
2654
2654
  requirements: []
2655
- rubygems_version: 3.1.2
2656
- signing_key:
2655
+ rubygems_version: 3.1.6
2656
+ signing_key:
2657
2657
  specification_version: 4
2658
2658
  summary: Appscms theme for all tools
2659
2659
  test_files: []