mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-24 23:15:46 -05:00
Quartz sync: Jul 4, 2024, 11:35 AM
This commit is contained in:
parent
b11caff9bb
commit
c0c8728a84
@ -10,7 +10,7 @@ title: Index
|
||||
疲つかれたら お茶ちゃにして
|
||||
少すこしずつ良よくなるよ お勉強べんきょう
|
||||
<footer>@utaten<cite> <a href="https://utaten.com/lyric/to16060309/">https://utaten.com/lyric/to16060309/</a></cite></footer>
|
||||
</blockquote><script note="" src="/static/js/quoteback.js"></script>
|
||||
</blockquote><script note="" src="https://cdn.jsdelivr.net/gh/brickfrog/notes.justin.vc@master/quartz/static/js/quoteback.js"></script>
|
||||
</div>
|
||||
<div style="flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;">
|
||||
<p style="width: 100%; text-align: center; margin-bottom: 10px; font-weight: 1000;">Please don't strongly interpret the dot!</p>
|
||||
|
||||
@ -39,7 +39,7 @@ const defaultOptions: Options = {
|
||||
comments: true,
|
||||
highlight: true,
|
||||
wikilinks: true,
|
||||
callouts: true,
|
||||
callouts: false,
|
||||
mermaid: true,
|
||||
quotebacks: true,
|
||||
parseTags: true,
|
||||
@ -720,11 +720,11 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
|
||||
if (opts.quotebacks) {
|
||||
js.push({
|
||||
script: `
|
||||
document.addEventListener('nav', async () => {
|
||||
function initializeQuotebacks() {
|
||||
if (document.querySelector("blockquote.quoteback")) {
|
||||
if (!customElements.get('quoteback-component')) {
|
||||
const script = document.createElement('script');
|
||||
script.src = '/static/js/quoteback.js';
|
||||
script.src = 'https://cdn.jsdelivr.net/gh/brickfrog/notes.justin.vc@master/quartz/static/js/quoteback.js';
|
||||
document.body.appendChild(script);
|
||||
|
||||
script.onload = () => {
|
||||
@ -735,7 +735,10 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
|
||||
document.dispatchEvent(new Event('DOMContentLoaded'));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', initializeQuotebacks);
|
||||
document.addEventListener('nav', initializeQuotebacks);
|
||||
`,
|
||||
loadTime: "afterDOMReady",
|
||||
moduleType: "module",
|
||||
|
||||
@ -254,7 +254,6 @@ function applyQuotebackStyles() {
|
||||
|
||||
for (var item = 0; item < index.length; item++) {
|
||||
// remove the footer element
|
||||
console.log(index[item])
|
||||
index[item].removeChild(index[item].querySelector("footer"))
|
||||
|
||||
var text = index[item].innerHTML
|
||||
@ -310,8 +309,6 @@ function applyQuotebackStyles() {
|
||||
}
|
||||
|
||||
connectedCallback() {
|
||||
console.info("connected")
|
||||
|
||||
this.updateTheme()
|
||||
this.shadowRoot.querySelector(".quoteback-content").innerHTML = decodeURIComponent(
|
||||
this.getAttribute("text"),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user