Starting out frontend
This commit is contained in:
parent
5b8d64ba8f
commit
64c76b9341
4 changed files with 15 additions and 3 deletions
1
project/frontend/Cargo.lock
generated
1
project/frontend/Cargo.lock
generated
|
@ -301,6 +301,7 @@ dependencies = [
|
||||||
name = "thesis-frontend"
|
name = "thesis-frontend"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"stdweb 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
"stdweb 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"yew 0.14.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"yew 0.14.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"yew-router 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"yew-router 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
|
@ -10,6 +10,7 @@ edition = "2018"
|
||||||
stdweb = "0.4.20"
|
stdweb = "0.4.20"
|
||||||
yew = { version = "0.14.3", features = ["std_web"] }
|
yew = { version = "0.14.3", features = ["std_web"] }
|
||||||
yew-router = { version = "0.11.0", features = ["std_web"] }
|
yew-router = { version = "0.11.0", features = ["std_web"] }
|
||||||
|
log = "0.4.8"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "app"
|
name = "app"
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
mod component;
|
||||||
|
|
||||||
|
use component::login::LoginComponent;
|
||||||
use yew::prelude::*;
|
use yew::prelude::*;
|
||||||
|
|
||||||
struct App {
|
struct App {
|
||||||
|
@ -34,10 +37,8 @@ impl Component for App {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn view(&self) -> Html {
|
fn view(&self) -> Html {
|
||||||
let button_text = if self.clicked { "Clicked!" } else { "Click me" };
|
|
||||||
|
|
||||||
html! {
|
html! {
|
||||||
<button onclick=&self.onclick>{ button_text }</button>
|
<LoginComponent:/>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,15 @@
|
||||||
<title>Thesis</title>
|
<title>Thesis</title>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<!-- UIkit CSS -->
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="https://cdn.jsdelivr.net/npm/uikit@3.4.0/dist/css/uikit.min.css"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- UIkit JS -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/uikit@3.4.0/dist/js/uikit.min.js"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/uikit@3.4.0/dist/js/uikit-icons.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="app.js"></script>
|
<script src="app.js"></script>
|
||||||
|
|
Loading…
Reference in a new issue