-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from z9fr/feature/develop/htmx-support
feat: added hidden email and fix issue with result cache
- Loading branch information
Showing
4 changed files
with
39 additions
and
11 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
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
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
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 |
---|---|---|
|
@@ -135,14 +135,16 @@ pub fn base(title: Option<&str>, styles: Option<&str>, content: Markup) -> Marku | |
div.indeterminate style="background-color: #ff2e88;"{} | ||
} | ||
|
||
input name="bustCache" value={(*CACHEBUSTER)} type="hidden" {} | ||
|
||
body.snow.hack.dark-grey hx-ext="preload" hx-indicator=".progress" { | ||
.container { | ||
br; | ||
|
||
header { | ||
nav { | ||
div hx-boost="true" hx-push-url="true" hx-swap="innerHTML" hx-target=".snowframe" { | ||
a.logo href="/" { "> z9fr@blog:~$" } | ||
div hx-boost="true" hx-swap="innerHTML" hx-target=".snowframe" hx-include="[name='bustCache']" { | ||
a.logo href="/" hx-push-url="/" { "> z9fr@blog:~$" } | ||
} | ||
} | ||
} | ||
|
@@ -155,15 +157,15 @@ pub fn base(title: Option<&str>, styles: Option<&str>, content: Markup) -> Marku | |
} | ||
hr; | ||
footer { | ||
div hx-boost="true" hx-push-url="true" hx-swap="innerHTML" hx-target=".snowframe" { | ||
div hx-boost="true" hx-include="[name='bustCache']" hx-swap="innerHTML" hx-target=".snowframe" { | ||
nav { | ||
a href="/" preload{ "Home" } | ||
a href="/" hx-push-url="/" { "Home" } | ||
" - " | ||
a href="/blog" preload{ "Blog" } | ||
a href="/blog" hx-push-url="/blog" { "Blog" } | ||
" - " | ||
a href="/contact" preload { "Contact" } | ||
a href="/contact" hx-push-url="/contact" { "Contact" } | ||
" - " | ||
a href="/stack" preload{ "Uses" } | ||
a href="/stack" hx-push-url="/stack" { "Uses" } | ||
} | ||
} | ||
|
||
|
@@ -179,6 +181,12 @@ pub fn base(title: Option<&str>, styles: Option<&str>, content: Markup) -> Marku | |
} | ||
} | ||
|
||
pub fn email_address() -> Markup { | ||
return html!( | ||
a href={"mailto:[email protected]"} {"[email protected]"} | ||
); | ||
} | ||
|
||
pub fn contact(links: &Vec<Link>, is_partial: bool) -> Markup { | ||
let markup = html! { | ||
h1 {"Contact Information"} | ||
|
@@ -189,7 +197,11 @@ pub fn contact(links: &Vec<Link>, is_partial: bool) -> Markup { | |
.grid { | ||
.cell."-6of12" { | ||
h3 {"Email"} | ||
a href={"mailto:[email protected]"} {"[email protected]"} | ||
|
||
button."btn btn-default btn-ghost" hx-indicator="#spinner" hx-post="/email" hx-swap="outerHTML" { | ||
"View email address" span.loading id="spinner" style="display:none;"{} | ||
}; | ||
|
||
br; | ||
br; | ||
|
||
|