mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-02 07:21:05 +00:00
use sinon filters rather than a layout hack
This commit is contained in:
parent
b96b9e3e32
commit
5806ce8852
@ -8,11 +8,6 @@
|
|||||||
<script src="https://unpkg.com/prismjs@1.20.0/plugins/autoloader/prism-autoloader.min.js"></script>
|
<script src="https://unpkg.com/prismjs@1.20.0/plugins/autoloader/prism-autoloader.min.js"></script>
|
||||||
<script src="/js/htmx.js"></script>
|
<script src="/js/htmx.js"></script>
|
||||||
<script>
|
<script>
|
||||||
htmx.logger = function(elt, event, data) {
|
|
||||||
if(console) {
|
|
||||||
//console.log(event, elt, data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
htmx.onLoad(function(){
|
htmx.onLoad(function(){
|
||||||
Prism.highlightAll();
|
Prism.highlightAll();
|
||||||
})
|
})
|
||||||
@ -23,11 +18,7 @@
|
|||||||
<div class="c">
|
<div class="c">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="2 col">
|
<div class="2 col">
|
||||||
{% if page.url.indexOf("/examples/") == 0 %}
|
<span hx-get="/" hx-target="body" hx-push-url="true" class="logo light"><<a>/</a>> htm<a>x</a></span>
|
||||||
<span onclick="document.location = '/';" class="logo light"><<a>/</a>> htm<a>x</a></span>
|
|
||||||
{% else %}
|
|
||||||
<span hx-get="/" hx-target="body" hx-push-url="true" class="logo light"><<a>/</a>> htm<a>x</a></span>
|
|
||||||
{% endif %}
|
|
||||||
<svg onclick="document.getElementById('nav').classList.toggle('show')" class="hamburger" viewBox="0 0 100 80" width="25" height="25" style="margin-bottom:-5px">
|
<svg onclick="document.getElementById('nav').classList.toggle('show')" class="hamburger" viewBox="0 0 100 80" width="25" height="25" style="margin-bottom:-5px">
|
||||||
<rect width="100" height="20" style="fill:rgb(52, 101, 164)" rx="10"></rect>
|
<rect width="100" height="20" style="fill:rgb(52, 101, 164)" rx="10"></rect>
|
||||||
<rect y="30" width="100" height="20" style="fill:rgb(52, 101, 164)" rx="10"></rect>
|
<rect y="30" width="100" height="20" style="fill:rgb(52, 101, 164)" rx="10"></rect>
|
||||||
|
@ -8,6 +8,10 @@ server.getHTTPMethod = function(xhr) {
|
|||||||
}
|
}
|
||||||
server.autoRespond = true;
|
server.autoRespond = true;
|
||||||
server.autoRespondAfter = 300;
|
server.autoRespondAfter = 300;
|
||||||
|
server.xhr.useFilters = true;
|
||||||
|
server.xhr.addFilter(function (method, url, async, username, password){
|
||||||
|
return url === "/";
|
||||||
|
})
|
||||||
|
|
||||||
//====================================
|
//====================================
|
||||||
// Request Handling
|
// Request Handling
|
||||||
|
Loading…
x
Reference in New Issue
Block a user