diff options
author | Alexander M Pickering <alex@cogarr.net> | 2024-12-21 23:17:52 -0600 |
---|---|---|
committer | Alexander M Pickering <alex@cogarr.net> | 2024-12-21 23:17:52 -0600 |
commit | 6411bc31d00efda1fb22a2b3ec23eaed5b7f22e4 (patch) | |
tree | b79eaca4ceec88f569ad0827323d0ca19354a698 | |
parent | d6233646bdfc0119ce528c206dbacc69ef28942e (diff) | |
download | website-6411bc31d00efda1fb22a2b3ec23eaed5b7f22e4.tar.gz website-6411bc31d00efda1fb22a2b3ec23eaed5b7f22e4.tar.bz2 website-6411bc31d00efda1fb22a2b3ec23eaed5b7f22e4.zip |
Make site look better on mobile
-rw-r--r-- | html/index.html | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/html/index.html b/html/index.html index 48c86bf..494ce50 100644 --- a/html/index.html +++ b/html/index.html | |||
@@ -1,15 +1,22 @@ | |||
1 | <html lang=en> | 1 | <!DOCTYPE html> |
2 | <html lang="en"> | ||
2 | <head> | 3 | <head> |
4 | <meta charset="utf-8"> | ||
5 | <meta name="robots" content="index,follow"> | ||
6 | <meta name="author" content="Alexander Pickering"> | ||
7 | <meta name="description" content="Lua4Win - A distribution of the Lua programming language"> | ||
8 | <title>Lua4Win</title> | ||
9 | <meta name="viewport" content="width=device-width, initial-scale=1.0, minimal-ui"> | ||
3 | <link rel="stylesheet" href="/milligram.min.css"/> | 10 | <link rel="stylesheet" href="/milligram.min.css"/> |
4 | <link rel="stylesheet" href="/tokyo-night-light.css"/> | 11 | <link rel="stylesheet" href="/tokyo-night-light.css"/> |
5 | <script src="/highlight.min.js"></script> | 12 | <script src="/highlight.min.js"></script> |
6 | <script>hljs.highlightAll();</script> | 13 | <script>hljs.highlightAll();</script> |
7 | </head> | 14 | </head> |
8 | <body><main class="wrapper"> | 15 | <body><main class="wrapper"> |
9 | <header class="header"><section class="container"> | 16 | <nav class="navigation"> |
17 | <section class="container"> | ||
10 | <h1 class="title">Lua4Win</h1> | 18 | <h1 class="title">Lua4Win</h1> |
11 | <p>Lua4Win is a distribution the Lua programming language for Windows.</p> | 19 | <p>Lua4Win is a distribution the Lua programming language for Windows.</p> |
12 | <nav class="navigation"> | ||
13 | <ul> | 20 | <ul> |
14 | <li><a href="#install">Install</a></li> | 21 | <li><a href="#install">Install</a></li> |
15 | <li><a href="#rational">Rational</a></li> | 22 | <li><a href="#rational">Rational</a></li> |
@@ -18,8 +25,8 @@ | |||
18 | <li><a href="#languages">Sister Languages</a></li> | 25 | <li><a href="#languages">Sister Languages</a></li> |
19 | <li><a href="#advanced">Advanced Usage</a></li> | 26 | <li><a href="#advanced">Advanced Usage</a></li> |
20 | </ul> | 27 | </ul> |
28 | </section> | ||
21 | </nav> | 29 | </nav> |
22 | </section></header> | ||
23 | <section class="container" id="install"> | 30 | <section class="container" id="install"> |
24 | <h3 class="title">Install</h3> | 31 | <h3 class="title">Install</h3> |
25 | <p>You can install it by using the .msi file here.</p> | 32 | <p>You can install it by using the .msi file here.</p> |
@@ -39,51 +46,48 @@ JIT: ON CMOV SSE2 SSE3 SSE4.1 AMD fold cse dce fwd dse narrow loop abc sink fuse | |||
39 | Hello, world! | 46 | Hello, world! |
40 | ></code></pre> | 47 | ></code></pre> |
41 | <p>You can use <code>CTRL+C</code> to escape the read-evaluate-print-loop. You can also write Lua programs with your favorite text editor and run them with <code>$ lua filename.lua</code> | 48 | <p>You can use <code>CTRL+C</code> to escape the read-evaluate-print-loop. You can also write Lua programs with your favorite text editor and run them with <code>$ lua filename.lua</code> |
49 | <div class="container"> | ||
42 | <div class="row"> | 50 | <div class="row"> |
43 | <div class="column"> | 51 | <div class="column"> |
44 | note.lua | 52 | note.lua |
45 | </div> | ||
46 | </div> | ||
47 | <div class="row"> | ||
48 | <div class="column"> | ||
49 | <pre><code class="language-lua">-- Create a note file with today's date in %APPDATA% | 53 | <pre><code class="language-lua">-- Create a note file with today's date in %APPDATA% |
50 | local args = {...} -- extra arguments passed to the program | 54 | local args = {...} -- extra arguments passed to the program |
51 | -- Generate a filename | 55 | -- Generate a filename |
52 | local notes_folder = os.getenv("APPDATA") | 56 | local note_f = os.getenv("APPDATA") |
53 | local today = os.date("%Y-%m-%d") | 57 | local today = os.date("%Y-%m-%d") |
54 | local note_name = table.concat(args,"-"):gsub("[%W]","-") | 58 | local note_name = table.concat(args,"-"):gsub("[%W]","-") |
55 | local note_filename = string.format("%s\note-%s-%s.txt",notes_folder,today,note_name) | 59 | local filename = ("%s\note-%s-%s.txt"):format(note_f,today,note_name) |
56 | -- Create the file | 60 | -- Create the file |
57 | local fd = assert(io.open(note_filename,"w")) | 61 | local fd = assert(io.open(filename,"w")) |
58 | assert(fd:close()) | 62 | assert(fd:close()) |
59 | -- Open it in notepad | 63 | -- Open it in notepad |
60 | os.execute("notepad.exe " .. note_filename)</code></pre> | 64 | os.execute("notepad.exe " .. filename)</code></pre> |
61 | </div> | 65 | </div> |
62 | <div class="column"> | 66 | <div class="column"> |
67 | | ||
63 | <pre><code class="language-bash">$ lua note.lua my first note</code></pre> | 68 | <pre><code class="language-bash">$ lua note.lua my first note</code></pre> |
64 | </div> | 69 | </div> |
65 | </div> | 70 | </div> |
71 | </div> | ||
66 | <p>Run <code>lua --help</code> for more options for the command line tool, and see the <a href="https://www.lua.org/manual/5.1/manual.html">Lua Manual</a> for extensive documentation of the Lua programming language and standard libraries. Also note <a href="https://luajit.org/extensions.html">LuaJIT's extensions</a></p> | 72 | <p>Run <code>lua --help</code> for more options for the command line tool, and see the <a href="https://www.lua.org/manual/5.1/manual.html">Lua Manual</a> for extensive documentation of the Lua programming language and standard libraries. Also note <a href="https://luajit.org/extensions.html">LuaJIT's extensions</a></p> |
67 | </section> | 73 | </section> |
68 | <section class="container" id="luarocks"> | 74 | <section class="container" id="luarocks"> |
69 | <h3 class="title">Installing Superpowers</h3> | 75 | <h3 class="title">Installing Superpowers</h3> |
70 | <p>You can use modules that implement more than the standard lua libraries by running the <code>$ luarocks install >module name< </code> command to download and install modules.</p> | 76 | <p>You can use modules that implement more than the standard lua libraries by running the <code>$ luarocks install >module name< </code> command to download and install modules.</p> |
71 | <div class="row"> | 77 | <div class="row"> |
72 | <div class="column column-offset-33"> | ||
73 | color.lua | ||
74 | </div> | ||
75 | </div> | ||
76 | <div class="row"> | ||
77 | <div class="column"> | 78 | <div class="column"> |
79 | | ||
78 | <pre><code class="language-bash">$ luarocks install easni</code></pre> | 80 | <pre><code class="language-bash">$ luarocks install easni</code></pre> |
79 | </div> | 81 | </div> |
80 | <div class="column"> | 82 | <div class="column"> |
83 | color.lua | ||
81 | <pre><code class="language-lua">local ansi = require("eansi") | 84 | <pre><code class="language-lua">local ansi = require("eansi") |
82 | ansi.enable = true | 85 | ansi.enable = true |
83 | local green = ansi.toansi("green") | 86 | local green = ansi.toansi("green") |
84 | print(green .. "> implying you need modules")</code></pre> | 87 | print(green .. "> implying you need modules")</code></pre> |
85 | </div> | 88 | </div> |
86 | <div class="column"> | 89 | <div class="column"> |
90 | | ||
87 | <pre><code class="language-bash">$ lua color.lua</code></pre> | 91 | <pre><code class="language-bash">$ lua color.lua</code></pre> |
88 | </div> | 92 | </div> |
89 | </div> | 93 | </div> |
@@ -94,15 +98,12 @@ print(green .. "> implying you need modules")</code></pre> | |||
94 | <p>Lua4Win makes it easy to download other programming languages that are distributed through the <code>luarocks</code> package manager. Simply <code>luarocks install</code> them like you would any other package.</p> | 98 | <p>Lua4Win makes it easy to download other programming languages that are distributed through the <code>luarocks</code> package manager. Simply <code>luarocks install</code> them like you would any other package.</p> |
95 | <h4 class="title">Moonscript</h4> | 99 | <h4 class="title">Moonscript</h4> |
96 | <div class="row"> | 100 | <div class="row"> |
97 | <div class="column column-offset-33"> | ||
98 | example.moon | ||
99 | </div> | ||
100 | </div> | ||
101 | <div class="row"> | ||
102 | <div class="column"> | 101 | <div class="column"> |
102 | | ||
103 | <pre><code class="language-bash">$ luarocks install moonscript</code></pre> | 103 | <pre><code class="language-bash">$ luarocks install moonscript</code></pre> |
104 | </div> | 104 | </div> |
105 | <div class="column"> | 105 | <div class="column"> |
106 | example.moon | ||
106 | <pre><code class="language-moonscript">class Person | 107 | <pre><code class="language-moonscript">class Person |
107 | name: "Alex" | 108 | name: "Alex" |
108 | greet: => print("Hello, " .. @name) | 109 | greet: => print("Hello, " .. @name) |
@@ -115,6 +116,7 @@ with World! | |||
115 | </code></pre> | 116 | </code></pre> |
116 | </div> | 117 | </div> |
117 | <div class="column"> | 118 | <div class="column"> |
119 | | ||
118 | <pre><code class="language-bash">$ moon example.moon | 120 | <pre><code class="language-bash">$ moon example.moon |
119 | Hello, World!</code></pre> | 121 | Hello, World!</code></pre> |
120 | </div> | 122 | </div> |
@@ -122,15 +124,12 @@ Hello, World!</code></pre> | |||
122 | <br/> | 124 | <br/> |
123 | <h4 class="title">Teal</h4> | 125 | <h4 class="title">Teal</h4> |
124 | <div class="row"> | 126 | <div class="row"> |
125 | <div class="column column-offset-33"> | ||
126 | keys.tl | ||
127 | </div> | ||
128 | </div> | ||
129 | <div class="row"> | ||
130 | <div class="column"> | 127 | <div class="column"> |
128 | | ||
131 | <pre><code class="language-bash">$ luarocks install tl</code></pre> | 129 | <pre><code class="language-bash">$ luarocks install tl</code></pre> |
132 | </div> | 130 | </div> |
133 | <div class="column"> | 131 | <div class="column"> |
132 | keys.tl | ||
134 | <pre><code class="language-teal">local function keys<K,V>(xs: {K:V}):{K} | 133 | <pre><code class="language-teal">local function keys<K,V>(xs: {K:V}):{K} |
135 | local ks = {} | 134 | local ks = {} |
136 | for k, _ in pairs(xs) do | 135 | for k, _ in pairs(xs) do |
@@ -144,6 +143,7 @@ print(table.concat(s)) | |||
144 | </code></pre> | 143 | </code></pre> |
145 | </div> | 144 | </div> |
146 | <div class="column"> | 145 | <div class="column"> |
146 | | ||
147 | <pre><code class="language-bash">$ tl run keys.tl | 147 | <pre><code class="language-bash">$ tl run keys.tl |
148 | ab</code></pre> | 148 | ab</code></pre> |
149 | </div> | 149 | </div> |
@@ -155,7 +155,6 @@ ab</code></pre> | |||
155 | <p>Lua4Win's luarocks configuration lives at <code class="language-none">[INSTALLDIR]/config/config-5.1.lua</code>, and is a regular Lua file you can modify.</p> | 155 | <p>Lua4Win's luarocks configuration lives at <code class="language-none">[INSTALLDIR]/config/config-5.1.lua</code>, and is a regular Lua file you can modify.</p> |
156 | <p>All of Lua4Win's binary packages are built using mingw64. If you intend to build your own modules they must be built with mingw64 if you want them to interoperate with Lua4Win-distributed Lua.</p> | 156 | <p>All of Lua4Win's binary packages are built using mingw64. If you intend to build your own modules they must be built with mingw64 if you want them to interoperate with Lua4Win-distributed Lua.</p> |
157 | <p>Some of Lua4Win's packages needed patching or modification, source code is generally mirrored at <a href="https://git.lua4.win">git.lua4.win</a>, and packaging code is kept separate- usually in a <code>*-packaging</code> repo.</p> | 157 | <p>Some of Lua4Win's packages needed patching or modification, source code is generally mirrored at <a href="https://git.lua4.win">git.lua4.win</a>, and packaging code is kept separate- usually in a <code>*-packaging</code> repo.</p> |
158 | 158 | </section> | |
159 | </body> | 159 | </main></body> |
160 | </html> | 160 | </html> |
161 | |||