Skip to content

Commit f07d2d3

Browse files
committed
fixes for mobile displays
1 parent bdc012d commit f07d2d3

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

quick-help.html

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@
44
<head>
55
<title></title>
66
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1">
78
<link rev="made" href="mailto:[email protected]" />
89
</head>
910

1011
<body>
1112

12-
13+
<style type="text/css">
14+
pre {
15+
overflow: auto;
16+
}
17+
</style>
1318

1419
<ul id="index">
1520
<li><a href="#Links-Syntax">Links Syntax</a>
@@ -179,7 +184,7 @@ <h2 id="Lists">Lists</h2>
179184
<p>A list can be created directly by wrapping a series of comma-separated expressions between brackets:</p>
180185

181186
<pre><code> [1, 4, 9, 16]
182-
187+
183188
[&quot;apple&quot;, &quot;banana&quot;, &quot;pear&quot;]
184189

185190
[]
@@ -338,7 +343,7 @@ <h2 id="Forms">Forms</h2>
338343
<p>Links provides two special attributes for programming with HTML forms: <code>l:name</code>, which binds the value of an input field to a variable, and <code>l:onsubmit</code>, with which you can supply an expression to be evaluated when the form is submitted.</p>
339344

340345
<pre><code> &lt;form l:onsubmit=&quot;{say_hello(personName)}&quot;&gt;
341-
What is your name?
346+
What is your name?
342347
&lt;input l:name=&quot;{personName}&quot;/&gt;
343348
&lt;/form&gt;</code></pre>
344349

@@ -466,7 +471,7 @@ <h2 id="Functions">Functions</h2>
466471

467472
<pre><code> fun foo(x, y, z)
468473
{
469-
# ... body
474+
# ... body
470475
}</code></pre>
471476

472477
<p>Anonymous functions just omit the name: <code>fun (x) { x + 1 }</code> is an expression that evaluates to an anonymous function value.</p>
@@ -627,7 +632,7 @@ <h2 id="Database-access">Database access</h2>
627632

628633
<p>For example, to create a handle to the table <code>ice_cream</code> with fields <code>i</code> and <code>f</code> both of type <code>Int</code> associated with the database <code>db</code>, and bind it to the variable <code>fac_table</code>, use:</p>
629634

630-
<pre><code> var parlors = table &quot;ice_cream_parlors&quot;
635+
<pre><code> var parlors = table &quot;ice_cream_parlors&quot;
631636
with (name : String, fans : Int) from db;</code></pre>
632637

633638
<p>The variable <code>parlors</code> then has type <code>TableHandle((name : String, fans : Int), (name : String, fans : Int), (name : String, fans : Int))</code>. The three arguments to the <code>TableHandle</code> type constructor together identify the type of a row and its constraints (See <a href="#Table-constraints">&quot;Table constraints&quot;</a>).</p>
@@ -638,7 +643,7 @@ <h3 id="Using-tables">Using tables</h3>
638643

639644
<p>Since a table-handle in Links is different from a list, we cannot simply draw elements directly from a table as we draw them from a list. But a special form of generator accepts a table-handle as its source:</p>
640645

641-
<pre><code> var parlors = table &quot;ice_cream_parlors&quot;
646+
<pre><code> var parlors = table &quot;ice_cream_parlors&quot;
642647
with (name : String, fans : Int) from db;
643648
for (p &lt;-- parlors)
644649
where (p.flavors &gt; 1)
@@ -713,17 +718,17 @@ <h3 id="Table-constraints">Table constraints</h3>
713718

714719
<p>To enable these special features on a table field, add a <code>where</code> clause to the table expression that lists field names with the corresponding keyword. For example:</p>
715720

716-
<pre><code> table &quot;people&quot; with (id:Int, name:String, nationality:String)
721+
<pre><code> table &quot;people&quot; with (id:Int, name:String, nationality:String)
717722
where id readonly, nationality default from db</code></pre>
718723

719724
<p>This returns a table handle for the table <code>people</code> with fields <code>id</code> and <code>nationality</code>, where the <code>id</code> field cannot be modified through this handle, and <code>nationality</code> has a default value so giving a value is optional when modifying the table.</p>
720725

721726
<p>The type assigned by Links to a table handle has three fields, indicating the <i>readable</i> fields, the <i>writeable</i> fields and the <i>needed</i> fields, in that order:</p>
722727

723728
<pre><code> links&gt;
724-
var t = table &quot;people&quot; with (id:Int, name:String, nationality:String)
729+
var t = table &quot;people&quot; with (id:Int, name:String, nationality:String)
725730
where id readonly, nationality default from db;
726-
t = (table people) :
731+
t = (table people) :
727732
TableHandle((id:Int,name:String,nationality:String),
728733
(name:String,nationality:String),
729734
(name:String))</code></pre>
@@ -888,7 +893,7 @@ <h2 id="Types-in-Links">Types in Links</h2>
888893

889894
links&gt; [(42, &quot;The answer&quot;),
890895
(7, &quot;The number of wonders of the world&quot;)];
891-
[(42, &quot;The answer&quot;), (7, &quot;The number of wonders of the world&quot;)]
896+
[(42, &quot;The answer&quot;), (7, &quot;The number of wonders of the world&quot;)]
892897
: [(Int, String)]</code></pre>
893898

894899
<p>Note that the type of an integer is Int, and the type of a string is String. The <i>pair</i> <code>(42, &quot;The answer&quot;)</code> has a type that indicates the first part of the pair is an <code>Int</code> and the second part is a <code>String</code>; this type is written <code>(Int, String)</code>.</p>
@@ -2024,7 +2029,7 @@ <h2 id="Configuration-settings">Configuration settings</h2>
20242029
<p>The available settings can be discovered in the interactive loop using the <code>@settings</code> directive:</p>
20252030

20262031
<pre><code> links&gt; @settings;
2027-
2032+
20282033
User settings
20292034
show_unification false
20302035
show_typechecking false
@@ -2049,5 +2054,3 @@ <h2 id="Configuration-settings">Configuration settings</h2>
20492054
</body>
20502055

20512056
</html>
2052-
2053-

0 commit comments

Comments
 (0)