-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
128 lines (109 loc) · 4.81 KB
/
index.html
File metadata and controls
128 lines (109 loc) · 4.81 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!doctype html>
<html lang="en">
<head>
<title>Infrastructure as Code Tutorial STACKX 2019</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin="anonymous"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.16.0/themes/prism.min.css"
rel="stylesheet"
integrity="sha384-PQRVhcIuoDbD2sVE+seIbyc6CzUw30zLYhlaJJt0Vw7Zyl7XfunpkeCANaW5A+XZ"
crossorigin="anonymous"/>
<style>
pre.language-bash, pre.language-hcl-terraform, pre.language-hcl {
cursor: copy;
}
</style>
</head>
<body class="d-flex flex-column h-100">
<main role="main" class="flex-shrink-0">
<div class="container">
<div class="row">
<div class="col-12" id="content">
</div>
</div>
</div>
<div class="row fixed-bottom">
<div id="alerts" class="col-12">
</div>
</div>
</main>
<div id="alert-template" class="invisible">
<div class="alert alert-dismissible fade show" role="alert">
<strong>{{{ message }}}</strong>
<button type="button" class="close" data-dismiss="alert"
aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.6.2/marked.min.js"
integrity="sha384-9bkP/CtE8rvBG0oqbZBIPHS/nNKbIKxm96KBRITeZlqqqIdGTETzv4yocK+P0fY4"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"
integrity="sha384-vk5WoKIaW/vJyUAd9n/wmopsmNhiy+L2Z+SBxGYnUkunIxVxAv/UtMOhba/xskxh"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.min.js"
integrity="sha384-2HWZ0KJxkQ3nhRpHPzk4AO2iIy1S8rSGwN5MpMS/xf34mqOahLqEbqwvdk48EnEv"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.15.0/umd/popper.min.js"
integrity="sha384-L2pyEeut/H3mtgCBaUNw7KWzp5n9+4pDQiExs933/5QfaTh8YStYFFkOzSoXjlTb"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.16.0/prism.min.js"
integrity="sha384-vrOdDDmdPRCIVUD4+UUexSx9sdZ5EnR9GJtg1gjScGZzTsWwcg3g+qbvjIONhGY/"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.16.0/components/prism-bash.min.js"
integrity="sha384-Z7WLzyh1z1S1JdPxohj38KZS0qlRQ/I9eP5K0AmNjqj35rR9v1hZN3iW2XzH2m4f"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.16.0/components/prism-hcl.min.js"
integrity="sha384-ctC0xOdJQjyc+Ib4JHkMynrUiZCUnbXJFTXNK/UAh20GHsaWt1G2Z8zFZKZA+Coa"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js"
integrity="sha384-8CYhPwYlLELodlcQV713V9ZikA3DlCVaXFDpjHfP8Z36gpddf/Vrt47XmKDsCttu"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/3.0.1/mustache.min.js"
integrity="sha384-CshXe6yvzsA+7Kb1fIvMqPlkkvLeelv3nspH/zUR748NqOUfTBHQbcS6ZZp0r0yN"
crossorigin="anonymous"></script>
<script>
let templates = {
alert: $('#alert-template').html()
};
_.each(templates, function (template) {
Mustache.parse(template);
});
function show_alert(message, alert_class) {
if (_.isEmpty(alert_class)) {
alert_class = 'alert-primary';
}
let $alert = $(Mustache.render(templates.alert, {message: message})).addClass(alert_class);
$('.alert').remove();
$('#alerts').prepend($alert);
setTimeout(function () {
$('.alert').alert('close');
}, 5000);
}
$(function () {
$.ajax(
'README.md',
{
success: function (contents) {
$('#content').html(marked(contents));
Prism.highlightAll();
new ClipboardJS('pre.language-bash, pre.language-hcl-terraform, pre.language-hcl', {
text: function (trigger) {
let text = $(trigger).text();
show_alert(`Copied: <pre>${text}</pre>`, 'alert-success');
return text;
}
});
}
}
);
});
</script>
</body>
</html>