Compare commits

..

No commits in common. "60e7d536a5ec4284d245444ed16cc457b12a1558" and "91f5be8764820709c194962b178cfcd08e729a7f" have entirely different histories.

4 changed files with 11 additions and 14 deletions

View file

@ -92,7 +92,7 @@ function pathReplacer(html) {
return html return html
} }
function highlighter(json, full = true, linkParent = false) { function highlighter(json, full = true) {
for (var i = 0; i < json.length; i++) { for (var i = 0; i < json.length; i++) {
var element = json[i] var element = json[i]
if (element.type == "element") { if (element.type == "element") {
@ -113,7 +113,7 @@ function highlighter(json, full = true, linkParent = false) {
} }
if (valid) { if (valid) {
element.children = highlighter(element.children, full, linkParent || element.tagName == "a") element.children = highlighter(element.children, full)
} }
} }
} else if (element.type == "text") { } else if (element.type == "text") {
@ -205,15 +205,13 @@ function highlighter(json, full = true, linkParent = false) {
var stuff = (startContent + dict.words[x] + endContent).trim() var stuff = (startContent + dict.words[x] + endContent).trim()
if (!stuff.includes("span")) { if (!stuff.includes("span")) {
var replacement = `<span ${style} ${classes}>${stuff}</span>` var replacement = `<span ${style} ${classes} ${link}>${stuff}</span>`
if (link && !linkParent) { if (link) {
replacement = `<a href="${link}">${replacement}</a>` replacement = `<a href="${link}">${replacement}</a>`
// console.log(replacement)
} }
element.content = element.content.substring(0, spanStart) + replacement + element.content.substring(spanEnd) element.content = element.content.substring(0, spanStart) + replacement + element.content.substring(spanEnd)
} else { } else {
element.content = element.content.replace(termKey, dict.words[x]) element.content = element.content.replace(termKey, dict.words[x])
} }
} }
@ -286,6 +284,7 @@ function converter(html, dynamic = true) {
return "" return ""
}, },
"SELECTED_VIDEO": () => { "SELECTED_VIDEO": () => {
console.log(api.lanyard)
if (api.lanyard.video) { if (api.lanyard.video) {
return `<h2><hr/>Random video!</h2><p>I would call it random <em>daily</em> video but its not at all daily...</p> return `<h2><hr/>Random video!</h2><p>I would call it random <em>daily</em> video but its not at all daily...</p>
<br/> <br/>

View file

@ -151,10 +151,3 @@ main:nth-of-type(1), .mainDiv {
color: darkgray; color: darkgray;
font-size: 1rem; font-size: 1rem;
} }
video {
width: 95%;
max-height: 90vh;
border: 2px limegreen solid;
z-index: 5;
}

View file

@ -80,7 +80,6 @@
<!-- <a class="chip">Matrix: matrix.violets-purgatory.dev</a> --> <!-- <a class="chip">Matrix: matrix.violets-purgatory.dev</a> -->
<!-- <a href="https://element.violets-purgatory.dev" class="chip">Element: element.violets-purgatory.dev</a> --> <!-- <a href="https://element.violets-purgatory.dev" class="chip">Element: element.violets-purgatory.dev</a> -->
<a href="https://git.viois.gay" class="chip">Forgejo: <span class="noHighlight">git.viois.gay</span></a> <a href="https://git.viois.gay" class="chip">Forgejo: <span class="noHighlight">git.viois.gay</span></a>
<a href="https://univerter.dev" class="chip">Univerter: <span class="noHighlight">univerter.dev</span></a>
<a class="chip">Thumbor: <span class="noHighlight">thumbor.violets-purgatory.dev</span></a> <a class="chip">Thumbor: <span class="noHighlight">thumbor.violets-purgatory.dev</span></a>
<hr> <hr>
<h1>Socials</h1> <h1>Socials</h1>

View file

@ -308,9 +308,15 @@ video {
max-height: 90vh; max-height: 90vh;
border: 2px rgb(125, 100, 155) solid; border: 2px rgb(125, 100, 155) solid;
border-radius: 15px; border-radius: 15px;
transition: all 5s cubic-bezier(0.39, 0.575, 0.565, 1);
z-index: 5; z-index: 5;
} }
video:active {
transition: all 1s cubic-bezier(0.075, 0.82, 0.165, 1);
border-color: rgb(225, 150, 255);
}
sup { sup {
color: gray; color: gray;
} }