-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
71 lines (60 loc) · 2.44 KB
/
index.html
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
66
67
68
69
70
71
---
layout: default
body_class: home
custom_js:
- /js/widget.js
---
{% include navbar.html %}
<div class="content">
{% include widget.html %}
<div class="container">
<br/>
<p class="text-center">
<button type="button" class="btn btn-info btn-sm" data-toggle="modal" data-target="#embedModal">
Embed this widget
</button>
</p>
<div class="modal fade" id="embedModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">Embed search widget</h4>
</div>
<div class="modal-body">
<div class="form-group">
<textarea id="embed-code" class="form-control" rows="8" readonly>
<div id="propertyvalues-za"></div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pym/1.2.0/pym.v1.min.js"></script>
<script>
var pymParent = new pym.Parent('propertyvalues-za', '{{ site.url }}/embed.html', {});
</script></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" data-clipboard-target="#embed-code" data-placement="bottom" title="Copied!">Copy Embed Code</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</div><!-- /.container -->
</div>
<!-- Copy embed code to clipboard -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.6.1/clipboard.min.js"></script>
<script type="text/javascript">
window.onload = function() {
$('#embedModal').on('shown.bs.modal', function (e) {
$('#embedModal textarea').select();
});
clipboard = new Clipboard('#embedModal .btn-primary');
clipboard.on('success', function(e) {
$('#embedModal .btn-primary').tooltip();
$('#embedModal .btn-primary').tooltip('show');
});
$('#embedModal .btn-primary').on('mouseleave', function () {
$('#embedModal .btn-primary').tooltip('destroy');
});
};
</script>
{% include footer.html %}