applying new look to the site
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Sun, 19 Nov 2023 05:51:00 +0000 (23:51 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Sun, 19 Nov 2023 05:51:00 +0000 (23:51 -0600)
17 files changed:
src/app.onyx
www/news-articles/index.json
www/news-articles/ovmwasm.html
www/news-articles/release-0.1.1.html
www/news-articles/release-0.1.2.html
www/news-articles/release-0.1.3.html
www/news-articles/release-0.1.4.html
www/news-articles/release-0.1.5.html
www/news-articles/release-0.1.6.html
www/news-articles/release-0.1.7.html
www/static/css/new_style.css
www/templates/pages/docs.html
www/templates/pages/docs/install.html
www/templates/pages/docs/setup.html
www/templates/pages/homepage.html
www/templates/pages/news.html
www/templates/pages/news_article.html

index c1ad441037af18f7d9fbeed1ba15bb1453f7d3c7..a6bedf44a35c28b87572ac254abcec7bbb7bf892 100644 (file)
@@ -67,7 +67,7 @@ news_articles: Cached_Resource([] Article);
         defer delete(&contents);
 
         res->render("pages/news_article", &.{
-            article = .{ contents = contents, name = article.name }
+            article = .{ contents = contents, name = article.name, description = article.description }
         });
 
     } else {
@@ -140,8 +140,11 @@ main :: () {
     logger := http.server.logger(style=.V2);
     pipes->pipe(&logger);
 
-    app := http.server.tcp(pipes, .{ thread_count = 4 });
-    app->serve(8081);
+    app := http.server.tcp(pipes, .{ thread_count = 0 });
+
+    port := conv.parse_int(os.env("SERVER_PORT") ?? "8000");
+
+    app->serve(~~port);
     println("Server stopping...");
 }
 
index 8944961abe7d195531b1e61b4ae76eea9ee89a2e..949c83fdd6e175b366a95a791a3ceab6e48abe4b 100644 (file)
@@ -3,43 +3,43 @@
         "name": "Beta Release 0.1.7",
         "path": "release-0.1.7",
         "date": "25th October 2023",
-        "description": "Onyx's beta 0.1.7 release"
+        "description": "This release of Onyx brings exciting and overdue features, including switch expressions, WASIX support and an overhauled networking layer."
     },
     {
         "name": "Beta Release 0.1.6",
         "path": "release-0.1.6",
         "date": "24th September 2023",
-        "description": "Onyx's beta 0.1.6 release"
+        "description": "There has not been a new release of Onyx in several months. I have been working on other projects (using Onyx!) and have not had the time needed to dedicate to new features in the language. That being said, Onyx already has many of the features that I need for my projects, so I have not felt the need to add new features. However, I have been fixing bugs and blatant wrong implementations of core library procedures that have been getting in my way. Enough of these have accumulated over the past couple of months that I believe it is worth it to publish them in a new bugfix release."
     },
     {
         "name": "Beta Release 0.1.5",
         "path": "release-0.1.5",
         "date": "18th July 2023",
-        "description": "Onyx's beta 0.1.5 release"
+        "description": "This release brings additions to Onyx's platform layer, allowing for missing things like <em>futexes</em> and TTY control."
     },
     {
         "name": "Beta Release 0.1.4",
         "path": "release-0.1.4",
         "date": "22nd June 2023",
-        "description": "Onyx's beta 0.1.4 release"
+        "description": "This is a small release that brings a <strong>big breaking change</strong> to most Onyx programs.  In short, <code>map.get</code> now returns an <em>Optional</em>, instead of the value directly.  This leads to cleaner and more understandable code."
     },
     {
         "name": "Beta Release 0.1.3",
         "path": "release-0.1.3",
         "date": "18th June 2023",
-        "description": "Onyx's beta 0.1.3 release"
+        "description": "This release of Onyx brings a large change to the compile-time code blocks feature, runtime stack traces, as well as a massive speedup to Onyx's <code>ovmwasm</code> runtime. There are also numerous additions to the standard library."
     },
     {
         "name": "Beta Release 0.1.2",
         "path": "release-0.1.2",
         "date": "28th May 2023",
-        "description": "Onyx's beta 0.1.2 release"
+        "description": "This release of Onyx brings a substantial new feature called <em>tagged unions</em>, and a collection of other small bugfixes."
     },
     {
         "name": "Beta Release 0.1.1",
         "path": "release-0.1.1",
         "date": "15th May 2023",
-        "description": "Onyx's beta 0.1.1 release"
+        "description": "This release of Onyx brings minor changes and additions, with some general bugfixes."
     },
     {
         "name": "Onyx's Custom Runtime",
index daef19e31f431d3a1fd951273f827e15a7eac004..9316269461d061894a3364f11872d7c160efa05d 100644 (file)
@@ -1,5 +1,3 @@
-<h1>Onyx's Custom Runtime</h1>
-
 <p>
     As Onyx targets WebAssembly (WASM) exclusively, running code outside of the browser requires a <a href="https://webassembly.github.io/spec/core/appendix/embedding.html">WASM embedder</a>.
     The job of the embedder is to translate the WASM Virtual Instruction Set Architecture into a "real" architecture that can be executed on the host system.
index 6a668e7a8eef1f2fdfa7d70dd3d09cd9774f80d8..fdabee9aee78907993f0bbb97e8b9660659cd315 100644 (file)
@@ -1,9 +1,3 @@
-<h1>Beta Release 0.1.1</h1>
-
-<p>
-    This release of Onyx brings minor changes and additions, with some general bugfixes.
-</p>
-
 <h2>WASI Improvements</h2>
 <p>
     Much of the work done in this release was focused on improving the support of the <a href="https://wasi.dev">WASI</a> runtime.
index aecd77bc57ef92b5af24c3648e40861d719118b9..294def2b54ba1f9cc6bf218e5879455c3d690539 100644 (file)
@@ -1,9 +1,3 @@
-<h1>Beta Release 0.1.2</h1>
-
-<p>
-    This release of Onyx brings a substantial new feature called <em>tagged unions</em>, and a collection of other small bugfixes.
-</p>
-
 <h2>Tagged Unions</h2>
 <p>
     Tagged unions are a big addition to the type system in Onyx, as they allow you to represent a new <em>kind</em> of type.
index a7d6d73fc70b7c2396b9c431a85adceab08f84a3..12f129e5a11ee1174560796acbd6035c9cd5bcb5 100644 (file)
@@ -1,9 +1,3 @@
-<h1>Beta Release 0.1.3</h1>
-
-<p>
-This release of Onyx brings a large change to the compile-time code blocks feature, runtime stack traces, as well as a massive speedup to Onyx's <code>ovmwasm</code> runtime. There are also numerous additions to the standard library.
-</p>
-
 <h2>Code blocks with captures</h2>
 <p>
     Code blocks have always been a very powerful feature of Onyx, especially when combined with macros. Most of the <code>core.slice</code> library is builtin around using code blocks. However, they were always a little weird, as you had to use the name of the variable as it was prescribed by the procedure you were calling. Look at <code>core.slice.fold</code> as an example.
index 01bc1a47be5b17690fca5bab96847443a7e10508..f5ac1377b93cab6f642a63c6e5d38af469921240 100644 (file)
@@ -1,16 +1,3 @@
-<h1>Beta Release 0.1.4</h1>
-
-<p>
-This is a small release that brings a <strong>big breaking change</strong> to most Onyx programs.
-In short, <code>map.get</code> now returns an <em>Optional</em>, instead of the value directly.
-This leads to cleaner and more understandable code.
-</p>
-
-<p>
-The Onyx package manager also sees a small update in the outputted library directory when packages are synchronized.
-Assuming you are using the provided <code>packages.onyx</code> file, this should be a transparent change.
-</p>
-
 <h2>Map uses Optional</h2>
 
 <p>
index bc60578b2330b26a55f4b1237da465006cc2d78f..0e95550575731101668b01d15c518e782ff08176 100644 (file)
@@ -1,9 +1,3 @@
-<h1>Beta Release 0.1.5</h1>
-
-<p>
-This release brings additions to Onyx's platform layer, allowing for missing things like <em>futexes</em> and TTY control. 
-</p>
-
 <h2>Futexes</h2>
 
 <p>
index 598735e23e5a03375620c0ac712f6394791eb6a6..59cc692f6fef553abb0cdf8ea01ef1b50dd2bfa6 100644 (file)
@@ -1,8 +1,3 @@
-<h1>Beta Release 0.1.6</h1>
-<p>
-There has not been a new release of Onyx in several months. I have been working on other projects (using Onyx!) and have not had the time needed to dedicate to new features in the language. That being said, Onyx already has many of the features that I need for my projects, so I have not felt the need to add new features. However, I have been fixing bugs and blatant wrong implementations of core library procedures that have been getting in my way. Enough of these have accumulated over the past couple of months that I believe it is worth it to publish them in a new bugfix release.
-</p>
-
 <p>
 There is <em>one</em> new feature worth mentioning and that is <em>tagged globals</em>.
 </p>
index 0c6ca484f5b8e922f344bb7d0dde7ffad6958aa8..5e050bb0eccf2bdad16fe7631cb824d059ac5bad 100644 (file)
@@ -1,8 +1,3 @@
-<h1>Beta Release 0.1.7</h1>
-<p>
-    This release of Onyx brings exciting and overdue features, including switch expression, WASIX support and an overhauled networking layer.
-</p>
-
 <h2>Switch Expressions</h2>
 <p>
     Switch expressions allow you to write inline <code>switch</code> statements that evaluate to values, removing
index d542f182e317b55da22ff9fec041872ebe6aca7f..7170bfea252ec8bda7b8ea6e8e5d48c09bfd3ba8 100644 (file)
@@ -4,34 +4,22 @@
     box-sizing: border-box;
 }
 
-@media (prefers-color-scheme: dark) {
-    .ui-theme {
-        --terminal-background-color: #070707;
-        --terminal-foreground-color: #ffffff;
-
-        --background-color: #222;
-        --light-background-color: #333;
-        --dark-background-color: #111;
-        --active-color: #555;
-        --link-color: #bbf;
-        --visited-link-color: #bfbfff;
-        --foreground-color: #fff;
-    }
-}
+.ui-theme {
+    --terminal-background-color: #dddddd;
+    --terminal-foreground-color: #000000;
 
-@media (prefers-color-scheme: light) {
-    .ui-theme {
-        --terminal-background-color: #dddddd;
-        --terminal-foreground-color: #000000;
+    --background-color: #f0f0f5;
+    --light-background-color: #e0e0e6;
+    --dark-background-color: var(--header-color);
+    --active-color: #cccccc;
 
-        --background-color: #f0f0f0;
-        --light-background-color: #e0e0e0;
-        --dark-background-color: #c0c0c0;
-        --active-color: #cccccc;
-        --link-color: #448;
-        --visited-link-color: #669;
-        --foreground-color: #000000;
-    }
+    --header-color: #303033;
+    --header-text: #ffffff;
+    --header-accent: #505055;
+
+    --link-color: #448;
+    --visited-link-color: #669;
+    --foreground-color: #000000;
 }
 
 @media (min-width: 800px) {
@@ -108,12 +96,18 @@ a:visited {
 
 .container.dark {
     background: var(--dark-background-color);
+    color: var(--header-text);
 }
 
 .container.light {
     background: var(--light-background-color);
 }
 
+.container.header {
+    background: var(--header-color);
+    color: var(--header-text);
+}
+
 @media screen and (min-width: 800px) {
     .container .split {
         display: flex;
@@ -176,6 +170,13 @@ p code {
 /* Navigation */
 @media screen and (min-width: 800px) {
     .navbar-container {
+        background: var(--header-color);
+        color: var(--header-text);
+
+        width: 100%;
+    }
+
+    navbar {
         max-width: 1200px;
         margin: 0 auto;
     }
@@ -183,6 +184,9 @@ p code {
 
 @media screen and (max-width: 799px) {
     .navbar-container {
+        background: var(--header-color);
+        color: var(--header-text);
+
         width: 100%;
         margin: 0 auto;
     }
@@ -190,8 +194,8 @@ p code {
 
 
 navbar {
-    background: var(--background-color);
-    color: var(--foreground-color);
+    background: var(--header-color);
+    color: var(--header-text);
     padding: 0 12px;
 
     display: flex;
@@ -219,15 +223,15 @@ navbar a span.active {
 
 navbar a span:hover {
     cursor: pointer;
-    background-color: var(--light-background-color);
+    background-color: var(--header-accent);
 }
 
 navbar a:visited {
-    color: var(--foreground-color);
+    color: var(--header-text);
 }
 
 navbar a {
-    color: var(--foreground-color);
+    color: var(--header-text);
     text-decoration: none;
 }
 
index 613d86601ee7116b0185330522c25107ede33473..19784989bf704a08b70ae681e67a559f579a66b2 100644 (file)
@@ -6,7 +6,7 @@ Onyx Documentation
 
 {{ block "page_content" }}
 
-<div class="container">
+<div class="container header">
     <h1>Onyx Docs</h1>
 </div>
 
index cfc1e742ec606f10b77bced70de6f9593da5043f..6e739b802190efaef6ae99b4e648f3854f59ef0f 100644 (file)
@@ -4,7 +4,7 @@
 
 {{ block "page_content" }}
 
-<div class="container">
+<div class="container header">
     <h1>Installing Onyx</h1>
     <p>
         <a class="link-button" href="#online">Online</a>
index 2592aa7988eebe56eef1f5e80420f86c8d8aab2a..eded8c323a8adf5689f38ee90e6531f6ec8ada04 100644 (file)
@@ -4,7 +4,7 @@
 
 {{ block "page_content" }}
 
-<div class="container">
+<div class="container header">
     <h1>Setting Up Your Environment for Onyx</h1>
 
     <p>The following sections will help set up an environment for you to program Onyx effectively.</p>
index 693cdbde65ac55656256f5d29911e776c8560126..4e6c6e0e9f51eea60b30af78d52110c3e6265203 100644 (file)
@@ -6,7 +6,7 @@
 
 {{ block "page_content" }}
 
-<div class="container">
+<div class="container header">
     <div style="text-align: center;">
         <h1>The <b>Onyx</b> Programming Language</h1>
     </div>
     </div>
 </div>
 
+
+<div class="container">
+    <div style="text-align: center;">
+        <div style="margin-bottom: 26px">
+            Run the following command in your favorite shell on <strong>Linux or MacOS</strong> and get started with Onyx.
+        </div>
+        <div>
+            <span style="font-size: 16pt; font-family: monospace; padding: 20px; color: var(--header-text); background: var(--header-color); border-radius: 8px; box-shadow: 0px 1px 4px 1px rgba(0, 0, 0, 0.4)">
+                sh&nbsp;&lt;(curl&nbsp;https://get.onyxlang.io&nbsp;-sSfL)
+            </span>
+        </div>
+        <div style="margin-top: 40px">
+            Or try Onyx online and read the docs!
+        </div>
+        <div style="margin-top: 26px; display: flex; flex-direction: row; gap: 40px;">
+            <a style="flex: 1; border-radius: 8px; padding: 16px; font-size: 16pt; background: var(--header-color); color: var(--header-text); box-shadow: 0px 1px 4px 1px rgba(0, 0, 0, 0.4)" href="/playground">TRY ONLINE</a>
+            <a style="flex: 1; border-radius: 8px; padding: 16px; font-size: 16pt; background: var(--header-color); color: var(--header-text); box-shadow: 0px 1px 4px 1px rgba(0, 0, 0, 0.4)" href="/docs">READ THE DOCS</a>
+        </div>
+    </div>
+</div>
+
+
+
 <div class="container light">
     <h2 style="margin-bottom: 8px">Recent News</h2>
 </div>
index 17ee123f34c703bb0a75a71b7e5633e95a96c121..48544602585cae64b4dc1eeaa099e6b58c5ade28 100644 (file)
@@ -4,7 +4,7 @@
 
 {{block "page_content"}}
 
-<div class="container">
+<div class="container header">
     <h1>News</h1>
 </div>
 
index 3a9224b6770e922c6eebd36b6b6628529d9250a6..89e0a9a45fccab432cc629fa1a889dc604137185 100644 (file)
@@ -7,6 +7,15 @@
 <main>
     {% partial "partials/navbar" %}
 
+    <div class="container header">
+        <h1>
+            {% $article.name %}
+        </h1>
+        <p>
+            {% $article.description %}
+        </p>
+    </div>
+
     <div class="container">
         {% $article.contents %}
     </div>