add carousel #4

Manually merged
anton merged 3 commits from carousel into main 2024-03-28 23:21:50 +00:00
Owner
No description provided.
anton added 1 commit 2023-12-25 03:08:19 +00:00
anton added 1 commit 2023-12-25 03:10:05 +00:00
ryan requested changes 2023-12-28 03:34:19 +00:00
@ -11,0 +20,4 @@
});
function createCarouselItems(items) {
const carousel = document.querySelector('.carousel');
Owner

nit: use an id instead of a class

nit: use an id instead of a class
anton marked this conversation as resolved
@ -11,0 +24,4 @@
items.forEach(item => {
const itemDiv = document.createElement('div');
itemDiv.className = 'carousel-item';
itemDiv.innerHTML = `<a class="carousel-link" target="_blank" rel="noopener noreferrer" href="${item.link}">${item.description}</a>`;
Owner

nit: create the <a> element in code and change the href and innerText manually to avoid XSS

nit: create the `<a>` element in code and change the href and innerText manually to avoid XSS
Owner

yes we control both the content and the code but it's a good practice to avoid XSS

yes we control both the content and the code but it's a good practice to avoid XSS
anton marked this conversation as resolved
anton added 1 commit 2023-12-28 18:43:32 +00:00
anton manually merged commit 45924dcb9e into main 2024-03-28 23:21:50 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: public/website#4
No description provided.