1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
{% load humanize %}
<html>
<head>
<style>
body {
padding-top: 30px;
}
.button {
color: white;
padding: 1rem;
text-decoration: none;
background-color: #2ea44f;
border: 1px solid rgba(27, 31, 35, .15);
border-radius: 6px;
box-shadow: rgba(27, 31, 35, .1) 0 1px 0;
box-sizing: border-box;
color: #fff;
cursor: pointer;
display: inline-block;
font-family: -apple-system,system-ui,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
font-size: 14px;
font-weight: 600;
line-height: 20px;
padding: 6px 16px;
position: relative;
text-align: center;
text-decoration: none;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
vertical-align: middle;
white-space: nowrap;
}
</style>
</head>
<body>
<a class="button" href="#" onclick="CopyToClipboard('rich-text');return false;">Copy Rich Text</a>
<a class="button" href="#" onclick="CopyToClipboard('markdown');return false;">Copy Markdown</a>
<div id="rich-text">
<h4><a href="{{object.url}}">{{object.title|title}} for ${{object.get_deal_price_pretty|intcomma}} (${{object.dollars_off}} off)</a></h4>
</div>
<textarea id="markdown" style="min-width: 35rem; height: 15rem;">
#### [{{object.title|title}} for ${{object.get_deal_price_pretty|intcomma}} (${{object.dollars_off}} off)]({{object.url}})
+++button-group
[Amazon]({{object.url}} "Amazon"){: target="_blank"}
+++
</textarea>
<script>
function CopyToClipboard(id)
{
var r = document.createRange();
r.selectNode(document.getElementById(id));
window.getSelection().removeAllRanges();
window.getSelection().addRange(r);
document.execCommand('copy');
window.getSelection().removeAllRanges();
}
</script>
</body>
</html>
|