Skip to content

Commit

Permalink
update to the new versions of yew 0.16, yew-router 0.13 and adapt the…
Browse files Browse the repository at this point in the history
… tests to the new version
  • Loading branch information
dancespiele committed May 16, 2020
1 parent 0cce0ad commit 620f065
Show file tree
Hide file tree
Showing 21 changed files with 432 additions and 787 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Each component is splited in two parts, the logical yew component and its sass m
however, it is not necessary to worry about the sass module only it needs to be include in the project
### How install it
1. Install the sass module: `npm install yew-styles`
2. Add the yew_style crate in Cargo.toml file: `yew_styles = "0.3.0"`
2. Add the yew_style crate in Cargo.toml file: `yew_styles = "0.3.1"`
3. Import the main.css file in you main javascript/typescript file project:
```typescript
import 'node_modules/yew-styles/main.css';
Expand Down
4 changes: 1 addition & 3 deletions app/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import './yew-styles/main.sass';
import './page-styles/main.sass';
import 'prismjs';
import 'prismjs/themes/prism.css';
import 'prismjs/components/prism-rust';

import module from '../crate/Cargo.toml';
module.run();
51 changes: 25 additions & 26 deletions crate/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions crate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = "MIT"
name = "yew_style_page"
readme = "./README.md"
repository = "https://github.com/spielrs/yew-styles-page.git"
version = "0.3.0"
version = "0.3.1"

[lib]
crate-type = ["cdylib"]
Expand All @@ -20,8 +20,8 @@ serde = "1.0"
serde_derive = "1.0"
dotenv = "0.15"
failure = "0.1"
yew = { version="0.15", features = ["toml", "yaml", "msgpack", "cbor", "web_sys"]}
yew-router = {version="0.12", features = ["web_sys"] }
yew = { version="0.16", features = ["toml", "yaml", "msgpack", "cbor", "web_sys"]}
yew-router = {version="0.13", features = ["web_sys"] }
web-sys = "0.3"
yew_prism = {version="0.2"}
yew_prism = {version="0.3"}
yew_styles= {path= "./yew_styles"}
Binary file added crate/assets/spielrs_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions crate/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import init, { run_app } from './pkg/yewstyle_page.js';
async function main() {
await init('/pkg/yewstyle_page_bg.wasm');
run_app();
}
main()
2 changes: 1 addition & 1 deletion crate/src/page/navbar_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ fn get_navbar_type(
fixed=Fixed::None
navbar_style=style.style.clone()
navbar_type=navbar_type.navbar_type
branch=html!{<img src="/assets/spielrs_logo.png"></img>}
branch=html!{<img src="/spielrs_logo.png"></img>}
>
<NavbarContainer justify_content=JustifyContent::FlexStart(Mode::NoMode)>
{get_menus(link.clone(), navbar_type_rendered)}
Expand Down
1 change: 1 addition & 0 deletions crate/yew_styles/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target
Loading

0 comments on commit 620f065

Please sign in to comment.