diff options
-rw-r--r-- | project/assets/css/default.css | 61 | ||||
-rw-r--r-- | project/assets/css/index.css | 7 | ||||
-rw-r--r-- | project/templates/fltkada.html | 29 | ||||
-rw-r--r-- | project/templates/grasp.html | 19 | ||||
-rw-r--r-- | project/templates/thue2a.html | 63 |
5 files changed, 97 insertions, 82 deletions
diff --git a/project/assets/css/default.css b/project/assets/css/default.css index 84278f5..fce7fbf 100644 --- a/project/assets/css/default.css +++ b/project/assets/css/default.css @@ -3,14 +3,16 @@ /* Some hopefully sensible defaults. */ body { - margin:1em auto; - max-width:60em; - font:1.2em/1.62em sans-serif; + margin: auto; + max-width: 60em; + font: 1.2em/1.62em sans-serif; } figure { text-align: center; + margin-left: 0.5em; + margin-right: 0.5em; } @@ -18,55 +20,74 @@ code { display: block; font-family: monospace; white-space: pre; + background-color: #ceecf5; + border-radius: 1.5em; + /* top padding seems to start at 2em on most browsers for code blocks... bug? */ + /* nonetheless, for the moment padding-top will be left as default */ + padding-right: 2em; + padding-bottom: 2em; + padding-left: 2em; + /*padding: 2em 2em 2em 2em;*/ + margin: 1em 2em 1em 2em; +} + + +pre { + background-color: #cef6ce; + border-radius: 1.5em; + padding: 2em 2em 2em 2em; + margin: 1em 2em 1em 2em; } h2 { - padding-top: 1em; - padding-bottom: 1em; + padding: 1em 0.5em 1em 0.5em; } h4 { padding-top: 2em; + padding-left: 0.5em; } h5 { padding-top: 2em; + padding-left: 0.5em; } p { - margin-top: 2em; - margin-bottom: 2em; + margin: 2em 0.5em 2em 0.5em; } -/* A bunch of nonsense to make the navbar +/* Display the navbar like a table to make it horizontal and evenly spaced. */ nav ul { - width: 85%; - text-align: justify; - line-height: 0; - margin: 0 auto 0 auto; + display: table; + width: 90%; + margin: auto; padding: 0; } - -nav ul:after { - content: ''; - display: inline-block; - width: 100%; +nav ul li { + display: table-cell; + text-align: center; + margin: 0; + padding: 0; + width: 33.33333333%; } +nav ul li:first-child { + text-align: left; +} -nav ul li { - display: inline-block; - line-height: 100%; +nav ul li:last-child { + text-align: right; } diff --git a/project/assets/css/index.css b/project/assets/css/index.css index 65676d1..e5dfd5d 100644 --- a/project/assets/css/index.css +++ b/project/assets/css/index.css @@ -6,13 +6,14 @@ ul.index { text-align: center; list-style-type: none; - margin-top: 1.5cm; + margin: 3em 0em 0em 0em; + padding: 0; } ul.index li { - margin-top: 0.5em; - margin-bottom: 1.5em; + margin: 0.5em 0em 1.5em 0em; + padding: 0; } diff --git a/project/templates/fltkada.html b/project/templates/fltkada.html index 584e4f8..cea8cac 100644 --- a/project/templates/fltkada.html +++ b/project/templates/fltkada.html @@ -28,30 +28,29 @@ be enough to write a text editor. It's a thick, loosely coupled binding, accompl the interface to C, then importing that to Ada. Attempted usage of the internal C interface as a binding on its own is not supported.</p> -<p>A typical FLTK Hello World program in Ada: +<p>A typical FLTK Hello World program in Ada:</p> <code> - with - FLTK.Widgets.Groups.Windows, - FLTK.Widgets.Boxes; +with + FLTK.Widgets.Groups.Windows, + FLTK.Widgets.Boxes; - function Hello_World return Integer is +function Hello_World return Integer is - My_Win : FLTK.Widgets.Groups.Windows.Window := - FLTK.Widgets.Groups.Windows.Create (100, 100, 200, 200, "Untitled"); + My_Win : FLTK.Widgets.Groups.Windows.Window := + FLTK.Widgets.Groups.Windows.Create (100, 100, 200, 200, "Untitled"); - My_Box : FLTK.Widgets.Boxes.Box := - FLTK.Widgets.Boxes.Create (50, 50, 100, 100, "Hello, World!"); + My_Box : FLTK.Widgets.Boxes.Box := + FLTK.Widgets.Boxes.Create (50, 50, 100, 100, "Hello, World!"); - begin +begin - My_Win.Add (My_Box); - My_Win.Show; + My_Win.Add (My_Box); + My_Win.Show; - return FLTK.Run; + return FLTK.Run; - end Hello_World; +end Hello_World; </code> -</p> <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 54e625a..c340483 100644 --- a/project/templates/grasp.html +++ b/project/templates/grasp.html @@ -52,18 +52,17 @@ uses a subset of the DOT graph description language for the file format, to enab as well as relatively easy conversion to a graph image. If a format that more readily converts to a comprehensible graph image is found, a parser for it may be added.</p> -<p>The above example is recorded as follows: +<p>The above example is recorded as follows:</p> <code> - digraph { - 1 [label="puts"] - 2 [label="grasp:main"] - 3 [label="Hello world!"] - - 1 -> 2 [label="name"] - 1 -> 3 [label="in"] - } +digraph { + 1 [label="puts"] + 2 [label="grasp:main"] + 3 [label="Hello world!"] + + 1 -> 2 [label="name"] + 1 -> 3 [label="in"] +} </code> -</p> <p>Source code is available <a href="/cgit/cgit.cgi/esoteric.git/" target="_blank">here</a>.</p> diff --git a/project/templates/thue2a.html b/project/templates/thue2a.html index f4dac4f..6cb4680 100644 --- a/project/templates/thue2a.html +++ b/project/templates/thue2a.html @@ -18,18 +18,17 @@ a sequence of symbols to replace and a sequence of symbols to replace with, and state of the program. Applicable rules are then applied to the inital state in a random 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>An example Thue program that increments a binary number surrounded by '_' characters:</p> <code> - 1_::=1++ - 0_::=1 - 01++::=10 - 11++::=1++0 - _0::=_ - _1++::=10 - ::= - _1111111_ +1_::=1++ +0_::=1 +01++::=10 +11++::=1++0 +_0::=_ +_1++::=10 +::= +_1111111_ </code> -</p> <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,26 +36,24 @@ ended by a blank rule. Note that whitespace in rules and the inital state is NOT <p>Output is handled by prefixing the right hand side with '~', which causes those symbols to go to stdout and the replacement in the program to be the empty string.</p> -<p>The traditional Hello World program: +<p>The traditional Hello World program:</p> <code> - a::=~Hello World! - ::= - a +a::=~Hello World! +::= +a </code> -</p> <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 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. +more. Maybe.</p> <code> - a::=::: - ::= - a +a::=::: +::= +a </code> -</p> <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 @@ -67,28 +64,26 @@ version 2a. In this version, all symbols obtained through stdin are treated as d ordinary symbols. Rules can refer to and manipulate symbols obtained through stdin by surrounding them in double quotes.</p> -<p>A rule that replaces an ordinary symbol 'a' with 'abc': +<p>A rule that replaces an ordinary symbol 'a' with 'abc':</p> <code> - a::=abc +a::=abc </code> -</p> -<p>A rule that replaces the letter 'a' that was obtained from stdin with 'abc': +<p>A rule that replaces the letter 'a' that was obtained from stdin with 'abc':</p> <code> - "a"::=abc +"a"::=abc </code> -</p> -<p>For convenience, a number of escaped characters are also available: +<p>For convenience, a number of escaped characters are also available:</p> <pre> - \\ -> backslash - \r -> return - \n -> newline - \: -> colon - \" -> double quote - \EOT -> end of file +\\ -> backslash +\r -> return +\n -> newline +\: -> colon +\" -> double quote +\EOT -> end of file </pre> -</p> + <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 |