plxdcma_rendericon_lefted 1.0.1

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/css.css ADDED
@@ -0,0 +1,47 @@
1
+
2
+ .achievements-grid {
3
+ display: grid;
4
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
5
+ gap: 2rem;
6
+ margin-top: 2rem;
7
+ }
8
+
9
+ .achievement-item {
10
+ display: flex;
11
+ gap: 1rem;
12
+ align-items: flex-start;
13
+ padding: 1.5rem;
14
+ background: var(--white);
15
+ border-radius: 12px;
16
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
17
+ transition: transform 0.3s ease;
18
+ }
19
+
20
+ .achievement-item:hover {
21
+ transform: translateY(-5px);
22
+ }
23
+
24
+ .achievement-icon {
25
+ background: var(--primary-color);
26
+ color: var(--white);
27
+ width: 60px;
28
+ height: 60px;
29
+ border-radius: 50%;
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: center;
33
+ font-size: 1.5rem;
34
+ flex-shrink: 0;
35
+ }
36
+
37
+ .achievement-content h4 {
38
+ font-size: 1.25rem;
39
+ font-weight: 600;
40
+ color: var(--text-dark);
41
+ margin-bottom: 0.5rem;
42
+ }
43
+
44
+ .achievement-content p {
45
+ color: var(--text-light);
46
+ line-height: 1.6;
47
+ }
package/init.js ADDED
@@ -0,0 +1,34 @@
1
+ var plxdcma_standarinit=require(`plxdcma_standarinit`)
2
+ var fs=require(`fs`)
3
+ var path=require(`path`)
4
+ var myux=require(`plxdcma_myux`)
5
+ var plxdcma_iconrendererprotocol=require(`plxdcma_iconrendererprotocol`)
6
+ module.exports.use=function(req){
7
+ if(req.__myAppInternals.leftedicon == null){
8
+ myux.use(req)
9
+ plxdcma_iconrendererprotocol.use(req)
10
+ req.__myAppInternals.leftedicon=true
11
+ if(req.__myAppInternals.paths == null){
12
+ req.__myAppInternals.paths=[]
13
+ }
14
+ req.__myAppInternals.paths.push(`<script src="/myux/icons/L_Icon.js"></script>`)
15
+ req.__myAppInternals.paths.push(`<link rel="stylesheet" href="/myux/icons/L_Icon.css">`)
16
+ if(req.__myAppInternals.modals == null){
17
+ req.__myAppInternals.modals=[]
18
+ }
19
+ }
20
+ }
21
+ plxdcma_standarinit.use(function(app){
22
+ app.get(`/myux/icons/L_Icon.js`,function(req,res){
23
+ fs.readFile(path.join(__dirname,"js.js"),"utf8",function(err,html){
24
+ res.write(html)
25
+ res.end()
26
+ })
27
+ })
28
+ app.get(`/myux/icons/L_Icon.css`,function(req,res){
29
+ fs.readFile(path.join(__dirname,"css.css"),"utf8",function(err,html){
30
+ res.write(html)
31
+ res.end()
32
+ })
33
+ })
34
+ })
package/js.js ADDED
@@ -0,0 +1,63 @@
1
+ function icon_imagetitlesubtitle_left(data,isediting,section){
2
+ if(isediting == true && data == null){
3
+ var tb=`<div class="achievement-item" onclick='didRequestToAddAnIcon(${section})'>
4
+ <div class="achievement-icon">
5
+ <i class="fas fa-plus"></i>
6
+ </div>
7
+
8
+ </div>`
9
+ return tb
10
+ }
11
+ var c=null
12
+ var ock=``
13
+ var deletingbtn=``
14
+ if(isediting){
15
+ ock=`onclick='replaceThisIcon(event.target)'`
16
+ c=`contentEditable='true'`
17
+ deletingbtn=`<i onclick='rendericon_removethisicon()' style='float:right' class="fa fa-trash" aria-hidden="true"></i>`
18
+ }
19
+
20
+ var h=`
21
+ <div class="achievement-item">
22
+
23
+ <div class="achievement-icon">
24
+ <i ${ock} cxtza='icon' class="${data.icon ?? "fas fa-trophy"}"></i>
25
+ </div>
26
+ <div class="achievement-content">
27
+ <h4 ${c} cxtza='titulo'>${data.titulo}</h4>
28
+ <p ${c} cxtza='subtitulo'>${data.subtitulo}</p>
29
+ </div>
30
+ ${deletingbtn}
31
+ </div>
32
+ `
33
+ return h
34
+ /*
35
+ var icono=achievementGrids[id].icono[i]
36
+ var fcby=FaIconsById[icono]
37
+ if(fcby == null){
38
+ fcby=""
39
+ }
40
+ var titulo=achievementGrids[id].titulo[i]
41
+ var subtitulo=achievementGrids[id].subtitulo[i]
42
+ var tituloh=`<h4>${titulo}</h4>`
43
+ var subtituloh=`<p>${subtitulo}</p>`
44
+ var achvicon=`<div class="achievement-icon">
45
+ ${fcby}
46
+ </div>`
47
+ if(PPIsEditing){
48
+ achvicon=`<div onclick='achgrd_updateIconOf(${id},${i})' class="achievement-icon">
49
+ ${fcby}
50
+ </div>`
51
+ tituloh=`<h4 id="ach_t_${id}_${i}" onkeyup='achgrd_didUpdateTitulo(${id},${i})' contentEditable=true>${titulo}</h4>`
52
+ subtituloh=`<p id="ach_s_${id}_${i}" onkeyup='achgrd_didUpdateSubTitulo(${id},${i})' contentEditable=true >${subtitulo}s</p>`
53
+ }
54
+
55
+ var sth=`<div class="achievement-item">
56
+ ${achvicon}
57
+ <div class="achievement-content">
58
+ ${tituloh}
59
+ ${subtituloh}
60
+ </div>
61
+ </div>`
62
+ */
63
+ }
package/package.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "plxdcma_rendericon_lefted",
3
+ "version": "1.0.1",
4
+ "main": "init.js",
5
+ "license": "MIT"
6
+ }
package/preview.png ADDED
Binary file