|
|
@ -135,6 +135,7 @@ |
|
|
|
removeClassesStartingWith(projectNode, "time"); |
|
|
|
const names = []; |
|
|
|
const notes = []; |
|
|
|
const text = []; |
|
|
|
for (let i = 0; i < projectNode.children.length; i++) { |
|
|
|
const child = projectNode.children[i]; |
|
|
|
if (child.classList.contains('name')) { |
|
|
@ -143,11 +144,37 @@ |
|
|
|
if (child.classList.contains('notes')) { |
|
|
|
notes.push(child); |
|
|
|
} |
|
|
|
if (child.classList.contains('leading-s')) { |
|
|
|
text.push(child); |
|
|
|
} |
|
|
|
} |
|
|
|
const hotspots = ["admin", "art","mind","health","social","church","career","work"] |
|
|
|
text.forEach(function(t) { |
|
|
|
const breadcrumb = t.querySelector('.breadcrumbs'); |
|
|
|
if (breadcrumb !== null) { |
|
|
|
const breadcrumbs = breadcrumb.querySelectorAll('a'); |
|
|
|
breadcrumbs.forEach(bc => { |
|
|
|
var text = bc.innerText.trim(); |
|
|
|
if (hotspots.some(hotspot => text.includes(hotspot))) { |
|
|
|
const hotspot = hotspots.find(hotspot => text.includes(hotspot)); |
|
|
|
projectNode.classList.add(`hotspot-${hotspot}`); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
[notes, names].forEach(function(ns) { |
|
|
|
if (ns.length > 0) { |
|
|
|
const n = ns[0]; |
|
|
|
const text = safeGetContent(n, ".content > .innerContentContainer"); |
|
|
|
if (hotspots.some(hotspot => text.includes(hotspot))) { |
|
|
|
const hotspot = hotspots.find(hotspot => text.includes(hotspot)); |
|
|
|
projectNode.classList.add(`hotspot-${hotspot}`); |
|
|
|
const children = projectNode.querySelectorAll('.project'); |
|
|
|
children.forEach(child => { |
|
|
|
console.log(child); |
|
|
|
child.classList.add(`hotspot-${hotspot}`); |
|
|
|
}); |
|
|
|
} |
|
|
|
const tags = n.querySelectorAll('.contentTag'); |
|
|
|
tags.forEach(tag => { |
|
|
|
var tagText = safeGetContent(tag, ".contentTagText").trim(); |
|
|
|