alpha commit

This commit is contained in:
2025-11-29 08:35:09 -05:00
parent 54838d85a7
commit 12c4d3c46e
14 changed files with 340 additions and 2 deletions

View File

@@ -0,0 +1,25 @@
local fes = require("fes")
local std = fes.std
local u = fes.util
local site = fes.fes()
local title = "Free Software Distributions"
site.title = title .. "- About"
site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD")
site:banner(fes.app.header.render(std))
site:note(u.cc({
std.h2("Free Software Distributions"),
std.p("Free Software Distributions are a collection of free, minimal, and hackable packages desinged for the similar developer: someone who values freedom in software and a partition from corporation.")
}))
site:note(u.cc({
std.h2("Copyright and License"),
std.p("Except where otherwise stated, content on this site is copyright (C) 2025 by fSD and is made avaliable to you under the " .. fes.std.a("https://creativecommons.org/licenses/by-nc/4.0/", "Creative Commons Attribtuion-NonCommerical 4.0 International"))
}))
site:note(fes.app.footer.render(std))
return site

View File

@@ -0,0 +1,27 @@
local fes = require("fes")
local std = fes.std
local u = fes.util
local site = fes.fes()
local title = "Free Software Distributions"
site.title = title .. "- FAQ"
site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD")
site:banner(fes.app.header.render(std))
site:note(u.cc({
std.h1("Frequently Asked Questions"),
std.p("Welcome to the world of fSD, come here ye before thou ask thy stupid questions."),
std.h2("Why is it called fSD?"),
std.p([[
The name "Free Software Distributions" is dervided from exactly what we do, we distribute free software.
This name stems from the Berkeley Software Distribution (BSD) specifically the Software Distribution part.
]]),
std.p('It is worth pointing out that the word "free" is being used in two ways here: one meaning "at no cost" and the other meaning "do whatever you like".'),
}))
site:note(fes.app.footer.render(std))
return site

View File

@@ -0,0 +1,28 @@
local fes = require("fes")
local std = fes.std
local u = fes.util
local site = fes.fes()
local title = "Free Software Distributions"
site.title = title
site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD")
site:banner(fes.app.header.render(std))
site:note(std.blockquote([[
"UNIX is very simple" - Dennis Ritchie
<br>
"GNU's Not UNIX" - Richard Stallman
]] ))
site:note(u.cc({
std.h2("Daily Random Snippet"),
std.p("The following is a random code snippet that features a unique feature or syntax."),
std.blockquote(std.pre(fes.app.snippet.daily_random())),
}))
site:note(fes.app.footer.render(std))
return site

View File

@@ -0,0 +1,62 @@
local fes = require("fes")
local std = fes.std
local u = fes.util
local site = fes.fes()
local title = "Free Software Distributions"
site.title = title .. " - Site news"
site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD")
site:banner(fes.app.header.render(std))
local articles_dir = "article"
local files = {}
local p = io.popen("ls -1 " .. articles_dir)
if p then
for file in p:lines() do
if file:match("%.md$") then
files[#files + 1] = file
end
end
p:close()
end
table.sort(files, function(a, b) return a > b end)
local news_html = {}
local news_titles = {}
for _, file in ipairs(files) do
local path = articles_dir .. "/" .. file
local f = io.open(path, "r")
if f then
local content = f:read("*a")
f:close()
news_html[#news_html + 1] = fes.markdown_to_html(content)
local title_line = content:match("^#+%s*(.-)%s*\n") or ""
news_titles[#news_titles + 1] = std.h3(title_line)
end
end
site:note(u.cc({
std.h1("Site news - Latest"),
std.blockquote(std.p(news_html[1] or "")),
}))
local other_titles = {}
for i = 2, #news_titles do
other_titles[#other_titles + 1] = news_titles[i]
end
site:note(u.cc({
std.center(std.h2("Other")),
table.concat(other_titles, "")
}))
site:note(fes.app.footer.render(std))
return site

View File

@@ -0,0 +1,44 @@
local fes = require("fes")
local std = fes.std
local u = fes.util
local site = fes.fes()
local title = "Free Software Distributions"
site.title = title .. " - Random Article"
site:banner(std.center(std.h3(std.a("javascript:window.history.back();", "Return"))))
math.randomseed(os.time())
local articles_dir = "article"
local files = {}
local p = io.popen("ls -1 " .. articles_dir)
if p then
for file in p:lines() do
if file:match("%.md$") then
files[#files + 1] = file
end
end
p:close()
end
local chosen = files[math.random(#files or 1)]
local content = ""
if chosen then
local f = io.open(articles_dir .. "/" .. chosen, "r")
if f then
content = f:read("*a")
f:close()
end
end
local html = fes.markdown_to_html(content or "")
site:note(u.cc({
std.div(html)
}))
return site

View File

@@ -0,0 +1,27 @@
local fes = require("fes")
local std = fes.std
local u = fes.util
local site = fes.fes()
local title = "Free Software Distributions"
site.title = title .. "- FAQ"
site.copyright = u.copyright("https://git.vxserver.dev/fSD", "fSD")
site:banner(fes.app.header.render(std))
site:note(u.cc({
std.h1("Frequently Asked Questions"),
std.p("Welcome to the world of fSD, come here ye before thou ask thy stupid questions."),
std.h2("Why is it called fSD?"),
std.p([[
The name "Free Software Distributions" is dervided from exactly what we do, we distribute free software.
This name stems from the Berkeley Software Distribution (BSD) specifically the Software Distribution part.
]]),
std.p('It is worth pointing out that the word "free" is being used in two ways here: one meaning "at no cost" and the other meaning "do whatever you like".'),
}))
site:note(fes.app.footer.render(std))
return site