plxdcma_rendericon_center 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,15 @@
1
+ .cardcentericon{
2
+ background: white; padding: 2rem; border-radius: 15px; text-align: center; box-shadow: 0 5px 15px rgba(0,0,0,0.08); transition: transform 0.3s ease;
3
+ }
4
+ .cardcentericon > i{
5
+ color: #dc2626; font-size: 3rem; margin-bottom: 1rem;
6
+ }
7
+ .cardcentericon > h4{
8
+ font-size: 1.25rem; font-weight: 600; color: #1f2937; margin-bottom: 1rem;
9
+ }
10
+ .cardcentericon > h4{
11
+ font-size: 1.25rem; font-weight: 600; color: #1f2937; margin-bottom: 1rem;
12
+ }
13
+ .cardcentericon >p{
14
+ color: #6b7280; line-height: 1.6;
15
+ }
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.centralizedicon == null){
8
+ myux.use(req)
9
+ plxdcma_iconrendererprotocol.use(req)
10
+ req.__myAppInternals.centralizedicon=true
11
+ if(req.__myAppInternals.paths == null){
12
+ req.__myAppInternals.paths=[]
13
+ }
14
+ req.__myAppInternals.paths.push(`<script src="/myux/icons/C_Icon.js"></script>`)
15
+ req.__myAppInternals.paths.push(`<link rel="stylesheet" href="/myux/icons/C_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/C_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/C_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,24 @@
1
+ function icon_imagetitlesubtitle_center(data,isediting,section){
2
+ if(data == null && isediting){
3
+ return `<div class="cardcentericon" onclick='didRequestToAddAnIcon(${section})'>
4
+ <br/><br/>
5
+ <i class="fas fa-plus" style=""></i>
6
+ </div>`
7
+ }
8
+ var cstring=``
9
+ var ock=""
10
+ if(isediting){
11
+ cstring=`contenteditable='true'`
12
+ ock=`onclick='replaceThisIcon(event.target)'`
13
+ }
14
+
15
+
16
+ var h=`
17
+ <div class="cardcentericon">
18
+ <i ${ock} cxtza='icon' class="fas fa-handshake" style=""></i>
19
+ <h4 cxtza='titulo' ${cstring} >${data.titulo ?? `Titulo`}</h4>
20
+ <p cxtza='subtitulo' ${cstring} >${data.subtitulo ?? `Creemos en la fuerza del trabajo colaborativo y el apoyo mutuo`}</p>
21
+ </div>
22
+ `
23
+ return h
24
+ }
package/package.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "plxdcma_rendericon_center",
3
+ "version": "1.0.1",
4
+ "main": "init.js",
5
+ "license": "MIT"
6
+ }
package/preview.png ADDED
Binary file