Detailed changes
@@ -9,8 +9,6 @@ mod github;
mod home;
mod rpc;
mod team;
-mod story;
-mod updates;
mod releases;
mod community;
@@ -177,9 +175,7 @@ pub async fn run_server(
web.with(errors::Middleware);
home::add_routes(&mut web);
team::add_routes(&mut web);
- story::add_routes(&mut web);
releases::add_routes(&mut web);
- updates::add_routes(&mut web);
community::add_routes(&mut web);
admin::add_routes(&mut web);
auth::add_routes(&mut web);
@@ -1,15 +0,0 @@
-use crate::{AppState, Request, RequestExt};
-use std::sync::Arc;
-use tide::http::mime;
-
-pub fn add_routes(story: &mut tide::Server<Arc<AppState>>) {
- story.at("/story").get(get_story);
-}
-
-async fn get_story(mut request: Request) -> tide::Result {
- let data = request.layout_data().await?;
- Ok(tide::Response::builder(200)
- .body(request.state().render_template("story.hbs", &data)?)
- .content_type(mime::HTML)
- .build())
-}
@@ -1,55 +0,0 @@
-use crate::{
- auth::RequestExt as _, github::Release, AppState, LayoutData, Request, RequestExt as _,
-};
-use comrak::ComrakOptions;
-use serde::{Serialize};
-use std::sync::Arc;
-use tide::{http::mime};
-
-pub fn add_routes(updates: &mut tide::Server<Arc<AppState>>) {
- updates.at("/updates").get(get_updates);
-}
-
-async fn get_updates(mut request: Request) -> tide::Result {
-
- #[derive(Serialize)]
- struct UpdatesData {
- #[serde(flatten)]
- layout: Arc<LayoutData>,
- releases: Option<Vec<Release>>,
- }
-
- let mut data = UpdatesData {
- layout: request.layout_data().await?,
- releases: None,
- };
-
- if let Some(user) = request.current_user().await? {
- if user.is_insider {
- data.releases = Some(
- request
- .state()
- .repo_client
- .releases()
- .await?
- .into_iter()
- .filter_map(|mut release| {
- if release.draft {
- None
- } else {
- let mut options = ComrakOptions::default();
- options.render.unsafe_ = true; // Allow raw HTML in the markup. We control these release notes anyway.
- release.body = comrak::markdown_to_html(&release.body, &options);
- Some(release)
- }
- })
- .collect(),
- );
- }
- }
-
- Ok(tide::Response::builder(200)
- .body(request.state().render_template("updates.hbs", &data)?)
- .content_type(mime::HTML)
- .build())
-}
@@ -72,9 +72,6 @@
Waitlist <span class="pt-1 mr-1 text-lg text-gray-500">Β·</span>
</a>
{{#if current_user}}
- <a href="/updates" class="mr-2 text-lg leading-relaxed">
- Updates <span class="pt-1 mr-1 text-lg text-gray-500">Β·</span>
- </a>
<a href="/releases" class="mr-2 text-lg leading-relaxed">
Releases <span class="pt-1 mr-1 text-lg text-gray-500">Β·</span>
</a>
@@ -130,12 +127,6 @@
{{#if current_user}}
<div class="flex flex-col mt-10 font-mono">
<p class="text-xs tracking-widest uppercase opacity-50">Insiders</p>
- <a href="/updates" class="relative mt-2 text-base no-underline lowercase hover:underline">
- <span class="absolute items-center justify-center hidden h-full align-middle nav-active-arrow -left-7">
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.1594 12.1606C10.0309 12.0567 9.96803 11.8899 9.96803 11.7204C9.96803 11.5509 10.0321 11.3846 10.1603 11.2564L12.7596 8.65813H1.6562C1.29392 8.65813 1 8.36284 1 7.97732C1 7.63829 1.29392 7.34573 1.6562 7.34573H12.7596L10.1613 4.74747C9.90501 4.49114 9.90501 4.07596 10.1613 3.81949C10.4177 3.56303 10.8328 3.56317 11.0893 3.81949L14.8078 7.53794C15.0641 7.79427 15.0641 8.20945 14.8078 8.46592L11.0893 12.1844C10.832 12.4395 10.4164 12.4395 10.1594 12.1606Z" fill="white"/></svg>
- </span>
- Updates
- </a>
<a href="/releases" class="relative mt-2 text-base no-underline lowercase hover:underline">
<span class="absolute items-center justify-center hidden h-full align-middle nav-active-arrow -left-7">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.1594 12.1606C10.0309 12.0567 9.96803 11.8899 9.96803 11.7204C9.96803 11.5509 10.0321 11.3846 10.1603 11.2564L12.7596 8.65813H1.6562C1.29392 8.65813 1 8.36284 1 7.97732C1 7.63829 1.29392 7.34573 1.6562 7.34573H12.7596L10.1613 4.74747C9.90501 4.49114 9.90501 4.07596 10.1613 3.81949C10.4177 3.56303 10.8328 3.56317 11.0893 3.81949L14.8078 7.53794C15.0641 7.79427 15.0641 8.20945 14.8078 8.46592L11.0893 12.1844C10.832 12.4395 10.4164 12.4395 10.1594 12.1606Z" fill="white"/></svg>
@@ -2,31 +2,33 @@
<div class="max-w-screen-lg p-10 mx-auto font-extralight text-main lg:p-20">
{{#if current_user}}
-
<h1 class="mb-10 font-display font-extralight">Releases</h1>
- <p class="mt-5 leading-relaxed">Zed is currently only available on OS X.</p>
- <p class="mt-5 leading-relaxed">We are frequently shipping new versions, check back regularly to get the most recent version.</p>
+ <p class="mt-5 leading-relaxed">Zed is currently only available on macOS.</p>
+ <p class="mt-5 mb-10 leading-relaxed">We are frequently shipping new versions, check back regularly to get the most recent version.</p>
+
{{#if releases}}
- <ul class="mt-10 leading-relaxed">
- {{#each releases}}
- <li id="release-{{name}}" class="mb-5">
- <a class="text-lg leading-relaxed underline hover:text-gray-300" href="/releases/{{tag_name}}/{{assets.0.name}}">Zed {{name}}</a></h2>
- <p class="mt-2 text-gray-400">
- <a class="hover:text-white" href="https://github.com/zed-industries/zed/releases/tag/{{tag_name}}">Release Notes</a>
- </p>
- </li>
- {{/each}}
- </ul>
-
+ {{#each releases}}
+ <article id="{{name}}" class="mb-20">
+ <h3 class="mb-2 font-display font-extralight">{{name}}</h3>
+ <div>
+ <a class="text-sm underline opacity-80 hover:opacity-100" href="/releases/{{tag_name}}/{{assets.0.name}}">Download</a> Β· <a class="text-sm underline opacity-50 hover:opacity-100" href="https://github.com/zed-industries/zed/releases/tag/{{tag_name}}">Release Notes</a>
+ </p>
+ <div class="mt-10 type-prose">
+ {{{body}}}
+ </div>
+ <div class="mt-5">
+ <p>———</p>
+ </div>
+ </article>
+ {{/each}}
{{/if}}
{{else}}
<h1 class="mb-10 font-display font-extralight">Hold it!</h1>
- <p class="mt-5 leading-relaxed">You can't access this without <a href=" /sign_in" class="mt-5 leading-relaxed underline hover:text-white">logging in</a>.</p>
- <p class="mt-5 leading-relaxed">Try <a href="/community" class="mt-5 leading-relaxed underline hover:text-white">joining our community</a> to get access to updates & releases.</p>
-
+ <p class="mt-5 leading-relaxed">You can't access this without <a href=" /sign_in" class="mt-5 leading-relaxed underline">logging in</a>.</p>
+ <p class="mt-5 leading-relaxed">Try <a href="/community" class="mt-5 leading-relaxed underline">joining our community</a> to get access to updates & releases.</p>
{{/if}}
</div>
@@ -1,57 +0,0 @@
-{{#> layout }}
-
-<div class="max-w-screen-lg p-10 mx-auto font-extralight lg:p-20">
- <h1 class="mb-10 text-4xl text-white font-display font-extralight">
- We think thereβs a better way to write codeβand we've been working for more than a decade to bring it into existence.
- </h1>
- <p class="mt-5 leading-relaxed">
- Our first attempt was Atom, which we loved like a child but which ultimately fell short of our original vision. When we created Electron in 2012 to serve as Atom's runtime, there weren't a lot of great options for building cross-platform desktop apps.
- </p>
- <p class="mt-5 leading-relaxed">
- Had we tried to write Atom in C or C++, it never would have shipped, and we loved the idea of developers extending their editor with the familiar tools of JavaScript, HTML, and CSS.
- </p>
- <p class="mt-5 leading-relaxed">
- In the end, however, we reached the conclusion that the editor we wanted to use couldn't be built in a single-threaded scripting language. It was time to start over. Now we're back from the wilderness, this time with the knowledge and tools we need to execute without compromise.
- </p>
- <p class="mt-5 leading-relaxed">
- We're leveraging Rust, conflict-free replicated data types, and every core of your CPU and GPU to deliver an editor that will make coding more productive, fun, and collaborative. We look forward to sharing our best with you!
- </p>
- <div class="flex flex-row mt-16 leading-relaxed">
- <div class="flex-initial mr-12">
- <h4 class="font-display">Nathan Sobo</h4>
- </div>
- <div class="flex-initial mr-12">
- <h4 class="font-display">Antonio Scandurra</h4>
- </div>
- <div class="flex-initial mr-12">
- <h4 class="font-display">Max Brunsfeld</h4>
- </div>
- <div class="flex-1"></div>
- </div>
-
- <p class="mt-4 text-sm text-gray-500">Co-founders</p>
-
- <div class="mt-10 cursor-pointer opacity-30 hover:opacity-100">
- <a href="mailto:hi@zed.dev">
- <svg width="180" height="45" viewBox="0 0 180 45" fill="none" xmlns="http://www.w3.org/2000/svg">
- <path d="M26.1837 12.7355L31.4584 6.93335H0.99707V33.043M26.1837 12.7355H6.79922V27.2409M26.1837 12.7355L20.909 18.5377M20.909 18.5377H12.6014V22.2335M20.909 18.5377L12.997 27.2409M12.997 27.2409H21.3046V23.545M12.997 27.2409L7.72229 33.043M7.72229 33.043L2.44761 38.8452H32.9089V12.7355M7.72229 33.043H27.1068V18.5377" stroke="white" stroke-width="1.99449" stroke-linejoin="bevel"/>
- <path d="M50.931 18.0863V16.8687L57.2102 8.72726C57.4649 8.40892 57.7116 8.09854 57.9503 7.79612C58.205 7.4937 58.396 7.3027 58.5233 7.22312L54.4645 7.29474C53.9393 7.29474 53.5254 7.44595 53.223 7.74837C52.9365 8.03487 52.7216 8.42484 52.5784 8.91826C52.4351 9.39576 52.3237 9.93694 52.2441 10.5418H51.2414L51.5518 6.14873H61.0063V7.15149L54.751 15.4839C54.5441 15.7545 54.3452 15.9933 54.1542 16.2002C53.9791 16.4071 53.7562 16.622 53.4857 16.8448L57.6638 16.9403C58.2846 16.9403 58.77 16.7971 59.1202 16.5106C59.4704 16.2082 59.733 15.8102 59.9081 15.3168C60.0991 14.8075 60.2423 14.2424 60.3378 13.6217H61.2929L60.9825 18.0863H50.931Z" fill="white"/>
@@ -1,31 +0,0 @@
-{{#> layout }}
-
-
-<div class="max-w-screen-lg p-10 mx-auto font-extralight text-main lg:p-20">
- {{#if current_user}}
-
- {{#if releases}}
-
- {{#each releases}}
- <article id="{{name}}" class="mb-20">
- <h1 class="mb-2 font-display font-extralight">{{name}}</h1>
- <a class="text-sm underline opacity-60 hover:no-underline" href="/releases/{{tag_name}}/{{assets.0.name}}">Download</a>
- <div class="mt-10 type-prose">
- {{{body}}}
- </div>
- <div class="mt-5">
- <p>———</p>
- </div>
- </article>
- {{/each}}
- {{/if}}
-
- {{else}}
-
- <h1 class="mb-10 font-display font-extralight">Hold it!</h1>
- <p class="mt-5 leading-relaxed">You can't access this without <a href=" /sign_in" class="mt-5 leading-relaxed underline">logging in</a>.</p>
- <p class="mt-5 leading-relaxed">Try <a href="/community" class="mt-5 leading-relaxed underline">joining our community</a> to get access to updates & releases.</p>
- {{/if}}
-</div>
-
-{{/layout}}