Spaces:
Running
Running
Update templates/index.html
Browse files- templates/index.html +15 -6
templates/index.html
CHANGED
@@ -186,14 +186,17 @@
|
|
186 |
<li>
|
187 |
<p>{{ r.text }}</p>
|
188 |
<div class="tools">
|
189 |
-
|
190 |
|
191 |
-
|
192 |
-
|
193 |
|
194 |
-
|
195 |
-
|
196 |
-
|
|
|
|
|
|
|
197 |
</li>
|
198 |
{% endfor %}
|
199 |
</ol>
|
@@ -377,6 +380,12 @@
|
|
377 |
alert("Clipboard error: " + e.message);
|
378 |
}
|
379 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
</script>
|
381 |
</body>
|
382 |
</html>
|
|
|
186 |
<li>
|
187 |
<p>{{ r.text }}</p>
|
188 |
<div class="tools">
|
189 |
+
<button type="button" class="smallbtn" onclick="openContext({{ r.idx }})" title="Open full context sidebar">π View context</button>
|
190 |
|
191 |
+
<!-- Clipboard icon: copies the 2nd line of the source file -->
|
192 |
+
<button type="button" class="iconbtn" onclick="copySecond({{ r.idx }}, this)" title="Copy 2nd line of this file">π</button>
|
193 |
|
194 |
+
<!-- Link icon: opens the 2nd line of the source file in new tab -->
|
195 |
+
<button type="button" class="iconbtn" onclick="openLink({{ r.idx }})" title="Open URL in new tab">π</button>
|
196 |
+
|
197 |
+
<!-- File name label -->
|
198 |
+
<span class="filetag">π {{ r.file }}</span>
|
199 |
+
</div>
|
200 |
</li>
|
201 |
{% endfor %}
|
202 |
</ol>
|
|
|
380 |
alert("Clipboard error: " + e.message);
|
381 |
}
|
382 |
}
|
383 |
+
function openLink(idx) {
|
384 |
+
const meta = window.PARA_META[idx];
|
385 |
+
if (meta && meta.second) {
|
386 |
+
window.open(meta.second, "_blank");
|
387 |
+
}
|
388 |
+
}
|
389 |
</script>
|
390 |
</body>
|
391 |
</html>
|