Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
zedflow
fgdi
Commits
be074547
Commit
be074547
authored
Dec 22, 2023
by
Traboulsi
Browse files
Update public/js/add_content.js
parent
9ade5d5f
Pipeline
#8987
passed with stage
in 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
public/js/add_content.js
View file @
be074547
...
...
@@ -84,12 +84,11 @@ function addcontent(item) {
//-- debut
var
sdgProjectHTML
=
''
;
if
(
'
sdgImage
'
in
item
)
{
var
sdgProjectLink
=
item
.
sdgImage
;
var
customColor
=
'
#8A2BE2
'
;
var
imageSize
=
'
20px
'
;
// Adjust this value to your desired size
sdgProjectHTML
=
`<a class="btn btn-sm btn-outline- mt-1" style="color:
${
customColor
}
; border-color:
${
customColor
}
;" href="javascript:void(0);" onclick="document.querySelector('.btn-outline- img').src='
${
sdgProjectLink
}
'; document.querySelector('.btn-outline- img').alt='SDG Project Image'; document.querySelector('.btn-outline- img').style.width='
${
imageSize
}
'; document.querySelector('.btn-outline- img').style.height='
${
imageSize
}
'; document.querySelector('.btn-outline- img').onclick=function(){window.open('
${
sdgProjectLink
}
', '_blank');}"><img src="imgs/thumbnails/SDG-HFT.png" alt="SDG Project Image" class="btn-outline-"></a> `
;
var
sdgProjectLink
=
item
.
sdgImage
;
var
customColor
=
'
#8A2BE2
'
;
var
imageSize
=
'
20px
'
;
// Adjust this value to your desired size
sdgProjectHTML
=
`<a class="btn btn-sm btn-outline- mt-1" style="color:
${
customColor
}
; border-color:
${
customColor
}
;" href="javascript:void(0);" onclick="document.querySelector('.btn-outline- img').src='
${
sdgProjectLink
}
'; document.querySelector('.btn-outline- img').alt='SDG Project Image'; document.querySelector('.btn-outline- img').style.max-width='
${
imageSize
}
'; document.querySelector('.btn-outline- img').style.max-height='
${
imageSize
}
'; document.querySelector('.btn-outline- img').onclick=function(){window.open('
${
sdgProjectLink
}
', '_blank');}"><img src="imgs/thumbnails/SDG-HFT.png" alt="SDG Project Image" class="btn-outline-"></a> `
;
}
//-- fin (new idea)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment