basic demo

basic.htex source file:
<!layout /.includes/layout.htex>
<article>
  <h2>basic demo</h2>
  <!method get>
    <form action="." method="post">
      <input type="text" name="username" placeholder="username">
      <input type="password" name="password" placeholder="password">
      <button type="submit">sign in</button>
    </form>
  <!method post>
    <p>Username <code>"<!data username>"</code></p>
    <p><a href=".">Go back</a></p>
  <!method any>
</article>
<article>
  <code>basic.htex</code> source file:
  <pre><code class="language-html"><!include-escaped basic.htex></code></pre>
</article>
htex - hypertext extruder

method layouts demo

here GET is handled with a default layout, and POST returns just a regular message (without layout):

reset (GET) // click here to POST

result: [text will be received here]

method-layouts.htex source file, using htmx library to generate a POST HTTP request:
<!method get>
  <!layout /.includes/layout.htex>
  <article>
    <h2>method layouts demo</h2>
    <p>here GET is handled with a default layout, and POST returns just a regular message (without layout):
    <p><a href=".">reset (GET)</a> // <a href="#" hx-target="#result" hx-post=".">click here to POST</a></p>
    <p>result: <code id="result">[text will be received here]</code></p>
  </article>
  <article>
    <code>method-layouts.htex</code> source file, using <a href="https://htmx.org">htmx</a> library to generate a POST HTTP request:
    <pre><code class="language-html"><!include-escaped method-layouts.htex></code></pre>
  </article>
<!method post>
  <strong>response from POST method (without layout)</strong>