Files
cpp-project-template/third_party/prometheus/3rdparty/civetweb/test/page4kepler.lp
tqcq c68893bace
Some checks failed
sm-rpc / build (Debug, aarch64-linux-gnu) (push) Failing after 29s
sm-rpc / build (Debug, arm-linux-gnueabihf) (push) Failing after 16s
sm-rpc / build (Debug, host.gcc) (push) Failing after 11s
sm-rpc / build (Debug, mipsel-linux-gnu) (push) Failing after 12s
sm-rpc / build (Release, aarch64-linux-gnu) (push) Failing after 11s
sm-rpc / build (Release, arm-linux-gnueabihf) (push) Failing after 11s
sm-rpc / build (Release, host.gcc) (push) Failing after 12s
sm-rpc / build (Release, mipsel-linux-gnu) (push) Failing after 16s
feat add spdlog
2025-08-22 18:22:57 +08:00

54 lines
1.3 KiB
Plaintext

<html><body>
<h1>Lua Pages syntax test</h1>
<h2>Intro</h2>
<p>This is a test for the
<a href="https://keplerproject.github.io/cgilua/manual.html#templates">Kepler Syntax of Lua Pages</a>,
served by the
<a href="https://github.com/civetweb/civetweb/">CivetWeb web server</a>.</p>
<p>
While the native CivetWeb syntax for Lua pages is
<code>&lt;? script ?&gt;</code> and <code>&lt;?= expression ?&gt;</code>,
the "Kepler syntax" uses <code>&lt;?lua chunk ?&gt;</code>, <code>&lt;?lua= expression ?&gt;</code>, <code>&lt;% chunk %&gt;</code> and <code>&lt;%= expression %&gt;</code>.
</p>
<h2>Tags</h2>
<code>
&lt;? greeting = 'CiwetWeb' ?&gt;<br/>
&lt;strong&gt;&lt;?= greeting %&gt;&lt;/strong&gt;<br/>
</code><br/>
<? greeting = 'CiwetWeb' ?>
==> <strong><?= greeting ?></strong><br/>
<br/>
<code>
&lt;?lua greeting = 'Kepler' ?&gt;<br/>
&lt;strong&gt;&lt;?lua= greeting ?&gt;&lt;/strong&gt;<br/>
</code><br/>
<?lua greeting = 'Kepler' ?>
==> <strong><?lua= greeting ?></strong><br/>
<br/>
<code>
&lt;% greeting = 'Kepler %' ?&gt;<br/>
&lt;strong&gt;&lt;%= greeting %&gt;&lt;/strong&gt;<br/>
</code><br/>
<% greeting = 'Kepler %' %>
==> <strong><%= greeting %></strong><br/>
<h2>Loops</h2>
<ul>
<% for key, value in pairs(mg.request_info) do %>
<li><%= key %>: <%= value %></li>
<% end %>
</ul>
</body></html>