RadicalBrad
New member
Hello,
I have added code to place small thumbnail images next to my forum nodes. This is working perfectly, and can be seen here under Tutorials and Projects...
To make these display, I add the following code in extra.less.
It simply finds the node ID and then stuffs the image in the background.
Here are two thumbnails as a reference...
My question is : can I use a loop to reduce this code?
The only unique lines are the node ID and the Image URL.
Perhaps some kind of array that contains NODE,URL and then does a loop to generate this?
If not, not big deal, this certainly works.
Really liking my XF Forum!
Cheers,
Brad
I have added code to place small thumbnail images next to my forum nodes. This is working perfectly, and can be seen here under Tutorials and Projects...
To make these display, I add the following code in extra.less.
It simply finds the node ID and then stuffs the image in the background.
Here are two thumbnails as a reference...
Code:
/* PROJECT : skystyle_tallbike */
.node.node--id82 {
.node-icon i {display:none;}
padding-left:12px;
padding-top:6px;
padding-bottom:6px;
.node-icon {
background-image: url('https://chopzone.com/content/tutorials/skystyle_tallbike/thumb.jpg');
background-repeat:no-repeat;
background-position:center;
background-size:contain;
width:100px;
height:64px;
}}
/* PROJECT : marauder_lowracer */
.node.node--id81 {
.node-icon i {display:none;}
padding-left:12px;
padding-top:6px;
padding-bottom:6px;
.node-icon {
background-image: url('https://chopzone.com/content/tutorials/marauder_lowracer/thumb.jpg');
background-repeat:no-repeat;
background-position:center;
background-size:contain;
width:100px;
height:64px;
}}
My question is : can I use a loop to reduce this code?
The only unique lines are the node ID and the Image URL.
Perhaps some kind of array that contains NODE,URL and then does a loop to generate this?
If not, not big deal, this certainly works.
Really liking my XF Forum!
Cheers,
Brad