diff options
author | Jed Barber <jjbarber@y7mail.com> | 2017-08-07 12:20:36 +1000 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2017-08-07 12:20:36 +1000 |
commit | 92ff13627021a5fdd4eea59bd5db493cbea5406b (patch) | |
tree | eb95a180a88c4cd8f82aa2169a4ce1fb0ddcbe07 /project | |
parent | 60c63100f66ea5dce4ad10941b4c40725f01f3c8 (diff) |
I think I've finally struck the right width balance
Diffstat (limited to 'project')
-rw-r--r-- | project/assets/css/default.css | 14 | ||||
-rw-r--r-- | project/assets/css/stvcount.css | 2 | ||||
-rw-r--r-- | project/templates/fltkada.html | 2 | ||||
-rw-r--r-- | project/templates/grasp.html | 2 | ||||
-rw-r--r-- | project/templates/sunset.html | 2 | ||||
-rw-r--r-- | project/templates/thue2a.html | 13 |
6 files changed, 31 insertions, 4 deletions
diff --git a/project/assets/css/default.css b/project/assets/css/default.css index fce7fbf..dff3059 100644 --- a/project/assets/css/default.css +++ b/project/assets/css/default.css @@ -4,7 +4,7 @@ body { margin: auto; - max-width: 60em; + max-width: 75em; font: 1.2em/1.62em sans-serif; } @@ -16,8 +16,14 @@ figure { } +div.precontain { + text-align: center; +} + + code { - display: block; + display: inline-block; + text-align: left; font-family: monospace; white-space: pre; background-color: #ceecf5; @@ -29,14 +35,18 @@ code { padding-left: 2em; /*padding: 2em 2em 2em 2em;*/ margin: 1em 2em 1em 2em; + width: 60em; } pre { + display: inline-block; + text-align: left; background-color: #cef6ce; border-radius: 1.5em; padding: 2em 2em 2em 2em; margin: 1em 2em 1em 2em; + width: 60em; } diff --git a/project/assets/css/stvcount.css b/project/assets/css/stvcount.css index ac98521..0570066 100644 --- a/project/assets/css/stvcount.css +++ b/project/assets/css/stvcount.css @@ -7,7 +7,7 @@ table, th, td { table { margin: 2em auto 2em auto; - max-width: 59em; + max-width: 60em; } diff --git a/project/templates/fltkada.html b/project/templates/fltkada.html index cea8cac..a6663e6 100644 --- a/project/templates/fltkada.html +++ b/project/templates/fltkada.html @@ -29,6 +29,7 @@ the interface to C, then importing that to Ada. Attempted usage of the internal on its own is not supported.</p> <p>A typical FLTK Hello World program in Ada:</p> +<div class="precontain"> <code> with FLTK.Widgets.Groups.Windows, @@ -51,6 +52,7 @@ begin end Hello_World; </code> +</div> <p>Aside from reworking the types to better fit the strongly typed philosophy of Ada, the entire library has been structured to avoid explicit heap usage. As you can see from the above example, the intended use is to diff --git a/project/templates/grasp.html b/project/templates/grasp.html index bf6f79b..45661af 100644 --- a/project/templates/grasp.html +++ b/project/templates/grasp.html @@ -53,6 +53,7 @@ as well as relatively easy conversion to a graph image. If a format that more re comprehensible graph image is found, a parser for it may be added.</p> <p>The above example is recorded as follows:</p> +<div class="precontain"> <code> digraph { 1 [label="puts"] @@ -63,6 +64,7 @@ digraph { 1 -> 3 [label="in"] } </code> +</div> <p>Source code is available <a href="/cgit/cgit.cgi/esoteric.git/" target="_blank">here</a>.</p> diff --git a/project/templates/sunset.html b/project/templates/sunset.html index 042e936..01420d5 100644 --- a/project/templates/sunset.html +++ b/project/templates/sunset.html @@ -28,6 +28,7 @@ appears: a simple weak copyleft license which places older parts of a work under domain disclaimer in a reasonable timeframe.</p> <p>The full text is as follows:</p> +<div class="precontain"> <pre> SUNSET LICENSE Version 1.0, June 2017 @@ -50,6 +51,7 @@ other work. a part of this work, then that part is placed into the public domain and you may do whatever you want with it, regardless of all other clauses. </pre> +</div> <p>The license file, accompanying detailed rationale, and a simple logo I threw together can all be found in <a href="/cgit/cgit.cgi/sunset.git/" target="_blank">this</a> repo.</p> diff --git a/project/templates/thue2a.html b/project/templates/thue2a.html index 6cb4680..4f82ed8 100644 --- a/project/templates/thue2a.html +++ b/project/templates/thue2a.html @@ -19,6 +19,7 @@ state of the program. Applicable rules are then applied to the inital state in a order until no more are applicable, at which point the program terminates.</p> <p>An example Thue program that increments a binary number surrounded by '_' characters:</p> +<div class="precontain"> <code> 1_::=1++ 0_::=1 @@ -29,6 +30,7 @@ _1++::=10 ::= _1111111_ </code> +</div> <p>The before and after symbols in each rule are separated by '::=' and the list of rules is ended by a blank rule. Note that whitespace in rules and the inital state is NOT ignored.</p> @@ -37,11 +39,13 @@ ended by a blank rule. Note that whitespace in rules and the inital state is NOT go to stdout and the replacement in the program to be the empty string.</p> <p>The traditional Hello World program:</p> +<div class="precontain"> <code> a::=~Hello World! ::= a </code> +</div> <p>Input is handled by having the right hand side of a rule be ':::', which causes the left hand side symbols to be replaced with a line from the standard output. Unfortunately, this @@ -49,11 +53,13 @@ immediately causes problems.</p> <p>The following is an innocent piece of code that accepts a single line of input and does nothing more. Maybe.</p> +<div class="precontain"> <code> a::=::: ::= a </code> +</div> <p>If a string involving the letter 'a' is entered into the above program, the single input rule will again become applicable and another line of input will be obtained. In other words, the @@ -65,16 +71,21 @@ ordinary symbols. Rules can refer to and manipulate symbols obtained through std surrounding them in double quotes.</p> <p>A rule that replaces an ordinary symbol 'a' with 'abc':</p> +<div class="precontain"> <code> a::=abc </code> +</div> <p>A rule that replaces the letter 'a' that was obtained from stdin with 'abc':</p> +<div class="precontain"> <code> "a"::=abc </code> +</div> <p>For convenience, a number of escaped characters are also available:</p> +<div class="precontain"> <pre> \\ -> backslash \r -> return @@ -83,7 +94,7 @@ a::=abc \" -> double quote \EOT -> end of file </pre> - +</div> <p>While this doesn't solve all the problems Thue has (try writing a Thue program that asks for and greets the user by name!) it should solve this one particular issue. Source code is |