awesome-chatgpt-prompts/_layouts/default.html

53 lines
2.2 KiB
HTML
Raw Normal View History

2022-12-15 23:50:06 +00:00
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: "en-US" }}">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{% seo %}
<link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}">
{% include head-custom.html %}
</head>
<body>
<div class="container-lg px-3 my-5 markdown-body">
{% if site.title and site.title != page.title %}
<h1><a href="{{ "/" | absolute_url }}">{{ site.title }}</a></h1>
{% endif %}
{{ content }}
{% if site.github.private != true and site.github.license %}
<div class="footer border-top border-gray-light mt-5 pt-3 text-right text-gray">
Awesome ChatGPT Prompts is open source. {% github_edit_link "Improve this page" %}.
</div>
{% endif %}
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js" integrity="sha256-lZaRhKri35AyJSypXXs4o6OPFTbTmUoltBbDCbdzegg=" crossorigin="anonymous"></script>
<script>anchors.add();</script>
2022-12-15 23:51:47 +00:00
<script>
document.querySelectorAll("h2[id^=act] + p + blockquote").forEach((x) => {
x.setAttribute('contentEditable', true);
const button = document.createElement('button');
2022-12-15 23:59:36 +00:00
button.style.border = '0';
2022-12-15 23:51:47 +00:00
button.style.borderRadius = '3px';
2022-12-15 23:55:28 +00:00
button.style.fontSize = '1rem';
2022-12-15 23:51:47 +00:00
button.style.marginRight = '0.5rem';
2022-12-15 23:59:36 +00:00
button.style.padding = '0';
button.style.backgroundColor = 'transparent';
2022-12-15 23:51:47 +00:00
button.innerHTML = '✂️';
2022-12-16 00:28:52 +00:00
button.addEventListener('click', async () => {
2022-12-15 23:51:47 +00:00
if (navigator.clipboard) {
2022-12-16 00:28:52 +00:00
await navigator.clipboard.writeText(x.innerText);
alert('Prompt is copied, now paste this into ChatGPT.');
2022-12-15 23:51:47 +00:00
} else {
alert('Your browser does not support clipboard copy. Please select the prompt and copy.')
}
2022-12-16 00:28:52 +00:00
}, false);
2022-12-15 23:51:47 +00:00
x.previousElementSibling.previousElementSibling.prepend(button);
});
</script>
2022-12-16 00:18:04 +00:00
<style>video { max-width: 100% !important; }</style>
2022-12-15 23:50:06 +00:00
</body>
</html>