Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d9ffc5e

Browse files
committed
remove: tailwindcss
1 parent 623134f commit d9ffc5e

File tree

15 files changed

+125
-87545
lines changed

15 files changed

+125
-87545
lines changed

‎.npmrc‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@rust-lang-ve:registry=https://npm.pkg.github.com

‎bootstrap.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import './static/tailwind.output.css';
1+
import '@rust-lang-ve/gh-pages-layout/dist/main.css';
22

33
import('./pkg').then((module) => {
44
module.run_app();

‎package.json‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
{
22
"private": true,
33
"scripts": {
4-
"test": "echo \"Error: no test specified\" && exit 1",
54
"dev": "webpack --mode development",
65
"deploy": "yarn build && gh-pages -d dist -b master",
76
"build": "webpack --mode production",
8-
"build:tailwind": "tailwindcss build static/tailwind.css -o static/tailwind.output.css",
9-
"start:dev": "webpack-dev-server --mode development",
10-
"prestart": "yarn run build:tailwind",
11-
"prebuild": "yarn run build:tailwind",
12-
"prestart:dev": "yarn run build:tailwind",
13-
"prebuild:dev": "yarn run build:tailwind"
7+
"start:dev": "webpack-dev-server --mode development"
148
},
159
"devDependencies": {
1610
"@wasm-tool/wasm-pack-plugin": "^1.1.0",
@@ -24,6 +18,6 @@
2418
"webpack-dev-server": "^3.10.3"
2519
},
2620
"dependencies": {
27-
"tailwindcss": "^1.5.2"
21+
"@rust-lang-ve/gh-pages-layout": "^0.1.1"
2822
}
2923
}

‎src/components/button/mod.rs‎

Lines changed: 0 additions & 60 deletions
This file was deleted.

‎src/components/header/branding.rs‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
use yew::prelude::*;
2+
3+
pub struct Branding {
4+
link: ComponentLink<Self>,
5+
}
6+
7+
pub enum Msg {}
8+
9+
#[derive(Clone, PartialEq, Properties)]
10+
pub struct Props {}
11+
12+
impl Component for Branding {
13+
type Message = Msg;
14+
type Properties = Props;
15+
16+
fn create(props: Self::Properties, link: ComponentLink<Self>) -> Self {
17+
Branding {
18+
link,
19+
}
20+
}
21+
22+
fn update(&mut self, msg: Self::Message) -> ShouldRender {
23+
true
24+
}
25+
26+
fn change(&mut self, props: Self::Properties) -> ShouldRender {
27+
true
28+
}
29+
30+
fn view(&self) -> Html {
31+
html! {
32+
<div id="branding">
33+
<img
34+
alt="Rust Venezuela Logo"
35+
src="https://avatars3.githubusercontent.com/u/68873317?s=38&v=4"
36+
height="38"
37+
width="38"
38+
/>
39+
<h1>{ "Rust Venezuela" }</h1>
40+
</div>
41+
}
42+
}
43+
}

‎src/components/home/header.rs‎ renamed to ‎src/components/header/mod.rs‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1+
mod branding;
2+
mod social;
3+
4+
use crate::components::header::branding::Branding;
5+
use crate::components::header::social::Social;
6+
17
use yew::prelude::*;
28

39
pub struct Header {
410
link: ComponentLink<Self>,
511
}
612

7-
pub enum Msg {
8-
ChildClicked
9-
}
13+
pub enum Msg {}
1014

1115
#[derive(Clone, PartialEq, Properties)]
1216
pub struct Props {}
@@ -31,10 +35,10 @@ impl Component for Header {
3135

3236
fn view(&self) -> Html {
3337
html! {
34-
<header class="flex text-white bg-black p-4 box-border">
35-
<div class="flex">
36-
<img src="https://avatars3.githubusercontent.com/u/68873317?s=60&v=4" alt="Organization Logo" height="60" width="60" />
37-
<h1 class="box-border px-4">{"Rust Venezuela"}</h1>
38+
<header id="header">
39+
<div id="header-container">
40+
<Branding />
41+
<Social />
3842
</div>
3943
</header>
4044
}

‎src/components/header/social.rs‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
use yew::prelude::*;
2+
3+
pub struct Social {
4+
link: ComponentLink<Self>,
5+
}
6+
7+
pub enum Msg {}
8+
9+
#[derive(Clone, PartialEq, Properties)]
10+
pub struct Props {}
11+
12+
impl Component for Social {
13+
type Message = Msg;
14+
type Properties = Props;
15+
16+
fn create(props: Self::Properties, link: ComponentLink<Self>) -> Self {
17+
Social {
18+
link,
19+
}
20+
}
21+
22+
fn update(&mut self, msg: Self::Message) -> ShouldRender {
23+
true
24+
}
25+
26+
fn change(&mut self, props: Self::Properties) -> ShouldRender {
27+
true
28+
}
29+
30+
fn view(&self) -> Html {
31+
html! {
32+
<ul id="social">
33+
<li>
34+
<a href="">
35+
<span class="icon telegram-icon s-28"></span>
36+
</a>
37+
</li>
38+
<li>
39+
<a href="">
40+
<span class="icon github-icon s-28"></span>
41+
</a>
42+
</li>
43+
</ul>
44+
}
45+
}
46+
}

‎src/components/home/mod.rs‎

Lines changed: 0 additions & 46 deletions
This file was deleted.

‎src/components/mod.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
pub mod home;
2-
pub mod button;
1+
pub mod header;

‎src/lib.rs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
mod components;
44

5-
use crate::components::home::Home;
5+
use crate::components::header::Header;
66

77
use wasm_bindgen::prelude::*;
88
use yew::prelude::*;
@@ -41,8 +41,9 @@ impl Component for Model {
4141
fn view(&self) -> Html {
4242
html! {
4343
<div>
44-
<main class="flex w-full">
45-
<Home />
44+
<Header />
45+
<main id="main-content">
46+
{ "Lorem Ipsum" }
4647
</main>
4748
</div>
4849
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /