From 383e51366022f7c2f026e7a2670ae8bec98dc186 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Sat, 18 Nov 2023 23:51:00 -0600 Subject: [PATCH] applying new look to the site --- src/app.onyx | 9 ++-- www/news-articles/index.json | 14 +++--- www/news-articles/ovmwasm.html | 2 - www/news-articles/release-0.1.1.html | 6 --- www/news-articles/release-0.1.2.html | 6 --- www/news-articles/release-0.1.3.html | 6 --- www/news-articles/release-0.1.4.html | 13 ------ www/news-articles/release-0.1.5.html | 6 --- www/news-articles/release-0.1.6.html | 5 -- www/news-articles/release-0.1.7.html | 5 -- www/static/css/new_style.css | 66 ++++++++++++++------------- www/templates/pages/docs.html | 2 +- www/templates/pages/docs/install.html | 2 +- www/templates/pages/docs/setup.html | 2 +- www/templates/pages/homepage.html | 25 +++++++++- www/templates/pages/news.html | 2 +- www/templates/pages/news_article.html | 9 ++++ 17 files changed, 85 insertions(+), 95 deletions(-) diff --git a/src/app.onyx b/src/app.onyx index c1ad441..a6bedf4 100644 --- a/src/app.onyx +++ b/src/app.onyx @@ -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..."); } diff --git a/www/news-articles/index.json b/www/news-articles/index.json index 8944961..949c83f 100644 --- a/www/news-articles/index.json +++ b/www/news-articles/index.json @@ -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 futexes 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 big breaking change to most Onyx programs. In short, map.get now returns an Optional, 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 ovmwasm 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 tagged unions, 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", diff --git a/www/news-articles/ovmwasm.html b/www/news-articles/ovmwasm.html index daef19e..9316269 100644 --- a/www/news-articles/ovmwasm.html +++ b/www/news-articles/ovmwasm.html @@ -1,5 +1,3 @@ -

Onyx's Custom Runtime

-

As Onyx targets WebAssembly (WASM) exclusively, running code outside of the browser requires a WASM embedder. 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. diff --git a/www/news-articles/release-0.1.1.html b/www/news-articles/release-0.1.1.html index 6a668e7..fdabee9 100644 --- a/www/news-articles/release-0.1.1.html +++ b/www/news-articles/release-0.1.1.html @@ -1,9 +1,3 @@ -

Beta Release 0.1.1

- -

- This release of Onyx brings minor changes and additions, with some general bugfixes. -

-

WASI Improvements

Much of the work done in this release was focused on improving the support of the WASI runtime. diff --git a/www/news-articles/release-0.1.2.html b/www/news-articles/release-0.1.2.html index aecd77b..294def2 100644 --- a/www/news-articles/release-0.1.2.html +++ b/www/news-articles/release-0.1.2.html @@ -1,9 +1,3 @@ -

Beta Release 0.1.2

- -

- This release of Onyx brings a substantial new feature called tagged unions, and a collection of other small bugfixes. -

-

Tagged Unions

Tagged unions are a big addition to the type system in Onyx, as they allow you to represent a new kind of type. diff --git a/www/news-articles/release-0.1.3.html b/www/news-articles/release-0.1.3.html index a7d6d73..12f129e 100644 --- a/www/news-articles/release-0.1.3.html +++ b/www/news-articles/release-0.1.3.html @@ -1,9 +1,3 @@ -

Beta Release 0.1.3

- -

-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 ovmwasm runtime. There are also numerous additions to the standard library. -

-

Code blocks with captures

Code blocks have always been a very powerful feature of Onyx, especially when combined with macros. Most of the core.slice 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 core.slice.fold as an example. diff --git a/www/news-articles/release-0.1.4.html b/www/news-articles/release-0.1.4.html index 01bc1a4..f5ac137 100644 --- a/www/news-articles/release-0.1.4.html +++ b/www/news-articles/release-0.1.4.html @@ -1,16 +1,3 @@ -

Beta Release 0.1.4

- -

-This is a small release that brings a big breaking change to most Onyx programs. -In short, map.get now returns an Optional, instead of the value directly. -This leads to cleaner and more understandable code. -

- -

-The Onyx package manager also sees a small update in the outputted library directory when packages are synchronized. -Assuming you are using the provided packages.onyx file, this should be a transparent change. -

-

Map uses Optional

diff --git a/www/news-articles/release-0.1.5.html b/www/news-articles/release-0.1.5.html index bc60578..0e95550 100644 --- a/www/news-articles/release-0.1.5.html +++ b/www/news-articles/release-0.1.5.html @@ -1,9 +1,3 @@ -

Beta Release 0.1.5

- -

-This release brings additions to Onyx's platform layer, allowing for missing things like futexes and TTY control. -

-

Futexes

diff --git a/www/news-articles/release-0.1.6.html b/www/news-articles/release-0.1.6.html index 598735e..59cc692 100644 --- a/www/news-articles/release-0.1.6.html +++ b/www/news-articles/release-0.1.6.html @@ -1,8 +1,3 @@ -

Beta Release 0.1.6

-

-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. -

-

There is one new feature worth mentioning and that is tagged globals.

diff --git a/www/news-articles/release-0.1.7.html b/www/news-articles/release-0.1.7.html index 0c6ca48..5e050bb 100644 --- a/www/news-articles/release-0.1.7.html +++ b/www/news-articles/release-0.1.7.html @@ -1,8 +1,3 @@ -

Beta Release 0.1.7

-

- This release of Onyx brings exciting and overdue features, including switch expression, WASIX support and an overhauled networking layer. -

-

Switch Expressions

Switch expressions allow you to write inline switch statements that evaluate to values, removing diff --git a/www/static/css/new_style.css b/www/static/css/new_style.css index d542f18..7170bfe 100644 --- a/www/static/css/new_style.css +++ b/www/static/css/new_style.css @@ -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; } diff --git a/www/templates/pages/docs.html b/www/templates/pages/docs.html index 613d866..1978498 100644 --- a/www/templates/pages/docs.html +++ b/www/templates/pages/docs.html @@ -6,7 +6,7 @@ Onyx Documentation {{ block "page_content" }} -

+

Onyx Docs

diff --git a/www/templates/pages/docs/install.html b/www/templates/pages/docs/install.html index cfc1e74..6e739b8 100644 --- a/www/templates/pages/docs/install.html +++ b/www/templates/pages/docs/install.html @@ -4,7 +4,7 @@ {{ block "page_content" }} -
+

Installing Onyx

Online diff --git a/www/templates/pages/docs/setup.html b/www/templates/pages/docs/setup.html index 2592aa7..eded8c3 100644 --- a/www/templates/pages/docs/setup.html +++ b/www/templates/pages/docs/setup.html @@ -4,7 +4,7 @@ {{ block "page_content" }} -

+

Setting Up Your Environment for Onyx

The following sections will help set up an environment for you to program Onyx effectively.

diff --git a/www/templates/pages/homepage.html b/www/templates/pages/homepage.html index 693cdbd..4e6c6e0 100644 --- a/www/templates/pages/homepage.html +++ b/www/templates/pages/homepage.html @@ -6,7 +6,7 @@ {{ block "page_content" }} -
+

The Onyx Programming Language

@@ -15,6 +15,29 @@
+ +
+
+
+ Run the following command in your favorite shell on Linux or MacOS and get started with Onyx. +
+
+ + sh <(curl https://get.onyxlang.io -sSfL) + +
+
+ Or try Onyx online and read the docs! +
+ +
+
+ + +

Recent News

diff --git a/www/templates/pages/news.html b/www/templates/pages/news.html index 17ee123..4854460 100644 --- a/www/templates/pages/news.html +++ b/www/templates/pages/news.html @@ -4,7 +4,7 @@ {{block "page_content"}} -
+

News

diff --git a/www/templates/pages/news_article.html b/www/templates/pages/news_article.html index 3a9224b..89e0a9a 100644 --- a/www/templates/pages/news_article.html +++ b/www/templates/pages/news_article.html @@ -7,6 +7,15 @@
{% partial "partials/navbar" %} +
+

+ {% $article.name %} +

+

+ {% $article.description %} +

+
+
{% $article.contents %}
-- 2.25.1