-
Notifications
You must be signed in to change notification settings - Fork 169
/
file.html
36 lines (33 loc) · 975 Bytes
/
file.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
{% extends "base.html" %}
{% load pygments_highlights %}
{% load truncatepath %}
{% block title %}| File #{{ file.id }}: {{ file.path | truncatepath:75 }}{% endblock %}
{% block body %}
<div>
{% include "partials/playbook_card.html" with playbook=file.playbook %}
</div>
<br/>
<div>
<div class="card">
<div class="card-header">
<h4>File: {{ file.path }}</h4>
</div>
<div class="card-body">
{{ file.content | format_yaml | safe }}
</div>
</div>
<br/>
<script>
$(document).ready(function () {
// Highlight the anchor line in file views
var hash = $(location).attr('hash');
$(hash).closest('span').addClass('hll');
// Refresh the highlighted line when clicking on a new line in file views
$('a').click(function () {
$("span.hll").removeClass('hll');
var hash = $(this).attr('href');
$(hash).closest('span').addClass('hll');
});
});
</script>
{% endblock %}