Rework so project has a license, more natural crate structure, dedicated examples folder, less confusing lib heirarchy

This commit is contained in:
Ryan McGrath 2018-06-20 18:07:26 -04:00
parent 0c503a549a
commit 994d31ac3f
No known key found for this signature in database
GPG key ID: 811674B62B666830
21 changed files with 85 additions and 115 deletions

View file

@ -0,0 +1,7 @@
[package]
name = "layout"
version = "0.1.0"
authors = ["Ryan McGrath <ryan@rymc.io>"]
[dependencies]
shinekit = { path = "../.." }

View file

@ -0,0 +1,22 @@
//! App
//!
//! An "App" in Rust, which is really just wrapping a lot of platform-specific
//! logic. Attempts to do as much as possible in Rust, however the GUI story in
//! Rust is the worst thing at the moment, so a lot of this is glorified message
//! passing to Objective C and co. ObjC is also one of the best languages ever
//! created and you can fight me on this if you so choose.
//!
//! @author Ryan McGrath <ryan@rymc.io>
//! @created 05/30/2018
extern crate shinekit;
use shinekit::*;
fn main() {
shinekit::run(vec![
StyleSheet::default(include_str!("styles/default.json"))
], App::new("eSports Calendar", View::named("root").subviews(vec![
View::named("sidebar"),
View::named("content")
])));
}

View file

@ -0,0 +1,5 @@
{
"calendar": {
"backgroundColor": "blue"
}
}

View file

@ -0,0 +1,27 @@
{
"window": {
"backgroundColor": {"r": 35, "g": 108, "b": 218},
"defaultWidth": 800,
"defaultHeight": 600
},
"root": {
"backgroundColor": {"r": 35, "g": 108, "b": 218}
},
"sidebar": {
"backgroundColor": {"r": 5, "g": 5, "b": 5},
"width": 200,
"top": "root.top",
"left": "root.left",
"bottom": "root.bottom"
},
"content": {
"backgroundColor": {"r": 35, "g": 108, "b": 218},
"top": "root.top",
"left": "sidebar.right",
"right": "root.right",
"bottom": "root.bottom"
}
}