5
bak.examples/archive/Fes.toml
Normal file
5
bak.examples/archive/Fes.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
[app]
|
||||
|
||||
name = "archive"
|
||||
version = "0.0.1"
|
||||
authors = ["vx-clutch"]
|
||||
BIN
bak.examples/archive/archive/2025/seal.png
Normal file
BIN
bak.examples/archive/archive/2025/seal.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
8
bak.examples/archive/www/index.lua
Normal file
8
bak.examples/archive/www/index.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
local fes = require("fes")
|
||||
local site = fes.fes()
|
||||
|
||||
site.title = "archive"
|
||||
|
||||
site:h1("Hello, World!")
|
||||
|
||||
return site
|
||||
5
bak.examples/bus/Fes.toml
Normal file
5
bak.examples/bus/Fes.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
[app]
|
||||
|
||||
name = "bus"
|
||||
version = "0.0.1"
|
||||
authors = ["vx-clutch"]
|
||||
15
bak.examples/bus/www/index.lua
Normal file
15
bak.examples/bus/www/index.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
local fes = require("fes")
|
||||
local site = fes.fes()
|
||||
|
||||
site.title = "bus"
|
||||
site.copyright = fes.util.copyright("https://git.vxserver.dev/fSD/", "fSD")
|
||||
|
||||
site:h1("URL: " .. fes.bus.url)
|
||||
|
||||
local params = fes.bus.params
|
||||
|
||||
for key, val in pairs(params) do
|
||||
site:h2(key .. ": " .. val)
|
||||
end
|
||||
|
||||
return site
|
||||
5
bak.examples/canonical/Fes.toml
Normal file
5
bak.examples/canonical/Fes.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
[app]
|
||||
|
||||
name = "canonical"
|
||||
version = "0.0.1"
|
||||
authors = ["vx-clutch"]
|
||||
16
bak.examples/canonical/include/header.lua
Normal file
16
bak.examples/canonical/include/header.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
local header = {}
|
||||
|
||||
header.render = function(std)
|
||||
return table.concat({
|
||||
std.center(std.h1("Canonical")),
|
||||
std.center(table.concat({
|
||||
std.nav("example"),
|
||||
std.nav("example"),
|
||||
std.nav("example"),
|
||||
std.nav("example"),
|
||||
std.nav("example"),
|
||||
}))
|
||||
})
|
||||
end
|
||||
|
||||
return header
|
||||
17
bak.examples/canonical/www/404.lua
Normal file
17
bak.examples/canonical/www/404.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
local fes = require("fes")
|
||||
local std = fes.std
|
||||
local u = fes.util
|
||||
|
||||
local site = fes.fes()
|
||||
|
||||
site.title = "404 Page Not Found"
|
||||
site.copyright = u.copyright("https://git.vxserver.dev/fSD/", "fSD")
|
||||
|
||||
site:banner(std.h1(std.center("Canonical")))
|
||||
|
||||
site:note(table.concat({
|
||||
std.center(std.h1("404 Page Not Found")),
|
||||
std.center(std.p("The page you are looking for is not here. " .. std.a("/", "Go home?"))),
|
||||
}))
|
||||
|
||||
return site
|
||||
17
bak.examples/canonical/www/index.lua
Normal file
17
bak.examples/canonical/www/index.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
local fes = require("fes")
|
||||
local std = fes.std
|
||||
|
||||
local site = fes.fes()
|
||||
|
||||
site.title = "Canonical"
|
||||
site.copyright = fes.util.copyright("https://git.vxserver.dev/fSD", "fSD")
|
||||
|
||||
site:banner(fes.app.header.render(std))
|
||||
|
||||
site:note(table.concat({
|
||||
std.h1("Canonical"),
|
||||
std.p("This is the example for the canonical 'fes' site, by canonical is meant a format and " .. std.external("https://git.vxserver.dev/fSD/fes/src/branch/master/examples/canonical/www/index.lua", "code") .. " that resembles the typical use case of the Microframework"),
|
||||
std.p("This page also serves as a test for the integrity of a 'fes' build, given that it uses plenty crucial features to show everything from the HTML to CSS as well as the interactivity of certain elements."),
|
||||
}))
|
||||
|
||||
return site
|
||||
1
bak.examples/error/Fes.toml
Normal file
1
bak.examples/error/Fes.toml
Normal file
@@ -0,0 +1 @@
|
||||
dhasjkdhaskjdhaskhdajkshjk
|
||||
9
bak.examples/error/www/index.lua
Normal file
9
bak.examples/error/www/index.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
local fes = require("fes")
|
||||
local site = fes.fes()
|
||||
|
||||
site.title = "error"
|
||||
|
||||
UNIX is very simple
|
||||
GNU's Not UNIX
|
||||
|
||||
return site
|
||||
5
bak.examples/favicon/Fes.toml
Normal file
5
bak.examples/favicon/Fes.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
[app]
|
||||
|
||||
name = "favicon"
|
||||
version = "0.0.1"
|
||||
authors = ["vx-clutch"]
|
||||
BIN
bak.examples/favicon/static/image/favicon.ico
Normal file
BIN
bak.examples/favicon/static/image/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
9
bak.examples/favicon/www/index.lua
Normal file
9
bak.examples/favicon/www/index.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
local fes = require("fes")
|
||||
local site = fes.fes()
|
||||
|
||||
site.title = "favicon"
|
||||
site.favicon = "static/image/favicon.ico"
|
||||
|
||||
site:h1("Hello, World!")
|
||||
|
||||
return site
|
||||
5
bak.examples/hello-world/Fes.toml
Normal file
5
bak.examples/hello-world/Fes.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
[app]
|
||||
|
||||
name = "hello-world"
|
||||
version = "0.0.1"
|
||||
authors = ["vx-clutch"]
|
||||
9
bak.examples/hello-world/www/index.lua
Normal file
9
bak.examples/hello-world/www/index.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
local fes = require("fes")
|
||||
local site = fes.fes()
|
||||
|
||||
site.title = "Hello, World!"
|
||||
site.copyright = fes.util.copyright("https://git.vxserver.dev/fSD", "fSD")
|
||||
|
||||
site:h1("Hello, World!")
|
||||
|
||||
return site
|
||||
5
bak.examples/json/Fes.toml
Normal file
5
bak.examples/json/Fes.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
[app]
|
||||
|
||||
name = "json"
|
||||
version = "0.0.1"
|
||||
authors = ["vx-clutch"]
|
||||
34
bak.examples/json/www/index.lua
Normal file
34
bak.examples/json/www/index.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
local fes = require("fes")
|
||||
local site = fes.fes()
|
||||
|
||||
site.title = "JSON"
|
||||
site.copyright = fes.util.copyright("https://git.vxserver.dev/fSD", "fSD")
|
||||
|
||||
local json_pre = [[
|
||||
{
|
||||
"userId": 1,
|
||||
"id": 1,
|
||||
"title": "delectus aut autem",
|
||||
"completed": false
|
||||
}
|
||||
]]
|
||||
|
||||
local json = fes.middleware.json_decode(json_pre)
|
||||
|
||||
site:h1("JSON")
|
||||
|
||||
site:note(fes.util.cc({
|
||||
fes.std.h2("Before"),
|
||||
fes.std.code(json_pre),
|
||||
}))
|
||||
site:note(fes.util.cc({
|
||||
fes.std.h2("After"),
|
||||
fes.std.ul({
|
||||
json["userId"],
|
||||
json["id"],
|
||||
json["title"],
|
||||
json["completed"],
|
||||
})
|
||||
}))
|
||||
|
||||
return site
|
||||
5
bak.examples/multi-page/Fes.toml
Normal file
5
bak.examples/multi-page/Fes.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
[app]
|
||||
|
||||
name = "multi-page"
|
||||
version = "0.0.1"
|
||||
authors = ["vx-clutch"]
|
||||
16
bak.examples/multi-page/www/index.lua
Normal file
16
bak.examples/multi-page/www/index.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
local fes = require("fes")
|
||||
local site = fes.fes()
|
||||
|
||||
site.title = "Home"
|
||||
site.copyright = fes.util.copyright("https://git.vxserver.dev/fSD", "fSD")
|
||||
|
||||
site:h1("Home")
|
||||
site:note(
|
||||
fes.std.ul({
|
||||
fes.std.a("page1"),
|
||||
fes.std.a("page2"),
|
||||
fes.std.a("sub/subpage"),
|
||||
})
|
||||
)
|
||||
|
||||
return site
|
||||
15
bak.examples/multi-page/www/page1.lua
Normal file
15
bak.examples/multi-page/www/page1.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
local fes = require("fes")
|
||||
local site = fes.fes()
|
||||
|
||||
site.title = "Page 1"
|
||||
site.copyright = fes.util.copyright("https://git.vxserver.dev/fSD", "fSD")
|
||||
|
||||
site:h1("Page 1")
|
||||
site:note(
|
||||
fes.std.ul({
|
||||
fes.std.a("/", "home"),
|
||||
fes.std.a("page2"),
|
||||
})
|
||||
)
|
||||
|
||||
return site
|
||||
15
bak.examples/multi-page/www/page2.lua
Normal file
15
bak.examples/multi-page/www/page2.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
local fes = require("fes")
|
||||
local site = fes.fes()
|
||||
|
||||
site.title = "Page 2"
|
||||
site.copyright = fes.util.copyright("https://git.vxserver.dev/fSD", "fSD")
|
||||
|
||||
site:h1("Page 2")
|
||||
site:note(
|
||||
fes.std.ul({
|
||||
fes.std.a("/", "home"),
|
||||
fes.std.a("page1"),
|
||||
})
|
||||
)
|
||||
|
||||
return site
|
||||
14
bak.examples/multi-page/www/sub/subpage.lua
Normal file
14
bak.examples/multi-page/www/sub/subpage.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
local fes = require("fes")
|
||||
local site = fes.fes()
|
||||
|
||||
site.title = "Subpage"
|
||||
site.copyright = fes.util.copyright("https://git.vxserver.dev/fSD", "fSD")
|
||||
|
||||
site:h1("Subpage")
|
||||
site:note(
|
||||
fes.std.ul({
|
||||
fes.std.a("/", "Home"),
|
||||
})
|
||||
)
|
||||
|
||||
return site
|
||||
5
bak.examples/simple/Fes.toml
Normal file
5
bak.examples/simple/Fes.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
[app]
|
||||
|
||||
name = "simple"
|
||||
version = "0.0.1"
|
||||
authors = ["vx-clutch"]
|
||||
1
bak.examples/simple/www/index.lua
Normal file
1
bak.examples/simple/www/index.lua
Normal file
@@ -0,0 +1 @@
|
||||
return "Hello, World!"
|
||||
5
bak.examples/static/Fes.toml
Normal file
5
bak.examples/static/Fes.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
[app]
|
||||
|
||||
name = "static"
|
||||
version = "0.0.1"
|
||||
authors = ["vx-clutch"]
|
||||
1
bak.examples/static/static/foo
Normal file
1
bak.examples/static/static/foo
Normal file
@@ -0,0 +1 @@
|
||||
this is some neat data
|
||||
8
bak.examples/static/www/index.lua
Normal file
8
bak.examples/static/www/index.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
local fes = require("fes")
|
||||
local site = fes.fes()
|
||||
|
||||
site.title = "static"
|
||||
|
||||
site:h1("Hello, World!")
|
||||
|
||||
return site
|
||||
Reference in New Issue
Block a user