Skip to content

Commit a08b757

Browse files
committed
more web docs, mobile friendly
1 parent 25b98e3 commit a08b757

7 files changed

Lines changed: 44 additions & 34 deletions

File tree

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,6 +1180,7 @@ echo "\$(ks_BIN): \$(ks_O) \$(libks_SHARED)" >> $T
11801180
echo " @mkdir -p \$(dir \$@)" >> $T
11811181

11821182
echo " \$(CC) \\" >> $T
1183+
echo " \$(ks_O) \\" >> $T
11831184
echo " \$(LDFLAGS) \\" >> $T
11841185

11851186
if [ "$PLATFORM" = "linux" ]; then
@@ -1190,7 +1191,6 @@ elif [ "$PLATFORM" = "darwin" ]; then
11901191
echo " -Wl,-rpath,'@loader_path/../lib' -L./lib -lks \\" >> $T
11911192
fi
11921193

1193-
echo " \$(ks_O) \\" >> $T
11941194
echo " -o \$@" >> $T
11951195

11961196
echo "" >> $T

docs/DOCS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ A few things I decided to reinvent the wheel for:
3232
* [bytecode compiler](https://github.com/cadebrown/kscript/blob/main/src/compiler.c), converting high level parse
3333
* [bytecode virtual machine](https://github.com/cadebrown/kscript/blob/main/src/vm.c), which is the core of the interpreter using a stack-based execution model, with exceptions and scoping
3434

35-
## FAQs: What/Why/Who/When/How is kscript?
35+
## FAQs
3636

3737
What is kscript?
3838
: [kscript](https://ks.cade.io) is a dynamic programming language with expressive syntax, cross platform support, and a rich standard library. Its primary aim is to allow developers to write platform agnostic programs that can run anywhere, and require little or no platform-specific or os-specific code.

docs/index.html

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,15 @@
3232

3333
</head>
3434
<body>
35-
<nav class="sidenav">
35+
<nav>
3636
<ul>
3737
<li><a href="#kscript-a-programming-language"
3838
id="toc-kscript-a-programming-language"><span
3939
class="toc-section-number">1</span> kscript: a programming
4040
language</a>
4141
<ul>
42-
<li><a href="#faqs-whatwhywhowhenhow-is-kscript"
43-
id="toc-faqs-whatwhywhowhenhow-is-kscript"><span
44-
class="toc-section-number">1.1</span> FAQs:
45-
What/Why/Who/When/How is kscript?</a></li>
42+
<li><a href="#faqs" id="toc-faqs"><span
43+
class="toc-section-number">1.1</span> FAQs</a></li>
4644
</ul></li>
4745
<li><a href="#kscript-a-practical-guide"
4846
id="toc-kscript-a-practical-guide"><span
@@ -281,11 +279,8 @@ <h1 data-number="1" id="kscript-a-programming-language"><span
281279
a stack-based execution model, with exceptions and scoping</li>
282280
</ul></li>
283281
</ul>
284-
<h2 data-number="1.1"
285-
id="faqs-whatwhywhowhenhow-is-kscript"><span
286-
class="header-section-number">1.1</span> FAQs:
287-
What/Why/Who/When/How is kscript?<a
288-
href="#faqs-whatwhywhowhenhow-is-kscript"
282+
<h2 data-number="1.1" id="faqs"><span
283+
class="header-section-number">1.1</span> FAQs<a href="#faqs"
289284
class="anchor-link"></a></h2>
290285
<dl>
291286
<dt><span id="What-is-kscript">What is kscript?<a

docs/kscript.pdf

-110 Bytes
Binary file not shown.

docs/site.css

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,18 @@
1-
21
/** General CSS **/
32

43
html {
5-
font-size: 15px;
64
}
75

6+
87
body {
9-
10-
font-family: monospace, monospace;
11-
12-
line-height: 1.15;
13-
8+
height: 100%;
9+
width: 100%;
1410
margin: 0;
1511
padding: 0;
16-
width: 100%;
17-
1812

19-
/* display: flex; */
20-
/* Default text font */
21-
22-
/*display: flex;
23-
flex-direction: row;
24-
min-height: 100vh;
25-
width: 100vw;
26-
display: flex; */
27-
28-
/* margin-left: 350px; */
13+
font-family: monospace, monospace;
14+
font-size: 15px;
15+
line-height: 1.15;
2916
}
3017

3118
nav {
@@ -41,11 +28,14 @@ nav {
4128
background: #ddd;
4229
}
4330

44-
4531
main {
4632
width: auto;
4733
margin-left: 350px;
4834
padding: 1em 2em;
35+
36+
/* never allow text to overflow */
37+
overflow-wrap: normal;
38+
overflow-x: hidden;
4939
}
5040

5141

@@ -148,6 +138,32 @@ dt:hover > .anchor-link {
148138
}
149139

150140

141+
/* on mobile and small screens */
142+
@media screen and (max-width: 768px) {
143+
main {
144+
margin-left: 0;
145+
padding: 1em;
146+
}
147+
nav {
148+
display: none;
149+
}
150+
}
151+
152+
153+
/*
154+
@media screen and (max-width: 768px) {
155+
main {
156+
margin-left: 40vw;
157+
}
158+
nav {
159+
width: 40vw;
160+
}
161+
}
162+
163+
*/
164+
165+
166+
151167

152168
/* for printing to a physical page, we style it differently */
153169
@media print {

docs/site.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ function doq_togglesidenav() {
99
x.style.display = "block";
1010
}
1111
}
12-

docs/template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
</head>
3434
<body>
35-
<nav class="sidenav">
35+
<nav>
3636
$toc$
3737
</nav>
3838
<main>

0 commit comments

Comments
 (0)