From 0f2ba45267b103a99e31d97aa4bac2a0e7e926b6 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 14 Sep 2021 17:54:23 -0400 Subject: [PATCH] wip test new site content --- server/src/about_app.rs | 15 +++++++ server/src/main.rs | 2 + server/templates/about_app.hbs | 63 ++++++++++++++++++++++++++++ server/templates/partials/layout.hbs | 6 +++ 4 files changed, 86 insertions(+) create mode 100644 server/src/about_app.rs create mode 100644 server/templates/about_app.hbs diff --git a/server/src/about_app.rs b/server/src/about_app.rs new file mode 100644 index 0000000000000000000000000000000000000000..020a536cc59357dbe57fbd1f47f03fea9183789e --- /dev/null +++ b/server/src/about_app.rs @@ -0,0 +1,15 @@ +use crate::{AppState, Request, RequestExt}; +use std::sync::Arc; +use tide::http::mime; + +pub fn add_routes(app: &mut tide::Server>) { + app.at("/app").get(get_about_app); +} + +async fn get_about_app(mut request: Request) -> tide::Result { + let data = request.layout_data().await?; + Ok(tide::Response::builder(200) + .body(request.state().render_template("about_app.hbs", &data)?) + .content_type(mime::HTML) + .build()) +} diff --git a/server/src/main.rs b/server/src/main.rs index ba54f05f1c4d33fe5947f30f4257d962b3348ba8..635430d793a760313b2092c6664625437d1ae454 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -9,6 +9,7 @@ mod github; mod home; mod rpc; mod team; +mod about_app; use self::errors::TideResultExt as _; use anyhow::Result; @@ -173,6 +174,7 @@ pub async fn run_server( web.with(errors::Middleware); home::add_routes(&mut web); team::add_routes(&mut web); + about_app::add_routes(&mut web); admin::add_routes(&mut web); auth::add_routes(&mut web); assets::add_routes(&mut web); diff --git a/server/templates/about_app.hbs b/server/templates/about_app.hbs new file mode 100644 index 0000000000000000000000000000000000000000..371ebbdd61c4bc5953983bbf50caa263d68df5db --- /dev/null +++ b/server/templates/about_app.hbs @@ -0,0 +1,63 @@ +{{#> layout }} + +
+

TEST TEST

+
+
+ +
+ + TEST TEST TEST + +
+ Nathan joined GitHub in late 2011 to build the Atom text editor, and + he led the Atom team until 2018. He also co-led development of Teletype for Atom, pioneering one of the first production + uses of conflict-free replicated data types for collaborative text editing. He's been dreaming about + building the world’s best text editor since he graduated from college, and is excited to finally + have + the knowledge, tools, and resources to achieve this vision. +
+
+
+
+ +
+ + ANTONIO SCANDURRA + +
+ Antonio joined the Atom team in 2014 while still in university after his outstanding open source + contributions caught the attention of the team. He later joined Nathan in architecting Teletype for + Atom and researching the foundations of what has turned into Zed. For the last two years, + he’s + become an expert in distributed systems and conflict-free replicated data types through the + development of a real-time, distributed, conflict-free database implemented in Rust for Ditto. +
+
+
+
+ +
+ + MAX BRUNSFELD + +
+ Max joined the Atom team in 2013 after working at Pivotal Labs. While driving Atom towards its 1.0 + launch during the day, Max spent nights and weekends building Tree-sitter, a blazing-fast and + expressive incremental parsing framework that currently powers all code analysis at GitHub. Before + leaving to start Zed, Max helped GitHub's semantic analysis team integrate Tree-sitter to support + syntax highlighting and code navigation on github.com. +
+
+
+
+
+ +{{/layout}} diff --git a/server/templates/partials/layout.hbs b/server/templates/partials/layout.hbs index 1e4a3561bda5f10287617c1f2a5e4c2a39c13628..244c218052b59e123f5bc146293dd04fa910de4d 100644 --- a/server/templates/partials/layout.hbs +++ b/server/templates/partials/layout.hbs @@ -30,10 +30,16 @@ ZEDINDUSTRIES
+ + The App + Team {{#if current_user}} + + test + {{#if current_user.is_admin }} Admin