@azuro-org/images-generator 2.0.2 → 2.0.3
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/dist/templates/trendle-trading/images/arnold.png +0 -0
- package/dist/templates/trendle-trading/images/bg.png +0 -0
- package/dist/templates/trendle-trading/images/crash.png +0 -0
- package/dist/templates/trendle-trading/images/drake.png +0 -0
- package/dist/templates/trendle-trading/images/elon-2.png +0 -0
- package/dist/templates/trendle-trading/images/elon.png +0 -0
- package/dist/templates/trendle-trading/images/lewis.png +0 -0
- package/dist/templates/trendle-trading/images/loss.png +0 -0
- package/dist/templates/trendle-trading/images/macron.png +0 -0
- package/dist/templates/trendle-trading/images/mark.png +0 -0
- package/dist/templates/trendle-trading/images/obama.png +0 -0
- package/dist/templates/trendle-trading/images/person-1.png +0 -0
- package/dist/templates/trendle-trading/images/person-2.png +0 -0
- package/dist/templates/trendle-trading/images/powell.png +0 -0
- package/dist/templates/trendle-trading/images/profit.png +0 -0
- package/dist/templates/trendle-trading/images/sydney.png +0 -0
- package/dist/templates/trendle-trading/images/taylor.png +0 -0
- package/dist/templates/trendle-trading/images/tramp-2.png +0 -0
- package/dist/templates/trendle-trading/images/tramp.png +0 -0
- package/dist/templates/trendle-trading/index.d.ts +3 -1
- package/dist/templates/trendle-trading/index.html +32 -40
- package/dist/templates/trendle-trading/index.js +13 -13
- package/lib/templates/trendle-trading/images/arnold.png +0 -0
- package/lib/templates/trendle-trading/images/bg.png +0 -0
- package/lib/templates/trendle-trading/images/crash.png +0 -0
- package/lib/templates/trendle-trading/images/drake.png +0 -0
- package/lib/templates/trendle-trading/images/elon-2.png +0 -0
- package/lib/templates/trendle-trading/images/elon.png +0 -0
- package/lib/templates/trendle-trading/images/lewis.png +0 -0
- package/lib/templates/trendle-trading/images/loss.png +0 -0
- package/lib/templates/trendle-trading/images/macron.png +0 -0
- package/lib/templates/trendle-trading/images/mark.png +0 -0
- package/lib/templates/trendle-trading/images/obama.png +0 -0
- package/lib/templates/trendle-trading/images/person-1.png +0 -0
- package/lib/templates/trendle-trading/images/person-2.png +0 -0
- package/lib/templates/trendle-trading/images/powell.png +0 -0
- package/lib/templates/trendle-trading/images/profit.png +0 -0
- package/lib/templates/trendle-trading/images/sydney.png +0 -0
- package/lib/templates/trendle-trading/images/taylor.png +0 -0
- package/lib/templates/trendle-trading/images/tramp-2.png +0 -0
- package/lib/templates/trendle-trading/images/tramp.png +0 -0
- package/lib/templates/trendle-trading/index.d.ts +3 -1
- package/lib/templates/trendle-trading/index.html +32 -40
- package/lib/templates/trendle-trading/index.js +12 -12
- package/package.json +1 -1
- package/dist/templates/trendle-trading/images/default.png +0 -0
- package/lib/templates/trendle-trading/images/default.png +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type Template } from '../../utils';
|
|
2
|
+
type Person = 'obama' | 'drake' | 'crash' | 'sydney' | 'tramp' | 'elon' | 'lewis' | 'mark' | 'powell' | 'macron' | 'arnold' | 'person-1' | 'tramp-2' | 'elon-2' | 'person-2' | 'taylor';
|
|
2
3
|
export type Props = {
|
|
4
|
+
type: Person;
|
|
3
5
|
trend: {
|
|
4
|
-
image: string
|
|
6
|
+
image: string;
|
|
5
7
|
title: string;
|
|
6
8
|
};
|
|
7
9
|
position: {
|
|
@@ -4,10 +4,8 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8">
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
8
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
7
|
<link
|
|
10
|
-
href="https://fonts.googleapis.com/css2?family=
|
|
8
|
+
href="https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&family=Mona+Sans:wdth,wght@75..125,700&display=swap"
|
|
11
9
|
rel="stylesheet">
|
|
12
10
|
<style>
|
|
13
11
|
html {
|
|
@@ -28,13 +26,6 @@
|
|
|
28
26
|
font-style: normal;
|
|
29
27
|
}
|
|
30
28
|
|
|
31
|
-
.geist-mono {
|
|
32
|
-
font-family: "Geist Mono", monospace;
|
|
33
|
-
font-optical-sizing: auto;
|
|
34
|
-
font-weight: 400;
|
|
35
|
-
font-style: normal;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
29
|
* {
|
|
39
30
|
box-sizing: border-box;
|
|
40
31
|
}
|
|
@@ -139,31 +130,22 @@
|
|
|
139
130
|
text-transform: uppercase;
|
|
140
131
|
}
|
|
141
132
|
|
|
142
|
-
.text-underline {
|
|
143
|
-
text-decoration: underline;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
133
|
.text-center {
|
|
147
134
|
text-align: center;
|
|
148
135
|
}
|
|
149
136
|
|
|
150
|
-
.text-bold {
|
|
151
|
-
font-weight: 700;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
137
|
.card {
|
|
155
138
|
background: --card-bg-color;
|
|
156
139
|
width: 1200px;
|
|
157
|
-
height:
|
|
158
|
-
padding:
|
|
140
|
+
height: 630px;
|
|
141
|
+
padding: 48px;
|
|
159
142
|
position: relative;
|
|
160
143
|
}
|
|
161
144
|
|
|
162
145
|
.logo {
|
|
163
|
-
height:
|
|
164
|
-
width:
|
|
146
|
+
height: 38px;
|
|
147
|
+
width: 266px;
|
|
165
148
|
display: block;
|
|
166
|
-
margin-right: 45px;
|
|
167
149
|
}
|
|
168
150
|
|
|
169
151
|
.trend {
|
|
@@ -253,28 +235,38 @@
|
|
|
253
235
|
.level-box {
|
|
254
236
|
margin-left: 125px;
|
|
255
237
|
}
|
|
256
|
-
|
|
257
|
-
.box {
|
|
258
|
-
background: #0F0F0F;
|
|
259
|
-
border-radius: 33px;
|
|
260
|
-
height: 100%;
|
|
261
|
-
width: fit-content;
|
|
262
|
-
padding: 30px 30px 55px;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.box-bottom {
|
|
266
|
-
margin-top: 30px;
|
|
267
|
-
}
|
|
268
238
|
</style>
|
|
269
239
|
</head>
|
|
270
240
|
|
|
271
241
|
<body>
|
|
272
242
|
<div class="card flex flex-col justify-between">
|
|
273
|
-
<img class="
|
|
274
|
-
<
|
|
275
|
-
<
|
|
276
|
-
|
|
277
|
-
|
|
243
|
+
<img class="bg-img" src={bgImg} alt="">
|
|
244
|
+
<img class="right-img" src={rightImg} alt="">
|
|
245
|
+
<img class="person-img" src={personImg} alt="">
|
|
246
|
+
<img src="{logo}" class="logo" alt="">
|
|
247
|
+
<div>
|
|
248
|
+
<div class="trend flex items-center">
|
|
249
|
+
<div class="trend__img flex items-center justify-center">
|
|
250
|
+
<img src="{trendImage}" alt="">
|
|
251
|
+
</div>
|
|
252
|
+
<div>
|
|
253
|
+
<div class="trend__title">{trendTitle}</div>
|
|
254
|
+
<div class="trend__badge">
|
|
255
|
+
<img class="arrow" src="{arrowImage}" alt="">
|
|
256
|
+
<span>{positionInfo}</span>
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
</div>
|
|
260
|
+
<div class="pnl">{pnl}%</div>
|
|
261
|
+
<div class="level-wrapper flex items-center">
|
|
262
|
+
<div>
|
|
263
|
+
<div class="level-title">Entry level:</div>
|
|
264
|
+
<div class="level-content">{openLevel}</div>
|
|
265
|
+
</div>
|
|
266
|
+
<div class="level-box {exitLevelClass}">
|
|
267
|
+
<div class="level-title">Exit level:</div>
|
|
268
|
+
<div class="level-content">{exitLevel}</div>
|
|
269
|
+
</div>
|
|
278
270
|
</div>
|
|
279
271
|
</div>
|
|
280
272
|
</div>
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {_ as __awaiter,a as __generator,
|
|
1
|
+
import {_ as __awaiter,a as __generator,g as getFile,b as getBase64Image,d as downloadImage}from'../../index-6ec143bc.js';import path from'path';import'fs';import'util';import'stream';import'http';import'https';import'url';import'crypto';import'http2';import'assert';import'tty';import'zlib';import'events';var cardTypes = {
|
|
2
2
|
'profit': {
|
|
3
|
+
rightImg: 'images/profit.png',
|
|
3
4
|
bgColor: '#72FF4B',
|
|
4
5
|
},
|
|
5
6
|
'loss': {
|
|
7
|
+
rightImg: 'images/loss.png',
|
|
6
8
|
bgColor: '#FF604B',
|
|
7
9
|
}
|
|
8
10
|
};
|
|
@@ -11,32 +13,30 @@ var template = {
|
|
|
11
13
|
height: 630,
|
|
12
14
|
type: 'jpeg',
|
|
13
15
|
html: function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
14
|
-
var trend, pnl, position, isProfit, bgColor, leverage, isLong, openLevel, exitLevel, html, logo, arrowImage, trendImage,
|
|
16
|
+
var type, trend, pnl, position, isProfit, _a, rightImg, bgColor, leverage, isLong, openLevel, exitLevel, html, logo, bgImage, rightImage, personImage, arrowImage, trendImage, positionInfo;
|
|
15
17
|
return __generator(this, function (_b) {
|
|
16
18
|
switch (_b.label) {
|
|
17
19
|
case 0:
|
|
18
|
-
trend = props.trend, pnl = props.pnl, position = props.position;
|
|
20
|
+
type = props.type, trend = props.trend, pnl = props.pnl, position = props.position;
|
|
19
21
|
isProfit = pnl > 0;
|
|
20
|
-
|
|
22
|
+
_a = isProfit ? cardTypes.profit : cardTypes.loss, rightImg = _a.rightImg, bgColor = _a.bgColor;
|
|
21
23
|
leverage = position.leverage, isLong = position.isLong, openLevel = position.openLevel, exitLevel = position.exitLevel;
|
|
22
24
|
html = getFile(path.join(__dirname, 'index.html'));
|
|
23
25
|
logo = getBase64Image(path.resolve(__dirname, 'images/logo.png'));
|
|
26
|
+
bgImage = getBase64Image(path.resolve(__dirname, 'images/bg.png'));
|
|
27
|
+
rightImage = getBase64Image(path.resolve(__dirname, rightImg));
|
|
28
|
+
personImage = getBase64Image(path.resolve(__dirname, "images/".concat(type, ".png")));
|
|
24
29
|
arrowImage = getBase64Image(path.resolve(__dirname, isLong ? 'images/arrow-up.png' : 'images/arrow-down.png'));
|
|
25
|
-
if (!trend.image) return [3 /*break*/, 2];
|
|
26
30
|
return [4 /*yield*/, downloadImage(trend.image)];
|
|
27
31
|
case 1:
|
|
28
|
-
|
|
29
|
-
return [3 /*break*/, 3];
|
|
30
|
-
case 2:
|
|
31
|
-
_a = getBase64Image(path.resolve(__dirname, 'images/default.png'));
|
|
32
|
-
_b.label = 3;
|
|
33
|
-
case 3:
|
|
34
|
-
trendImage = _a;
|
|
32
|
+
trendImage = _b.sent();
|
|
35
33
|
positionInfo = "".concat(isLong ? ' Up' : ' Down', ", Boost x").concat(leverage);
|
|
36
34
|
return [2 /*return*/, html
|
|
37
35
|
.replace('{logo}', logo)
|
|
38
36
|
.replace('--card-bg-color', bgColor)
|
|
39
|
-
.replace('{
|
|
37
|
+
.replace('{bgImg}', bgImage)
|
|
38
|
+
.replace('{rightImg}', rightImage)
|
|
39
|
+
.replace('{personImg}', personImage)
|
|
40
40
|
.replace('{trendImage}', trendImage)
|
|
41
41
|
.replace('{trendTitle}', trend.title)
|
|
42
42
|
.replace('{positionInfo}', positionInfo)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type Template } from '../../utils';
|
|
2
|
+
type Person = 'obama' | 'drake' | 'crash' | 'sydney' | 'tramp' | 'elon' | 'lewis' | 'mark' | 'powell' | 'macron' | 'arnold' | 'person-1' | 'tramp-2' | 'elon-2' | 'person-2' | 'taylor';
|
|
2
3
|
export type Props = {
|
|
4
|
+
type: Person;
|
|
3
5
|
trend: {
|
|
4
|
-
image: string
|
|
6
|
+
image: string;
|
|
5
7
|
title: string;
|
|
6
8
|
};
|
|
7
9
|
position: {
|
|
@@ -4,10 +4,8 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8">
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
8
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
7
|
<link
|
|
10
|
-
href="https://fonts.googleapis.com/css2?family=
|
|
8
|
+
href="https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&family=Mona+Sans:wdth,wght@75..125,700&display=swap"
|
|
11
9
|
rel="stylesheet">
|
|
12
10
|
<style>
|
|
13
11
|
html {
|
|
@@ -28,13 +26,6 @@
|
|
|
28
26
|
font-style: normal;
|
|
29
27
|
}
|
|
30
28
|
|
|
31
|
-
.geist-mono {
|
|
32
|
-
font-family: "Geist Mono", monospace;
|
|
33
|
-
font-optical-sizing: auto;
|
|
34
|
-
font-weight: 400;
|
|
35
|
-
font-style: normal;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
29
|
* {
|
|
39
30
|
box-sizing: border-box;
|
|
40
31
|
}
|
|
@@ -139,31 +130,22 @@
|
|
|
139
130
|
text-transform: uppercase;
|
|
140
131
|
}
|
|
141
132
|
|
|
142
|
-
.text-underline {
|
|
143
|
-
text-decoration: underline;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
133
|
.text-center {
|
|
147
134
|
text-align: center;
|
|
148
135
|
}
|
|
149
136
|
|
|
150
|
-
.text-bold {
|
|
151
|
-
font-weight: 700;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
137
|
.card {
|
|
155
138
|
background: --card-bg-color;
|
|
156
139
|
width: 1200px;
|
|
157
|
-
height:
|
|
158
|
-
padding:
|
|
140
|
+
height: 630px;
|
|
141
|
+
padding: 48px;
|
|
159
142
|
position: relative;
|
|
160
143
|
}
|
|
161
144
|
|
|
162
145
|
.logo {
|
|
163
|
-
height:
|
|
164
|
-
width:
|
|
146
|
+
height: 38px;
|
|
147
|
+
width: 266px;
|
|
165
148
|
display: block;
|
|
166
|
-
margin-right: 45px;
|
|
167
149
|
}
|
|
168
150
|
|
|
169
151
|
.trend {
|
|
@@ -253,28 +235,38 @@
|
|
|
253
235
|
.level-box {
|
|
254
236
|
margin-left: 125px;
|
|
255
237
|
}
|
|
256
|
-
|
|
257
|
-
.box {
|
|
258
|
-
background: #0F0F0F;
|
|
259
|
-
border-radius: 33px;
|
|
260
|
-
height: 100%;
|
|
261
|
-
width: fit-content;
|
|
262
|
-
padding: 30px 30px 55px;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.box-bottom {
|
|
266
|
-
margin-top: 30px;
|
|
267
|
-
}
|
|
268
238
|
</style>
|
|
269
239
|
</head>
|
|
270
240
|
|
|
271
241
|
<body>
|
|
272
242
|
<div class="card flex flex-col justify-between">
|
|
273
|
-
<img class="
|
|
274
|
-
<
|
|
275
|
-
<
|
|
276
|
-
|
|
277
|
-
|
|
243
|
+
<img class="bg-img" src={bgImg} alt="">
|
|
244
|
+
<img class="right-img" src={rightImg} alt="">
|
|
245
|
+
<img class="person-img" src={personImg} alt="">
|
|
246
|
+
<img src="{logo}" class="logo" alt="">
|
|
247
|
+
<div>
|
|
248
|
+
<div class="trend flex items-center">
|
|
249
|
+
<div class="trend__img flex items-center justify-center">
|
|
250
|
+
<img src="{trendImage}" alt="">
|
|
251
|
+
</div>
|
|
252
|
+
<div>
|
|
253
|
+
<div class="trend__title">{trendTitle}</div>
|
|
254
|
+
<div class="trend__badge">
|
|
255
|
+
<img class="arrow" src="{arrowImage}" alt="">
|
|
256
|
+
<span>{positionInfo}</span>
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
</div>
|
|
260
|
+
<div class="pnl">{pnl}%</div>
|
|
261
|
+
<div class="level-wrapper flex items-center">
|
|
262
|
+
<div>
|
|
263
|
+
<div class="level-title">Entry level:</div>
|
|
264
|
+
<div class="level-content">{openLevel}</div>
|
|
265
|
+
</div>
|
|
266
|
+
<div class="level-box {exitLevelClass}">
|
|
267
|
+
<div class="level-title">Exit level:</div>
|
|
268
|
+
<div class="level-content">{exitLevel}</div>
|
|
269
|
+
</div>
|
|
278
270
|
</div>
|
|
279
271
|
</div>
|
|
280
272
|
</div>
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
'use strict';var index=require('../../index-efa024cc.js'),path=require('path');require('fs'),require('util'),require('stream'),require('http'),require('https'),require('url'),require('crypto'),require('http2'),require('assert'),require('tty'),require('zlib'),require('events');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var path__default=/*#__PURE__*/_interopDefaultLegacy(path);var cardTypes = {
|
|
2
2
|
'profit': {
|
|
3
|
+
rightImg: 'images/profit.png',
|
|
3
4
|
bgColor: '#72FF4B',
|
|
4
5
|
},
|
|
5
6
|
'loss': {
|
|
7
|
+
rightImg: 'images/loss.png',
|
|
6
8
|
bgColor: '#FF604B',
|
|
7
9
|
}
|
|
8
10
|
};
|
|
@@ -11,32 +13,30 @@ var template = {
|
|
|
11
13
|
height: 630,
|
|
12
14
|
type: 'jpeg',
|
|
13
15
|
html: function (props) { return index._(void 0, void 0, void 0, function () {
|
|
14
|
-
var trend, pnl, position, isProfit, bgColor, leverage, isLong, openLevel, exitLevel, html, logo, arrowImage, trendImage,
|
|
16
|
+
var type, trend, pnl, position, isProfit, _a, rightImg, bgColor, leverage, isLong, openLevel, exitLevel, html, logo, bgImage, rightImage, personImage, arrowImage, trendImage, positionInfo;
|
|
15
17
|
return index.a(this, function (_b) {
|
|
16
18
|
switch (_b.label) {
|
|
17
19
|
case 0:
|
|
18
|
-
trend = props.trend, pnl = props.pnl, position = props.position;
|
|
20
|
+
type = props.type, trend = props.trend, pnl = props.pnl, position = props.position;
|
|
19
21
|
isProfit = pnl > 0;
|
|
20
|
-
|
|
22
|
+
_a = isProfit ? cardTypes.profit : cardTypes.loss, rightImg = _a.rightImg, bgColor = _a.bgColor;
|
|
21
23
|
leverage = position.leverage, isLong = position.isLong, openLevel = position.openLevel, exitLevel = position.exitLevel;
|
|
22
24
|
html = index.g(path__default["default"].join(__dirname, 'index.html'));
|
|
23
25
|
logo = index.b(path__default["default"].resolve(__dirname, 'images/logo.png'));
|
|
26
|
+
bgImage = index.b(path__default["default"].resolve(__dirname, 'images/bg.png'));
|
|
27
|
+
rightImage = index.b(path__default["default"].resolve(__dirname, rightImg));
|
|
28
|
+
personImage = index.b(path__default["default"].resolve(__dirname, "images/".concat(type, ".png")));
|
|
24
29
|
arrowImage = index.b(path__default["default"].resolve(__dirname, isLong ? 'images/arrow-up.png' : 'images/arrow-down.png'));
|
|
25
|
-
if (!trend.image) return [3 /*break*/, 2];
|
|
26
30
|
return [4 /*yield*/, index.d(trend.image)];
|
|
27
31
|
case 1:
|
|
28
|
-
|
|
29
|
-
return [3 /*break*/, 3];
|
|
30
|
-
case 2:
|
|
31
|
-
_a = index.b(path__default["default"].resolve(__dirname, 'images/default.png'));
|
|
32
|
-
_b.label = 3;
|
|
33
|
-
case 3:
|
|
34
|
-
trendImage = _a;
|
|
32
|
+
trendImage = _b.sent();
|
|
35
33
|
positionInfo = "".concat(isLong ? ' Up' : ' Down', ", Boost x").concat(leverage);
|
|
36
34
|
return [2 /*return*/, html
|
|
37
35
|
.replace('{logo}', logo)
|
|
38
36
|
.replace('--card-bg-color', bgColor)
|
|
39
|
-
.replace('{
|
|
37
|
+
.replace('{bgImg}', bgImage)
|
|
38
|
+
.replace('{rightImg}', rightImage)
|
|
39
|
+
.replace('{personImg}', personImage)
|
|
40
40
|
.replace('{trendImage}', trendImage)
|
|
41
41
|
.replace('{trendTitle}', trend.title)
|
|
42
42
|
.replace('{positionInfo}', positionInfo)
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|