plxdcma_rendericon_gridwithonlyimage 1.0.0
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/Captura de pantalla 2026-01-11 a la(s) 12.26.59/342/200/257p./302/240m..png +0 -0
- package/css.css +18 -0
- package/init.js +34 -0
- package/js.js +31 -0
- package/package.json +10 -0
|
Binary file
|
package/css.css
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.grid-item-academia {
|
|
2
|
+
/* En desktop y móvil, siempre se mostrarán 3 items (o 1 en pantallas muy pequeñas) */
|
|
3
|
+
flex: 0 0 calc(33.333% - 0.666rem); /* Mostrar 3 ítems con gap de 1rem */
|
|
4
|
+
scroll-snap-align: start;
|
|
5
|
+
position: relative;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
border-radius: 8px;
|
|
8
|
+
box-shadow: var(--shadow);
|
|
9
|
+
background-color: var(--white);
|
|
10
|
+
transition: transform 0.3s ease;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.grid-item-academia img {
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 300px;
|
|
16
|
+
object-fit: cover;
|
|
17
|
+
display: block;
|
|
18
|
+
}
|
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.grdsimplimg == null){
|
|
8
|
+
myux.use(req)
|
|
9
|
+
plxdcma_iconrendererprotocol.use(req)
|
|
10
|
+
req.__myAppInternals.grdsimplimg=true
|
|
11
|
+
if(req.__myAppInternals.paths == null){
|
|
12
|
+
req.__myAppInternals.paths=[]
|
|
13
|
+
}
|
|
14
|
+
req.__myAppInternals.paths.push(`<script src="/myux/icons/blocksofa_Icon.js"></script>`)
|
|
15
|
+
req.__myAppInternals.paths.push(`<link rel="stylesheet" href="/myux/icons/blocksofa_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/blocksofa_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/blocksofa_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,31 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
function gridSimpleImageIconAssignData(strct,target){
|
|
4
|
+
var resourceselected=strct.data
|
|
5
|
+
var tags=strct.tags
|
|
6
|
+
target.style.padding=0
|
|
7
|
+
var ifrm=target.getElementsByClassName(`daiframe`)
|
|
8
|
+
if(ifrm != null && ifrm.length > 0 ){
|
|
9
|
+
console.log(`da url selected ${resourceselected.url}`)
|
|
10
|
+
ifrm[0].src=resourceselected.httplink ?? resourceselected.url
|
|
11
|
+
}
|
|
12
|
+
var daed2=target.getElementsByClassName(`daed2`)
|
|
13
|
+
daed2[0].style.opacity=1
|
|
14
|
+
target.tags=tags
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
function gridSimpleImageIcon(data,isediting,section){
|
|
18
|
+
if(isediting){
|
|
19
|
+
if(data == null){
|
|
20
|
+
return `
|
|
21
|
+
<div onclick='didRequestToAddAnIcon(${section})' class="grid-item-academia">
|
|
22
|
+
<br/><br/><br/>
|
|
23
|
+
<h1 style="text-align:center"><i class='fa fa-plus'></i></h1>
|
|
24
|
+
</div>
|
|
25
|
+
`
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return `<div class="grid-item-academia">
|
|
29
|
+
<img src="/images/2.jpg" alt="Instalaciones de la Academia">
|
|
30
|
+
</div>`
|
|
31
|
+
}
|