c_simple_http/example_config/example.config
Stephen Seo 12a1edc897
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 20s
Allow nested {{{!IF}}}..., fixes
2024-11-18 20:10:45 +09:00

120 lines
2 KiB
Text

PATH=/
HTML='''
<html>
<head>
<style>
body {
color: #FFF;
background-color: #333;
}
a {
color: #AAF;
}
a:link {
color: #AAF;
}
a:visited {
color: #88B;
}
a:focus a:hover {
color: #DDF;
}
a:active {
color: #FFF;
}
</style>
</head>
<body>
<h1>Test HTML</h1><br>
<h2>{{{Var}}}</h2>
<h3><a href="/inner">To inner.</a></h3>
<h4>Tests:</h4><br>
{{{!IF ThisValue==false}}}
ThisValue is <b>false</b>.
<br>
{{{!IF ThisValue==false}}}
Nested0 ThisValue is <b>false</b>.
{{{!ELSEIF ThisValue==true}}}
Nested0 ThisValue is <b>true</b>.
{{{!ELSE}}}
Nested0 ThisValue is invalid.
{{{!ENDIF}}}
{{{!ELSEIF ThisValue==true}}}
ThisValue is <b>true</b>.
<br>
{{{!IF ThisValue==false}}}
Nested1 ThisValue is <b>false</b>.
{{{!ELSEIF ThisValue==true}}}
Nested1 ThisValue is <b>true</b>.
{{{!ELSE}}}
Nested1 ThisValue is invalid.
{{{!ENDIF}}}
{{{!ELSE}}}
ThisValue is invalid.
<br>
{{{!IF ThisValue==false}}}
Nested2 ThisValue is <b>false</b>.
{{{!ELSEIF ThisValue==true}}}
Nested2 ThisValue is <b>true</b>.
{{{!ELSE}}}
Nested2 ThisValue is invalid.
{{{!ENDIF}}}
{{{!ENDIF}}}
<h4>Array Value:</h4><br>
{{{!INDEX ArrayValue[2]}}}
{{{!INDEX ArrayValue[0]}}}
{{{!INDEX ArrayValue[1]}}}
</body>
'''
Var='''Test var value'''
ThisValue=derp
ArrayValue=One_IDX_Zero
ArrayValue=Two_IDX_One
ArrayValue=Three_IDX_Two
PATH=/inner
HTML_FILE='''example_config/inner.html'''
VAR_FILE='''example_config/var.html'''
PATH=/error
PATH=/inner/further
HTML='''
<html>
<head>
<style>
body {
color: #FFF;
background-color: #333;
}
a {
color: #AAF;
}
a:link {
color: #AAF;
}
a:visited {
color: #88B;
}
a:focus a:hover {
color: #DDF;
}
a:active {
color: #FFF;
}
</style>
</head>
<body>
<h1>Nested inner: further<h1>
{{{VAR}}}
<br>
<img src="/silly.jpg" />
<br>
<a href="/inner">back</a>
</body>
</html>
'''
VAR='''yep'''