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
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{{ .PageTitle }}</title>
<link rel="stylesheet" href="/static/css/bootstrap-normalized.css">
<link rel="stylesheet" href="/static/css/style.css">
<link rel="stylesheet" href="/static/css/tagify.css">
<style>
.tagify--outside{
border: 0;
}
.tagify--outside .tagify__input{
order: -1;
flex: 100%;
border: 1px solid var(--tags-border-color);
margin-bottom: 1em;
transition: .1s;
}
.tagify--outside .tagify__input:hover{ border-color:var(--tags-hover-border-color); }
.tagify--outside.tagify--focus .tagify__input{
transition:0s;
border-color: var(--tags-focus-border-color);
}
.tagify__input { border-radius: 4px; margin: 0; padding: 10px 12px; }
</style>
<link href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Titillium+Web:700|Source+Serif+Pro:400,700|Merriweather+Sans:400,700|Source+Sans+Pro:400,300,600,700,300italic,400italic,600italic,700italic" rel="stylesheet" type="text/css">
</head>
<body hx-ext="head-support">
<nav class="navbar navbar-light">
<div class="container">
<a class="navbar-brand"
href="/"
hx-push-url="/"
hx-get="/htmx/home"
hx-target="#app-body">Projecty</a>
{{ template "components/navbar" . }}
</div>
</nav>
<div id="app-body">
{{ embed }}
</div>
<footer>
<div class="container">
<a href="/" class="logo-font">Projecty</a>
<span class="attribution">
An interactive personal project development and sharing website.
</span>
</div>
</footer>
<div id="htmx-redirect"></div>
<script src="/static/js/tagify.js"></script>
<script src="/static/js/htmx.js"></script>
<script src="/static/js/htmx-head-support.js"></script>
<script>
var isTagify = null;
window.addEventListener('DOMContentLoaded', function() {
renderTagify();
});
document.body.addEventListener("htmx:afterSwap", function(evt) {
renderTagify();
});
function renderTagify() {
const input = document.querySelector('input[name=tags]');
const tagify = document.querySelector('tags[class="tagify form-control tagify--outside"]');
if (input && !tagify) {
new Tagify(input, {
whitelist: [],
dropdown: {
position: "input",
enabled : 0 // always opens dropdown when input gets focus
}
})
}
}
</script>
</body>
</html>
|