view src/index.html.luan @ 66:2ff1f78bb13e

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 22 Aug 2025 07:25:35 -0600
parents 7c31604ce3fc
children
line wrap: on
line source

local Luan = require "luan:Luan.luan"
local error = Luan.error
local Io = require "luan:Io.luan"
local Http = require "luan:http/Http.luan"
local Shared = require "site:/lib/Shared.luan"
local head = Shared.head or error()
local header = Shared.header or error()
local User = require "site:/lib/User.luan"
local current_user = User.current or error()


return function()
	local user = current_user()
	Io.stdout = Http.response.text_writer()
%>
<!doctype html>
<html lang="en">
	<head>
<%		head() %>
	</head>
	<body>
<%		header() %>
		<div content>
			<h1>Lang</h1>
<%	if user == nil then %>
				<p><a href="login.html">Register / Login</a> to use this.</p>
<%	else %>
				<p><a href="chats.html">See your chats</a></p>
<%	end %>
			<p>This is an AI language learning website.  You can design your own courses by giving instructions to AI.</p>

			<p>Developing good courses requires some effort.  You can use the English course "Course Design" to have AI help you design the course.  Each chat has an ID which you can get from the URL.  So if you have a chat using your course, then in a "Course Design" chat you can tell AI the chat ID and it can then read the chat and then you can discuss the chat with the AI.</p>

			<p>This website is under development - not ready for serious use.  But I can add whatever is needed.  Discuss this site with me on <a href="https://discord.gg/Hn8ZbePwaj">Discord</a>.</p>

			<p>This is <a href="https://hg.reactionary.software/repo/lang/">open source</a>.</p>

			<p>More later...</p>
		</div>
	</body>
</html>
<%
end