Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
zedflow
fgdi
Commits
b1b3c9c8
Commit
b1b3c9c8
authored
1 year ago
by
Traboulsi
Browse files
Options
Download
Email Patches
Plain Diff
Update public/js/add_content.js
parent
ada898a6
Pipeline
#8998
passed with stage
in 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public/js/add_content.js
+3
-3
public/js/add_content.js
with
3 additions
and
3 deletions
+3
-3
public/js/add_content.js
+
3
-
3
View file @
b1b3c9c8
...
@@ -88,10 +88,10 @@ function addcontent(item) {
...
@@ -88,10 +88,10 @@ function addcontent(item) {
var
customColor
=
'
#8A2BE2
'
;
var
customColor
=
'
#8A2BE2
'
;
//var imageSize = '5px'; // Adjust this value to your desired size
//var imageSize = '5px'; // 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="
changeImage
('
${
sdgProjectLink
}
'
)
"><img src="imgs/thumbnails/SDG-HFT.png" alt="SDG Project Image" class="btn-outline-" style="max-width:100px ; max-height:60px;"></a> `
;
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').onclick=function(){window.open
('
${
sdgProjectLink
}
'
, '_blank');}
"><img src="imgs/thumbnails/SDG-HFT.png" alt="SDG Project Image" class="btn-outline-" style="max-width:100px ; max-height:60px;"></a> `
;
// Add a JavaScript function to change the image and open the link
// Add a JavaScript function to change the image and open the link
sdgProjectHTML
+=
`
/*
sdgProjectHTML += `
<script>
<script>
function changeImage(sdgProjectLink) {
function changeImage(sdgProjectLink) {
var img = document.querySelector('.btn-outline- img');
var img = document.querySelector('.btn-outline- img');
...
@@ -99,7 +99,7 @@ function addcontent(item) {
...
@@ -99,7 +99,7 @@ function addcontent(item) {
img.alt = 'SDG Project Image';
img.alt = 'SDG Project Image';
window.open(sdgProjectLink, '_blank');
window.open(sdgProjectLink, '_blank');
}
}
</script>`
;
</script>`;
*/
}
}
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets