testing script and source
This commit is contained in:
5
test/complex_sample_project/Fes.toml
Normal file
5
test/complex_sample_project/Fes.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
[app]
|
||||
|
||||
name = "best"
|
||||
version = "0.0.1"
|
||||
authors = ["vx-clutch"]
|
||||
23
test/complex_sample_project/README.md
Normal file
23
test/complex_sample_project/README.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# best
|
||||
|
||||
This is an example of best practices for the Fes framework.
|
||||
|
||||
## Parts
|
||||
|
||||
With best practice we can break our sites into a few parts.
|
||||
|
||||
## Index
|
||||
|
||||
The main page of the site loads in the header and the footer, as well as shows
|
||||
some core information
|
||||
|
||||
## Include
|
||||
|
||||
Within include the header and footer are defined.
|
||||
|
||||
* **Header:** Site navigation and name display
|
||||
* **Footer:** Extra and external information.
|
||||
|
||||
## Static
|
||||
|
||||
This is where we store our favicon.
|
||||
13
test/complex_sample_project/include/footer.lua
Normal file
13
test/complex_sample_project/include/footer.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
local footer = {}
|
||||
|
||||
footer.render = function(std)
|
||||
return table.concat({
|
||||
std.h2("Other resources"),
|
||||
std.tl({
|
||||
std.external("https://git.vxserver.dev/fSD/fes", "Fes source"),
|
||||
std.external("https://docs.vxserver.dev/static/fes.html", "Documentation"),
|
||||
}),
|
||||
})
|
||||
end
|
||||
|
||||
return footer
|
||||
7
test/complex_sample_project/include/header.lua
Normal file
7
test/complex_sample_project/include/header.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
local header = {}
|
||||
|
||||
header.render = function(std)
|
||||
return std.center(std.ha("/", std.h1("Best Practices")))
|
||||
end
|
||||
|
||||
return header
|
||||
BIN
test/complex_sample_project/static/favicon.ico
Normal file
BIN
test/complex_sample_project/static/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
20
test/complex_sample_project/www/index.lua
Normal file
20
test/complex_sample_project/www/index.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
local fes = require("fes")
|
||||
local std = fes.std
|
||||
local u = fes.util
|
||||
|
||||
local site = fes.fes()
|
||||
|
||||
site.copyright = fes.util.copyright("https://fsd.vxserver.dev", "fSD")
|
||||
site.title = "Best practices"
|
||||
site.favicon = "/static/favicon.ico"
|
||||
|
||||
site:banner(fes.app.header.render(std))
|
||||
|
||||
site:note(u.cc {
|
||||
std.h2("Hello, World!"),
|
||||
std.p("This is an example of the best practices/canonical Fes site.")
|
||||
})
|
||||
|
||||
site:note(fes.app.footer.render(std))
|
||||
|
||||
return site
|
||||
Reference in New Issue
Block a user