-
-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated instant_search_with_htmx sample with use of blocks layout of …
…templatepro 0.7.0
- Loading branch information
1 parent
34238a4
commit c2ed034
Showing
5 changed files
with
1,109 additions
and
654 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
samples/instant_search_with_htmx/bin/templates/baselayout.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Books Search</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css" /> | ||
<script src="https://cdn.jsdelivr.net/npm/htmx.org/dist/htmx.min.js"></script> | ||
{{block "headers"}}{{endblock}} | ||
</head> | ||
<body hx-indicator="#spinner"> | ||
<section class="section" > | ||
{{block "body"}}{{endblock}} | ||
</section> | ||
|
||
<div class="content has-text-centered"> | ||
<p> | ||
<strong><a href="https://github.com/danieleteti/templatepro">TemplatePRO</a> {{""|version}}</strong> by <a href="https://www.danieleteti.it">Daniele Teti</a>. | ||
|
||
The source code is licensed <a href="https://github.com/danieleteti/templatepro?tab=Apache-2.0-1-ov-file#readme">Apache 2.0</a>. | ||
</p> | ||
</div> | ||
</body> | ||
</html> |
40 changes: 15 additions & 25 deletions
40
samples/instant_search_with_htmx/bin/templates/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Books Search</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css" /> | ||
<script src="https://cdn.jsdelivr.net/npm/htmx.org/dist/htmx.min.js"></script> | ||
</head> | ||
<body hx-indicator="#spinner"> | ||
<section class="section" > | ||
<div class="columns"> | ||
<div class="column is-one-third is-offset-one-third"> | ||
<input type="text" class="input" placeholder="Search" name="query" hx-get="/search" | ||
hx-trigger="keyup changed delay:500ms" hx-target="#results" hx-push-url="true" /> | ||
</div> | ||
<div class="column is-one-third"> | ||
<p class="subtitle is-6">⭐ DMVCFramework + HTMX :: Instant Search Demo ⭐</p> | ||
</div> | ||
</div> | ||
<progress id="spinner" class="htmx-indicator progress is-large is-info" max="100">ciao</progress> | ||
<div id="results">{{include "search_results.html"}}</div> | ||
</section> | ||
</body> | ||
</html> | ||
{{extends "baselayout.html"}} | ||
{{block "body"}} | ||
<div class="columns"> | ||
<div class="column is-one-third is-offset-one-third"> | ||
<input type="text" class="input" placeholder="Search" name="q" hx-get="/search" | ||
value="{{""|query,"q"}}" | ||
hx-trigger="load, keyup changed delay:500ms" hx-target="#results"/> | ||
</div> | ||
<div class="column is-one-third"> | ||
<p class="subtitle is-6">⭐ DMVCFramework + HTMX :: Instant Search Demo ⭐</p> | ||
</div> | ||
</div> | ||
<progress id="spinner" class="htmx-indicator progress is-large is-info" max="100">ciao</progress> | ||
<div id="results"></div> | ||
{{endblock}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.