diff --git a/clippable-server/src/api.rs b/clippable-server/src/api.rs new file mode 100644 index 0000000..144aae4 --- /dev/null +++ b/clippable-server/src/api.rs @@ -0,0 +1,4 @@ +#[get("/")] +fn video_page() -> String { + format!("TODO") +} diff --git a/clippable-server/src/main.rs b/clippable-server/src/main.rs new file mode 100644 index 0000000..277861e --- /dev/null +++ b/clippable-server/src/main.rs @@ -0,0 +1,20 @@ +#![feature(decl_macro)] +#[macro_use] extern crate rocket; +use rocket_contrib::serve::StaticFiles; +use std::env; + + +#[get("/")] +fn video_page(id: u64) -> String { + format!("Video id requested: {}", id) +} + +fn main() { + // emoji's crash my terminal + env::set_var("ROCKET_CLI_COLORS", "off"); + + let _ = rocket::ignite() + .mount("/video", routes![video_page]) + .mount("/", StaticFiles::from("static")) + .launch(); +} diff --git a/clippable-server/static/img/tmp.png b/clippable-server/static/img/tmp.png new file mode 100644 index 0000000..192cc79 Binary files /dev/null and b/clippable-server/static/img/tmp.png differ diff --git a/clippable-server/static/index.html b/clippable-server/static/index.html new file mode 100644 index 0000000..0dcbea9 --- /dev/null +++ b/clippable-server/static/index.html @@ -0,0 +1,57 @@ + + + Clippable + + + + +
+
+
+

Clippable

+
+ + +
+
+ +
+
+ + diff --git a/clippable-server/static/style.css b/clippable-server/static/style.css new file mode 100644 index 0000000..9831678 --- /dev/null +++ b/clippable-server/static/style.css @@ -0,0 +1,42 @@ +html, body, div, tag { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + vertical-align: baseline; + background: #212121; + text-align: center; +} + +* { + box-sizing: border-box; +} + +.content { + margin: 0 auto; + padding: 0 2em; + line-height: 1.6em; + color: whitesmoke; +} +.video-gallery { + display: flex; + flex-wrap: wrap; + justify-content: center; +} + +.video-block { + padding: 1em; + width: 400px; + line-height: 1em; + margin-right: 1em; + margin-bottom: 1em; + background: #191818; + border-radius: 1em; +} + +.pure-form { + text-align: center; +} +.pure-img { + border-radius: 0.5em; +}