Skip to content

Commit

Permalink
added query selector for girls who code to add tag to span for editin…
Browse files Browse the repository at this point in the history
…g style of tag
  • Loading branch information
szack25 committed Dec 15, 2023
1 parent 0693cfd commit 6890c0e
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions assets/js/post-tag-add.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
onload = () => {
const articles = document.querySelectorAll('.tag-robotics');
const roboticsArticles = document.querySelectorAll('.tag-robotics');

articles.forEach(article => {
const spans = article.querySelectorAll('span');
roboticsArticles.forEach(article => {
const roboticsSpans = article.querySelectorAll('span');

spans.forEach(span => {
roboticsSpans.forEach(span => {
span.classList.add('tag-robotics-span');
});
});

const csClubArticles = document.querySelectorAll('.tag-cs-club');

csClubArticles.forEach(article => {
const csClubSpans = article.querySelectorAll('span');

csClubSpans.forEach(span => {
span.classList.add('tag-cs-club-span');
});
});

const girlsWhoCodeArticles = document.querySelectorAll('.tag-girls-who-code');

girlsWhoCodeArticles.forEach(article => {
const girlsWhoCodeSpans = article.querySelectorAll('span');

girlsWhoCodeSpans.forEach(span => {
span.classList.add('tag-girls-who-code-span')

});
});
}

0 comments on commit 6890c0e

Please sign in to comment.