40
|
1 local Luan = require "luan:Luan.luan"
|
|
2 local error = Luan.error
|
|
3 local pairs = Luan.pairs or error()
|
|
4 local Io = require "luan:Io.luan"
|
|
5 local Http = require "luan:http/Http.luan"
|
|
6 local Shared = require "site:/lib/Shared.luan"
|
|
7 local head = Shared.head or error()
|
|
8 local header = Shared.header or error()
|
|
9
|
|
10
|
|
11 local content = {
|
|
12 intro = {
|
|
13 title = "Introduction"
|
|
14 content = function()
|
|
15 %>
|
|
16 <p>Learning reactionary programming will give you a deep understanding of programming and will enable to you to write your own programs and websites. However this is not enough to get a job with modern scum (members of depraved modern culture). Modern scum will expect you to use tools popular with them, so you would have to learn one of those. Probably the least horrible programming tool used by modern scum is <a href="python.html">Python</a>, so I would recommend learning that if you want a job.</p>
|
|
17
|
|
18 <p>I will develop this course incrementally based on demand. Whenever anyone completes the content here, I will add another lesson/section. This way I won't waste my time writing content that no one will use.</p>
|
|
19
|
|
20 <p>This course will be designed for you to learn reactionary programming in a logical sequence. I will focus on finding relevant resources, and I will only write explanations when nothing else is available on the subject. I will focus on web development since that is what I know best.</p>
|
|
21
|
|
22 <p>I will often say "Do X" without saying how to do X. A big part of programming is figuring out how to do things. Your two main resources are Google and ChatGPT. If you get stuck, you can ask me <a href="https://discord.gg/Qdcgvm3aAq">on Discord</a>.</p>
|
|
23
|
|
24 <p>ChatGPT has become an essential programming tool. So the only task for this lesson is to play with ChatGPT. Later you can ask it technical questions.</p>
|
|
25 <%
|
|
26 end
|
|
27 }
|
|
28 editor = {
|
|
29 title = "Text Editor and JSON"
|
|
30 content = function()
|
|
31 %>
|
|
32 <p>later</p>
|
|
33 <%
|
|
34 end
|
|
35 }
|
|
36 }
|
|
37
|
|
38
|
|
39 local function show_toc(content)
|
|
40 %>
|
|
41 <ul>
|
|
42 <%
|
|
43 for id, info in pairs(content) do
|
|
44 %>
|
|
45 <li><a id="c_<%=id%>" href="#<%=id%>"><%=info.title%></a></li>
|
|
46 <%
|
|
47 end
|
|
48 %>
|
|
49 </ul>
|
|
50 <%
|
|
51 end
|
|
52
|
|
53 local function show_content(content,h)
|
|
54 for id, info in pairs(content) do
|
|
55 %>
|
|
56 <div heading>
|
|
57 <h<%=h%>><a id="<%=id%>" href="#<%=id%>"><%=info.title%></a></h<%=h%>>
|
|
58 <a href="#c_<%=id%>">contents</a>
|
|
59 </div>
|
|
60 <%
|
|
61 info.content()
|
|
62 end
|
|
63 end
|
|
64
|
|
65 return function()
|
|
66 Io.stdout = Http.response.text_writer()
|
|
67 %>
|
|
68 <!doctype html>
|
|
69 <html>
|
|
70 <head>
|
|
71 <% head() %>
|
|
72 <title>Learn Reactionary Programming</title>
|
|
73 <style>
|
|
74 div[toc] ul {
|
|
75 list-style-type: none;
|
|
76 }
|
|
77 div[toc] > ul {
|
|
78 padding-left: 0;
|
|
79 }
|
|
80 div[toc] > ul > li {
|
|
81 margin-bottom: 16px;
|
|
82 }
|
|
83 div[heading] {
|
|
84 display: flex;
|
|
85 justify-content: space-between;
|
|
86 margin-top: 36px;
|
|
87 }
|
|
88 div[heading] > * {
|
|
89 margin: 0;
|
|
90 }
|
|
91 div[heading] > a {
|
|
92 font-size: 14px;
|
|
93 }
|
|
94 </style>
|
|
95 </head>
|
|
96 <body>
|
|
97 <% header() %>
|
|
98 <div content>
|
|
99 <h1><a href="learn.html">Learn Reactionary Programming</a></h1>
|
|
100 <hr>
|
|
101 <h2>Contents</h2>
|
|
102 <div toc>
|
|
103 <% show_toc(content) %>
|
|
104 </div>
|
|
105 <hr>
|
|
106 <% show_content(content,2) %>
|
|
107 </div>
|
|
108 </body>
|
|
109 </html>
|
|
110 <%
|
|
111 end
|