miscellaneous fixes
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 8 Dec 2023 02:56:28 +0000 (20:56 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 8 Dec 2023 02:56:28 +0000 (20:56 -0600)
src/app.onyx
www/static/css/new_style.css
www/templates/pages/community.html [new file with mode: 0644]
www/templates/pages/docs/guide_raylib.html
www/templates/pages/homepage.html
www/templates/pages/news.html
www/templates/partials/navbar.html

index e50ff2e11c0b23541c90e1a69f9db8adb0ae099d..3f8b580a9ad2e1fabb1ba024529e96be56863209 100644 (file)
@@ -70,6 +70,16 @@ reg: otmp.TemplateRegistry;
     });
 }
 
+@route.{.GET, "/playground"}
+(req: &Req, res: &Res) {
+    res->body("text/html", "This has been moved to <a href=\"https://try.onyxlang.io\">try.onyxlang.io</a>.");
+    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) {
index 3dd90b06d0f58202a1d2c61d47786b03a4e5340a..f4aa4515844840d18ddd607633b8531d6d7a73c8 100644 (file)
@@ -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 (file)
index 0000000..b1cafd7
--- /dev/null
@@ -0,0 +1,46 @@
+{{ block "title" }}
+Onyx Community
+{{ endblock }}
+
+{{ let navbar_page = "community" }}
+
+{{ block "page_content" }}
+
+<div class="container header">
+    <h1>Onyx Community</h1>
+</div>
+
+<div class="container">
+    <div class="title">
+        <h2>Discord</h2>
+    </div>
+
+    <p>
+    The Onyx programming language has an official Discord for questions, problem solving,
+    feature requests, and showing off your projects.
+    </p>
+    <div style="margin-top: 12px">
+        <a href="https://discord.gg/GVFamnQq" class="link-button">Join Discord</a>
+    </div>
+</div>
+
+<div class="container">
+    <div class="title">
+        <h2>GitHub</h2>
+    </div>
+
+    <p>
+    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.
+    </p>
+    <div style="margin-top: 12px">
+        <a href="https://github.com/onyx-lang/onyx" class="link-button">Go to GitHub</a>
+    </div>
+</div>
+
+{{ endblock }}
+
+{{ extends "pages/normal_page" }}
+
index 596b33df7db2317ce0e3f576748f978e75600f4f..c773df3f2e23bb6bd4533557947cf18c9299b2ab 100644 (file)
@@ -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
index c8552b80027507bfda5827531efc09b3deddb736..2f7126f5620f345574b3b1377ab41d6f855e41f9 100644 (file)
@@ -162,6 +162,26 @@ main :: () {
 </div>
 </div>
 
+<div class="container">
+    <div class="title">
+        <h2 style="margin-bottom: 8px">Onyx Community</h2>
+    </div>
+
+    <p>
+        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.
+    </p>
+    <p>
+        Onyx is an open source project so contributions from the community are welcome and encouraged!
+        The <code>onyx-lang/onyx</code> GitHub repository is the official source of Onyx.
+    </p>
+
+    <div style="margin-top: 12px">
+        <a href="https://discord.gg/GVFamnQq" class="link-button">Join Discord</a>
+        <a href="https://github.com/onyx-lang/onyx" class="link-button">Go to GitHub</a>
+    </div>
+</div>
+
 <div class="container">
     <div class="title">
         <h2 style="margin-bottom: 8px">Recent News</h2>
@@ -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);
 });
+*/
 </script>
 
 {{endblock}}
index 48544602585cae64b4dc1eeaa099e6b58c5ade28..93f189bfa49b824fb94707fd6ce4516eec04c1a1 100644 (file)
@@ -5,7 +5,7 @@
 {{block "page_content"}}
 
 <div class="container header">
-    <h1>News</h1>
+    <h1>Onyx News</h1>
 </div>
 
 {% partial "partials/news_listing" %}
index 032d793601b2617d76127ee43e4b82db72625a8d..e4fbc02ef2543ce53b5f17629ba63c60ccc27f10 100644 (file)
@@ -27,6 +27,7 @@
             <a target="_blank" href="https://try.onyxlang.io"><span>Try Onyx</span></a>
             <a href="/docs"><span {{ if navbar_page == "docs" }} class="active" {{ endif }}>Docs</span></a>
             <a href="/news"><span {{ if navbar_page == "news" }} class="active" {{ endif }}>News</span></a>
+            <a href="/community"><span {{ if navbar_page == "community" }} class="active" {{ endif }}>Community</span></a>
             <a href="https://github.com/onyx-lang/onyx" target="_blank"><span>GitHub</span></a>
         </div>
     </navbar>