From d35fd339acdefc9f0046ecb73b28d1a523941459 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Thu, 7 Dec 2023 20:56:28 -0600 Subject: [PATCH] miscellaneous fixes --- src/app.onyx | 10 +++++ www/static/css/new_style.css | 2 + www/templates/pages/community.html | 46 ++++++++++++++++++++++ www/templates/pages/docs/guide_raylib.html | 2 +- www/templates/pages/homepage.html | 22 +++++++++++ www/templates/pages/news.html | 2 +- www/templates/partials/navbar.html | 1 + 7 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 www/templates/pages/community.html diff --git a/src/app.onyx b/src/app.onyx index e50ff2e..3f8b580 100644 --- a/src/app.onyx +++ b/src/app.onyx @@ -70,6 +70,16 @@ reg: otmp.TemplateRegistry; }); } +@route.{.GET, "/playground"} +(req: &Req, res: &Res) { + res->body("text/html", "This has been moved to try.onyxlang.io."); + res->status(200); + res->end(); +} + +@route.{.GET, "/community"} +(req: &Req, res: &Res) => res->render("pages/community", null); + @route.{.GET, "/robots.txt"} (req: &Req, res: &Res) { diff --git a/www/static/css/new_style.css b/www/static/css/new_style.css index 3dd90b0..f4aa451 100644 --- a/www/static/css/new_style.css +++ b/www/static/css/new_style.css @@ -472,6 +472,7 @@ main li { position: relative; } +/* @media screen and (min-width: 800px) { .scrollport { mask-image: linear-gradient(to right, #0000 0, #000 10%, #000 90%, #0000 100%); @@ -491,6 +492,7 @@ main li { min-width: 1000px; } } +*/ table { border-radius: 8px; diff --git a/www/templates/pages/community.html b/www/templates/pages/community.html new file mode 100644 index 0000000..b1cafd7 --- /dev/null +++ b/www/templates/pages/community.html @@ -0,0 +1,46 @@ +{{ block "title" }} +Onyx Community +{{ endblock }} + +{{ let navbar_page = "community" }} + +{{ block "page_content" }} + +
+

Onyx Community

+
+ +
+
+

Discord

+
+ +

+ The Onyx programming language has an official Discord for questions, problem solving, + feature requests, and showing off your projects. +

+
+ Join Discord +
+
+ +
+
+

GitHub

+
+ +

+ Onyx is an open source project you can find on GitHub. + Pull requests and contributions from the community are more than welcome! + Onyx may have started as a personal project for one person, but that + does not mean its future cannot be shaped by everyone. +

+
+ Go to GitHub +
+
+ +{{ endblock }} + +{{ extends "pages/normal_page" }} + diff --git a/www/templates/pages/docs/guide_raylib.html b/www/templates/pages/docs/guide_raylib.html index 596b33d..c773df3 100644 --- a/www/templates/pages/docs/guide_raylib.html +++ b/www/templates/pages/docs/guide_raylib.html @@ -31,7 +31,7 @@ Package url: Package author: Brendan Hansen Package version (0.0.1): -$ onyx package add +$ onyx package add raylib Added 'raylib' version 0.0.3 $ onyx package sync diff --git a/www/templates/pages/homepage.html b/www/templates/pages/homepage.html index c8552b8..2f7126f 100644 --- a/www/templates/pages/homepage.html +++ b/www/templates/pages/homepage.html @@ -162,6 +162,26 @@ main :: () { +
+
+

Onyx Community

+
+ +

+ The Onyx programming language is on Discord! It is the place to chat about language + features, discuss problems you are having, and showcase your projects. +

+

+ Onyx is an open source project so contributions from the community are welcome and encouraged! + The onyx-lang/onyx GitHub repository is the official source of Onyx. +

+ +
+ Join Discord + Go to GitHub +
+
+

Recent News

@@ -180,6 +200,7 @@ document.querySelector("#install-command .copy-button").addEventListener("click" }); }) +/* let rotator = document.querySelector(".scrollport"); let rotatorIndex = 0; let ignoreNextScroll = false; @@ -196,6 +217,7 @@ rotator.addEventListener("scrollend", (e) => { if (ignoreNextScroll) ignoreNextScroll = false; else clearInterval(rotatorInterval); }); +*/ {{endblock}} diff --git a/www/templates/pages/news.html b/www/templates/pages/news.html index 4854460..93f189b 100644 --- a/www/templates/pages/news.html +++ b/www/templates/pages/news.html @@ -5,7 +5,7 @@ {{block "page_content"}}
-

News

+

Onyx News

{% partial "partials/news_listing" %} diff --git a/www/templates/partials/navbar.html b/www/templates/partials/navbar.html index 032d793..e4fbc02 100644 --- a/www/templates/partials/navbar.html +++ b/www/templates/partials/navbar.html @@ -27,6 +27,7 @@ Try Onyx Docs News + Community GitHub
-- 2.25.1