mirror of
https://onedev.site.tesses.net/crosslang/crosslangextras
synced 2026-02-08 17:15:45 +00:00
Change to onedev
This commit is contained in:
2
Templates/web/.crossarchiveignore
Normal file
2
Templates/web/.crossarchiveignore
Normal file
@@ -0,0 +1,2 @@
|
||||
bin
|
||||
obj
|
||||
3
Templates/web/components/counter.tcrml
Normal file
3
Templates/web/components/counter.tcrml
Normal file
@@ -0,0 +1,3 @@
|
||||
<?component() name="Counter" ?>
|
||||
<p>Count is <?expr count++ ?></p>
|
||||
<?end?>
|
||||
36
Templates/web/components/shell.tcrml
Normal file
36
Templates/web/components/shell.tcrml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?resource name="simple.min.css" route="/css/simple.min.css" ?>
|
||||
<?resource name="favicon.ico" route="/favicon.ico" ?>
|
||||
<?component(title,pages,body) name="Shell" ?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>%PROJECT_NAME% - <?expr Net.Http.HtmlEncode(title) ?></title>
|
||||
<link rel="stylesheet" href="./css/simple.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>%PROJECT_NAME%</h1>
|
||||
<nav>
|
||||
<ul>
|
||||
<?code
|
||||
each(var item : pages)
|
||||
{
|
||||
?>
|
||||
<li><a <?code if(item.active) { ?> aria-current="page" <?code } ?> href="<?expr Net.Http.UrlPathEncode(item.route) ?>"><?expr Net.Http.HtmlEncode(item.text) ?></a></li>
|
||||
<?code
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
<h1><?expr Net.Http.HtmlEncode(title) ?></h1>
|
||||
<?body?>
|
||||
<?end?>
|
||||
<footer>
|
||||
<p>Created using <a href="https://crosslang.tesseslanguage.com/">CrossLang</a> and <a href="https://simplecss.org/">SimpleCSS</a></p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
<?end?>
|
||||
23
Templates/web/cross.json
Normal file
23
Templates/web/cross.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "Tesses.CrossLang.Template.Website",
|
||||
"version": "1.0.0.0-prod",
|
||||
"info": {
|
||||
"maintainer": "Mike Nolan",
|
||||
"type": "template",
|
||||
"repo": "https://onedev.site.tesses.net/CrossLang/CrossLangExtras",
|
||||
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||
"license": "MIT",
|
||||
"template_name": "web",
|
||||
"template_info": {
|
||||
"type": "console"
|
||||
},
|
||||
"template_project_dependencies": [
|
||||
{
|
||||
"name": "Tesses.CrossLang.Markup",
|
||||
"version": "1.0.0.0-prod"
|
||||
}
|
||||
],
|
||||
"template_extra_text_ftles": ["/components/shell.tcrml"],
|
||||
"template_ignored_files": ["bin","obj"]
|
||||
}
|
||||
}
|
||||
28
Templates/web/pages/about.tcrml
Normal file
28
Templates/web/pages/about.tcrml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?page() route="/about" ?>
|
||||
<?code
|
||||
var pages = [
|
||||
{
|
||||
active = false,
|
||||
route = "/",
|
||||
text = "Home"
|
||||
},
|
||||
{
|
||||
active = false,
|
||||
route = "/counter",
|
||||
text = "Counter"
|
||||
},
|
||||
{
|
||||
active = true,
|
||||
route = "/about",
|
||||
text = "About"
|
||||
}
|
||||
];
|
||||
?>
|
||||
<?Shell?>
|
||||
<?arg "About Me" ?>
|
||||
<?arg pages ?>
|
||||
<?arg_component() ?>
|
||||
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Laboriosam possimus nisi ab nobis magni, error minus vero neque iusto beatae, quasi nostrum. Ut repudiandae expedita reprehenderit tenetur. Sunt, adipisci cumque!</p>
|
||||
<?end?>
|
||||
<?end?>
|
||||
<?end?>
|
||||
29
Templates/web/pages/counter.tcrml
Normal file
29
Templates/web/pages/counter.tcrml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?page() route="/counter" ?>
|
||||
<?code
|
||||
var pages = [
|
||||
{
|
||||
active = false,
|
||||
route = "/",
|
||||
text = "Home"
|
||||
},
|
||||
{
|
||||
active = true,
|
||||
route = "/counter",
|
||||
text = "Counter"
|
||||
},
|
||||
{
|
||||
active = false,
|
||||
route = "/about",
|
||||
text = "About"
|
||||
}
|
||||
];
|
||||
?>
|
||||
<?Shell?>
|
||||
<?arg "Counter" ?>
|
||||
<?arg pages ?>
|
||||
<?arg_component() ?>
|
||||
<?Counter ?>
|
||||
<?end?>
|
||||
<?end?>
|
||||
<?end?>
|
||||
<?end?>
|
||||
28
Templates/web/pages/index.tcrml
Normal file
28
Templates/web/pages/index.tcrml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?page() route="/" ?>
|
||||
<?code
|
||||
var pages = [
|
||||
{
|
||||
active = true,
|
||||
route = "/",
|
||||
text = "Home"
|
||||
},
|
||||
{
|
||||
active = false,
|
||||
route = "/counter",
|
||||
text = "Counter"
|
||||
},
|
||||
{
|
||||
active = false,
|
||||
route = "/about",
|
||||
text = "About"
|
||||
}
|
||||
];
|
||||
?>
|
||||
<?Shell?>
|
||||
<?arg "Main Page" ?>
|
||||
<?arg pages ?>
|
||||
<?arg_component() ?>
|
||||
<p>1 John 4:4: You, dear children, are from God and have overcome them, because the one who is in you is greater than the one who is in the world.</p>
|
||||
<?end?>
|
||||
<?end?>
|
||||
<?end?>
|
||||
BIN
Templates/web/res/favicon.ico
Executable file
BIN
Templates/web/res/favicon.ico
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
1
Templates/web/res/simple.min.css
vendored
Normal file
1
Templates/web/res/simple.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
5
Templates/web/src/program.tcross
Normal file
5
Templates/web/src/program.tcross
Normal file
@@ -0,0 +1,5 @@
|
||||
var count = 0;
|
||||
func main(args)
|
||||
{
|
||||
Net.Http.ListenSimpleWithLoop(Router,4206);
|
||||
}
|
||||
Reference in New Issue
Block a user