A basic website. Can be redone later, just enough to fill the domain and point people in the right direction.

This commit is contained in:
Ryan McGrath 2019-05-24 17:20:52 -07:00
parent 1ba17c9a37
commit 2044ab7fc7
No known key found for this signature in database
GPG key ID: 811674B62B666830
29 changed files with 202 additions and 4 deletions

View file

@ -21,7 +21,7 @@ Alchemy will, ideally, support the platforms listed below. At the moment, the `C
- `qt`, which affords a `Qt` layer. This is mostly indended for `KDE` users; if you'd like to run it elsewhere, you're on your own. - `qt`, which affords a `Qt` layer. This is mostly indended for `KDE` users; if you'd like to run it elsewhere, you're on your own.
- `uwp`, which affords a `"UWP"` layer for Microsoft platforms that support it. This is a bit of a hack, provided by linking into the [microsoft/WinObjC](https://github.com/Microsoft/WinObjC/) framework, originally intended for porting `iOS` applications to `UWP`. Down the road, if or when a proper `UWP` library for Rust surfaces, I'd be happy to look at replacing this. - `uwp`, which affords a `"UWP"` layer for Microsoft platforms that support it. This is a bit of a hack, provided by linking into the [microsoft/WinObjC](https://github.com/Microsoft/WinObjC/) framework, originally intended for porting `iOS` applications to `UWP`. Down the road, if or when a proper `UWP` library for Rust surfaces, I'd be happy to look at replacing this.
Support for more platforms is desired - for example, I think an [`OrbTk`](https://gitlab.redox-os.org/redox-os/orbtk) or [`Piston`](https://www.piston.rs) backend could be cool to see. A [`winapi-rs`](https://github.com/retep998/winapi-rs) backend could be cool, too! Support for more platforms is desired - for example, I think an [`OrbTk`](https://gitlab.redox-os.org/redox-os/orbtk) or [`Piston`](https://www.piston.rs) backend could be cool to see. A `web` backend would be awesome to support. A [`winapi-rs`](https://github.com/retep998/winapi-rs) backend could be cool, too!
## What Currently Works...? ## What Currently Works...?
At the moment, the following is implemented: At the moment, the following is implemented:
@ -78,19 +78,19 @@ fn main() {
} }
}); });
alchemy::shared_app().run(AppState { app.run(AppState {
window: Window::new("Le Appy App", (0., 0., 600., 600.), WindowState {}) window: Window::new("Le Appy App", (0., 0., 600., 600.), WindowState {})
}); });
} }
``` ```
## Does it support custom Components? ## Does it support custom Components?
Alchemy implements the React component lifecycle. It does not (currently) implement Hooks, and may or may not implement them in the future. The class-based lifecycle maps fairly well to Rust idioms already, as you really never wanted to subclass in React anyway. Yes. Alchemy implements the React component lifecycle - although it does not (currently) implement Hooks, and may or may not implement them in the future. The class-based lifecycle maps fairly well to Rust idioms already, as you really never wanted to subclass in React anyway.
A custom component would look like the following: A custom component would look like the following:
``` rust ``` rust
use alchemy::{Component, Error, rsx, RSX}; use alchemy::{Component, Error, Props, rsx, RSX};
pub struct MySpecialWidget { pub struct MySpecialWidget {
your_special_value_or_whatever: i32 your_special_value_or_whatever: i32

16
website/config.toml Normal file
View file

@ -0,0 +1,16 @@
# The URL the site will be built for
base_url = "https://alchemy.rs"
# Whether to automatically compile all Sass files in the sass directory
compile_sass = false
# Whether to do syntax highlighting
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
highlight_code = true
highlight_theme = "dracula"
# Whether to build a search index to be used later on by a JavaScript library
build_search_index = true
[extra]
# Put all your custom variables here

69
website/content/_index.md Normal file
View file

@ -0,0 +1,69 @@
+++
title = "Alchemy - A Rust GUI Framework"
template = "index.html"
+++
# A New Rust GUI Framework
Alchemy is a Rust GUI Framework, backed by native widgets on each platform it supports, with an API that's a blend of those found in AppKit, UIKit, and React Native. It supports a JSX-ish syntax (RSX), styling with CSS, the safety of building in Rust, and a familiar API for many developers who build UI on a daily basis. The goal is to provide an API that feels at home in Rust, while striving to provide a visual appearance that's easy to scan and parse. It does not, and will never, require nightly. It's still early stages, but feedback and contributions are welcome.
## What's It Look Like?
``` rust
use alchemy::{
AppDelegate, Error, RSX, rsx,
styles, View, Window, WindowDelegate
};
struct AppState {
window: Window
}
impl AppDelegate for AppState {
fn did_finish_launching(&mut self) {
self.window.show();
}
}
struct WindowState;
impl WindowDelegate for WindowState {
fn render(&self) -> Result<RSX, Error> {
Ok(rsx! {
<View styles=["box"]>
<View styles=["innerbox"] />
</View>
})
}
}
fn main() {
let app = alchemy::shared_app();
app.register_styles("default", styles! {
box {
background-color: #307ace;
width: 300;
height: 300;
margin-top: 10;
padding-top: 10;
}
innerbox {
background-color: #003366;
width: 200;
height: 200;
}
});
let dimensions = (0., 0., 600., 600.);
app.run(AppState {
window: Window::new("Le Appy App", dimensions, WindowState {})
});
}
```
<div id="tempGetStarted">
<h2>Get Started</h2>
<a href="https://github.com/ryanmcgrath/alchemy/" title="Browse the Alchemy Source Code on GitHub" class="getStartedBtn gh">GitHub</a>
<a href="https://docs.rs/alchemy/" title="Read the Alchemy Documentation on docs.rs" class="getStartedBtn">Docs</a>
</div>

BIN
website/static/banner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

View file

@ -0,0 +1,20 @@
* { box-sizing: border-box; }
html, body { padding 0; margin: 0; background: #131414; color: #e1edf1; font-family: Helvetica Neue,Helvetica,sans-serif; }
body { max-width: 900px; margin: 0 auto; }
a, a:visited { color: #ca1134; }
a:hover { color: #d90b31; background: #f4f4f4; }
pre { font-size: 1rem; line-height: 1.3rem; border-radius: 4px; overflow: auto; padding: 1.3rem; margin-bottom: 1.5rem; font-family: "Anonymous Pro", Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif; }
pre span { font-style: normal !important; text-decoration: none !important; }
#banner { width: 100%; }
h1 { color: #f3f3f3; font-size: 2.1rem; line-height: 2.4rem; font-family: aleo; margin: .5rem 0 .6rem; }
h2 { font-size: 1.3rem; line-height: 1.8rem; font-family: aleo, georgia, serif; margin: 0; padding: 2rem 1.3rem .45rem 0; color: #959e9d; }
p { font-size: 1rem; line-height: 1.4rem; }
#tempGetStarted { text-align: center; }
#tempGetStarted h2 { padding-right: 0; }
.getStartedBtn { display: inline-block; font: normal 1.4rem/2rem aleo, georgia, serif; padding: 1.4rem 4rem; background: #307ace; text-decoration: none; color: #e1edf1; border-radius: 8px; }
.gh { margin-right: 1.4rem; }
footer { text-align: center; margin-top: 4rem; margin-bottom: 2rem; font-size: .8rem; line-height: 1rem; color: #555; }

File diff suppressed because one or more lines are too long

BIN
website/static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 629 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

4
website/static/humans.txt Executable file
View file

@ -0,0 +1,4 @@
Site: https://rymc.io/
Twitter: @ryanmcgrath
GitHub: ryanmcgrath
Dribbble: ryanmcgrath

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View file

@ -0,0 +1,5 @@
{% extends "layout.html" %}
{% block content %}
{{ section.content|safe }}
{% endblock %}

View file

@ -0,0 +1,72 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="lt-ie9"><![endif]-->
<!--[if gt IE 8]><!--><html><!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0">
<title>{% block title %}Alchemy - A Rust GUI Framework{% endblock %}</title>
<meta name="description" content="{% block meta_desc %}Alchemy enables interactive UIs in Rust. Design widgets for your app, and Alchemy will efficiently render with native widgets per-platform.{% endblock %}">
<meta property="og:title" content="{% block og_title %}Alchemy - A Rust GUI Framework{% endblock %}">
<meta property="og:description" content="{% block og_desc %}Alchemy enables interactive UIs in Rust. Design widgets for your app, and Alchemy will efficiently render with native widgets per-platform.{% endblock %}">
<meta property="og:site_name" content="Alchemy - A Rust GUI Framework">
<meta property="og:image" content="{% block og_image %}https://rymc.io/img/avatar.png{% endblock %}">
<meta property="og:locale" content="en_US">
<meta name="twitter:site" content="@ryanmcgrath">
<meta name="twitter:creator" content="@ryanmcgrath">
<meta name="twitter:card" content="summary">
<meta name="twitter:description" content="{% block twitter_desc %}Alchemy enables interactive UIs in Rust. Design widgets for your app, and Alchemy will efficiently render with native widgets per-platform.{% endblock %}">
<link rel="manifest" href="/icons/manifest.json">
<link rel="mask-icon" href="/icons/safari-pinned-tab.svg" color="#131414">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="Alchemy">
<meta name="application-name" content="Alchemy">
<meta http-equiv="cleartype" content="on">
<meta name="theme-color" content="#131414">
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="https://alchemy.rs/favicons/apple-touch-icon-57x57.png" />
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="https://alchemy.rs/favicons/apple-touch-icon-114x114.png" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="https://alchemy.rs/favicons/apple-touch-icon-72x72.png" />
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="https://alchemy.rs/favicons/apple-touch-icon-144x144.png" />
<link rel="apple-touch-icon-precomposed" sizes="60x60" href="https://alchemy.rs/favicons/apple-touch-icon-60x60.png" />
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="https://alchemy.rs/favicons/apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="https://alchemy.rs/favicons/apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="https://alchemy.rs/favicons/apple-touch-icon-152x152.png" />
<link rel="icon" type="image/png" href="https://alchemy.rs/favicons/favicon-196x196.png" sizes="196x196" />
<link rel="icon" type="image/png" href="https://alchemy.rs/favicons/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/png" href="https://alchemy.rs/favicons/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="https://alchemy.rs/favicons/favicon-16x16.png" sizes="16x16" />
<link rel="icon" type="image/png" href="https://alchemy.rs/favicons/favicon-128.png" sizes="128x128" />
<meta name="application-name" content="Alchemy - A Rust GUI Framework"/>
<meta name="msapplication-TileColor" content="#131414" />
<meta name="msapplication-TileImage" content="https://alchemy.rs/favicons/mstile-144x144.png" />
<meta name="msapplication-square70x70logo" content="https://alchemy.rs/favicons/mstile-70x70.png" />
<meta name="msapplication-square150x150logo" content="https://alchemy.rs/favicons/mstile-150x150.png" />
<meta name="msapplication-wide310x150logo" content="https://alchemy.rs/favicons/mstile-310x150.png" />
<meta name="msapplication-square310x310logo" content="https://alchemy.rs/favicons/mstile-310x310.png" />
<link type="text/plain" rel="author" href="/humans.txt" />
<link href="/rss.xml" rel="alternate" title="" type="application/rss+xml">
<!--[if lte IE 8]>
(function(i,e){for(;i<10;i++)document.createElement(e[i]);})(0,['section','article','aside','header','footer','nav','figure','figcaption','time','mark']);
<![endif]-->
{% set reset = load_data(path="static/css/reset.css", format="plain") %}
{% set layout = load_data(path="static/css/layout.css", format="plain") %}
<style type="text/css">{{ reset|safe }}{{ layout|safe }}{% block css %}{% endblock %}</style>
</head>
<body>
<img src="/images/banner.png" alt="Alchemy" id="banner" />
{% block content %}{% endblock %}
<footer>Created by <a href="https://rymc.io/">Ryan McGrath</a>. A more complete site for this project will come later. :)</footer>
{% block js %}{% endblock %}
<script type="application/ld+json"> {
"@context" : "https://schema.org",
"@type" : "SoftwareSourceCode",
"codeRepository": "https://github.com/ryanmcgrath/alchemy/",
"programmingLanguage": "rust",
"name" : "Alchemy - A Rust GUI Framework",
"url" : "https://alchemy.rs/",
"sameAs" : ["https://crates.io/crates/alchemy", "https://docs.rs/alchemy/"]
} </script>
</body>
</html>