jekyll-vitepress-theme 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e183c8f8f2ffa9c7a63a0bd5e581f47cd41e377c3271331cdb709ba318157360
|
|
4
|
+
data.tar.gz: 57afd8252f5ef2dec3c09a1b26051a2c6b13f26867148f0cc2f6efd8876a6744
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8aec92127430303041ff8337187776d67bd5e779a77b50263ffc4a756df212bc847987002c9a824966bee7ce3d5293439eefbd3b3ba9ff63bffd52a8d258bfa5
|
|
7
|
+
data.tar.gz: abb74bb84cf29cf52d4de84832ec2e6e78d6e55be445c51aea4ef3c7029f8fe21cc3cfdbdf2aaae5a98d0340fffa7f6303279e9aae4ae79b119bd047e9709cd4
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
<span class="copy-md-dropdown-desc">Copy page as Markdown for LLMs</span>
|
|
19
19
|
</div>
|
|
20
20
|
</button>
|
|
21
|
-
<
|
|
21
|
+
<button class="copy-md-dropdown-item" type="button" data-action="view-markdown" data-url="{{ view_md_url | relative_url | escape }}">
|
|
22
22
|
<span class="vpi-file-text copy-md-dropdown-icon"></span>
|
|
23
23
|
<div class="copy-md-dropdown-text">
|
|
24
24
|
<span class="copy-md-dropdown-title">View as Markdown</span>
|
|
25
25
|
<span class="copy-md-dropdown-desc">View this page as plain text</span>
|
|
26
26
|
</div>
|
|
27
|
-
</
|
|
27
|
+
</button>
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
|
@@ -2112,12 +2112,6 @@ html.dark .only-light {
|
|
|
2112
2112
|
background: var(--vp-c-bg-soft);
|
|
2113
2113
|
}
|
|
2114
2114
|
|
|
2115
|
-
a.copy-md-dropdown-item,
|
|
2116
|
-
a.copy-md-dropdown-item:hover {
|
|
2117
|
-
text-decoration: none;
|
|
2118
|
-
color: var(--vp-c-text-1);
|
|
2119
|
-
}
|
|
2120
|
-
|
|
2121
2115
|
.copy-md-dropdown-icon {
|
|
2122
2116
|
flex-shrink: 0;
|
|
2123
2117
|
width: 18px;
|
|
@@ -1427,6 +1427,7 @@
|
|
|
1427
1427
|
var toggle = document.querySelector('.copy-md-toggle');
|
|
1428
1428
|
var dropdown = document.querySelector('.copy-md-dropdown');
|
|
1429
1429
|
var dropdownCopy = dropdown ? dropdown.querySelector('[data-action="copy"]') : null;
|
|
1430
|
+
var dropdownView = dropdown ? dropdown.querySelector('[data-action="view-markdown"]') : null;
|
|
1430
1431
|
|
|
1431
1432
|
function setCopyPageDropdownOpen(open) {
|
|
1432
1433
|
if (!dropdown || !toggle) {
|
|
@@ -1478,6 +1479,16 @@
|
|
|
1478
1479
|
copyPageMarkdown(copyMdBtn);
|
|
1479
1480
|
});
|
|
1480
1481
|
}
|
|
1482
|
+
|
|
1483
|
+
dropdownView = dropdown ? dropdown.querySelector('[data-action="view-markdown"]') : null;
|
|
1484
|
+
if (dropdownView && !dropdownView.hasAttribute('data-vp-bound')) {
|
|
1485
|
+
dropdownView.setAttribute('data-vp-bound', 'true');
|
|
1486
|
+
dropdownView.addEventListener('click', function () {
|
|
1487
|
+
var url = dropdownView.getAttribute('data-url');
|
|
1488
|
+
setCopyPageDropdownOpen(false);
|
|
1489
|
+
if (url) window.open(url, '_blank', 'noopener,noreferrer');
|
|
1490
|
+
});
|
|
1491
|
+
}
|
|
1481
1492
|
}
|
|
1482
1493
|
|
|
1483
1494
|
bindCopyPageControls();
|
|
@@ -2262,6 +2273,7 @@
|
|
|
2262
2273
|
toggle = document.querySelector('.copy-md-toggle');
|
|
2263
2274
|
dropdown = document.querySelector('.copy-md-dropdown');
|
|
2264
2275
|
dropdownCopy = dropdown ? dropdown.querySelector('[data-action="copy"]') : null;
|
|
2276
|
+
dropdownView = dropdown ? dropdown.querySelector('[data-action="view-markdown"]') : null;
|
|
2265
2277
|
bindCopyPageControls();
|
|
2266
2278
|
|
|
2267
2279
|
addCopyButtons();
|