background colour, added font style to trapezium calculation page
authorNick Downing <nick@ndcode.org>
Sat, 19 Jan 2019 02:01:30 +0000 (13:01 +1100)
committerNick Downing <nick@ndcode.org>
Sat, 19 Jan 2019 02:01:30 +0000 (13:01 +1100)
calculate_button_trapezium.html.jst
calculatebutton.html.jst
olly.css
trapezium.html

index 7850ea7..1182d22 100644 (file)
@@ -18,15 +18,16 @@ return async env => {
     let height = parseFloat(query.height)
     let area = (a_length + b_length) / 2 * height
    
-    _site.serve(
+    env.site.serve(
       env,
       200,
       `<!DOCTYPE html>
 <html>
 <head>
+<link rel="stylesheet" type="text/css" href="olly.css">
 <title>Calculation</title>
 </head>
-<body>
+<body class="olly">
 <h1>The Height is: ${height} units</h1>
 <h1>The A length is: ${a_length} units</h1>
 <h1>The B length is: ${b_length} units</h1>
@@ -38,15 +39,16 @@ return async env => {
     )
   }
   else {
-    _site.serve(
+    env.site.serve(
       env,
       200,
       `<!DOCTYPE html>
 <html>
 <head>
+<link rel="stylesheet" type="text/css" href="olly.css">
 <title>Calculation</title>
 </head>
-<body>
+<body class="olly">
 <h1>Error - Unable to Calculate</h1>
 </body>
 </html>
index 0ef18cd..f8e9672 100644 (file)
@@ -21,7 +21,7 @@ return async env => {
     let circumference = Math.PI * radius * 2
     let diameter = radius * 2
     if (radius < 0) {
-      _site.serve(
+      env.site.serve(
         env,
         200,
         `<!DOCTYPE html>
@@ -39,7 +39,7 @@ return async env => {
       )
     }
     else {
-      _site.serve(
+      env.site.serve(
         env,
         200,
       `<!DOCTYPE html>
@@ -61,7 +61,7 @@ return async env => {
     }
   }
   else {
-    _site.serve(
+    env.site.serve(
       env,
       200,
       `<!DOCTYPE html>
index 6713d0c..164c34b 100644 (file)
--- a/olly.css
+++ b/olly.css
@@ -1,3 +1,4 @@
 .olly {
   font-family: sans-serif;
+  background-color: AliceBlue;
 }
index 6274c24..9db6d4b 100644 (file)
@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
+<link rel="stylesheet" type="text/css" href="olly.css">
 <title>Trapezium Area Calculator</title>
 <style>
 form div + div {
@@ -52,7 +53,7 @@ button {
 }
 </style>
 </head>
-<body>
+<body class="olly">
 <h1>Trapezium Area Calculator</h1>
 <img src="drawing.svg">
 <form action="/calculate_button_trapezium.html" method="post">