Migrate to vite + react + tailwindcss
This commit is contained in:
parent
384e2fbc2c
commit
4cb5e97faf
28 changed files with 1990 additions and 1092 deletions
0
src/App.css
Normal file
0
src/App.css
Normal file
10
src/App.tsx
Normal file
10
src/App.tsx
Normal file
|
@ -0,0 +1,10 @@
|
|||
import './App.css'
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<h1 className="text-3xl font-bold underline">
|
||||
Hello world!
|
||||
</h1>
|
||||
)
|
||||
}
|
||||
export default App
|
13
src/app.rs
13
src/app.rs
|
@ -1,13 +0,0 @@
|
|||
use yew::prelude::*;
|
||||
|
||||
use super::components::{ProjectList, PersonalInfo};
|
||||
|
||||
#[function_component(App)]
|
||||
pub fn app() -> Html {
|
||||
html! {
|
||||
<>
|
||||
<PersonalInfo></PersonalInfo>
|
||||
<ProjectList></ProjectList>
|
||||
</>
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
mod projects_list;
|
||||
pub use projects_list::ProjectList;
|
||||
|
||||
pub(self) mod project;
|
||||
|
||||
mod personal_info;
|
||||
pub use personal_info::PersonalInfo;
|
|
@ -1,15 +0,0 @@
|
|||
use yew::{function_component, Html, html};
|
||||
|
||||
#[function_component(PersonalInfo)]
|
||||
pub fn personal_info() -> Html {
|
||||
html! {
|
||||
<div class="bg-red-500 text-blue">
|
||||
<h1>{"Florian RICHER"}</h1>
|
||||
<p>{"Découvrez mon parcours en développement, où ma passion précoce pour la programmation a débuté avec la création d'applications 3D utilisant OpenGL et s'est étendue à la maîtrise de diverses technologies, notamment le développement Web avec React, Ruby on Rails, Tailwindcss et Bootstrap, la réalisation d'applications mobiles avec Flutter et le développement système en Rust, toujours animé par mon désir inépuisable d'apprendre et ma curiosité sans bornes."}</p>
|
||||
<p>{"17 rue de châteauroux, 87100 Limoges"}</p>
|
||||
<p>{"(33) 07 61 36 34 52"}</p>
|
||||
<p>{"SIRET : 85244496400016"}</p>
|
||||
<a href={"mailto:florian.richer@protonmail.com"}>{"florian.richer@protonmail.com"}</a>
|
||||
</div>
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
use yew::{Properties, function_component, Html, html};
|
||||
|
||||
#[derive(Properties, PartialEq)]
|
||||
pub struct ProjectProps {
|
||||
pub name: String,
|
||||
pub description: String
|
||||
}
|
||||
|
||||
#[function_component(Project)]
|
||||
pub fn project(props: &ProjectProps) -> Html {
|
||||
html! {
|
||||
<div class="bg-red-500 text-blue">
|
||||
<h1>{props.name.as_str()}</h1>
|
||||
<p>{props.description.as_str()}</p>
|
||||
</div>
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
use yew::{function_component, Html, html};
|
||||
|
||||
use super::project::Project;
|
||||
|
||||
#[function_component(ProjectList)]
|
||||
pub fn project_list() -> Html {
|
||||
html! {
|
||||
<Project name="Test" description="Test"></Project>
|
||||
}
|
||||
}
|
3
src/index.css
Normal file
3
src/index.css
Normal file
|
@ -0,0 +1,3 @@
|
|||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
|
@ -1,8 +0,0 @@
|
|||
mod app;
|
||||
pub(self) mod components;
|
||||
|
||||
use app::App;
|
||||
|
||||
fn main() {
|
||||
yew::Renderer::<App>::new().render();
|
||||
}
|
10
src/main.tsx
Normal file
10
src/main.tsx
Normal file
|
@ -0,0 +1,10 @@
|
|||
import React from 'react'
|
||||
import ReactDOM from 'react-dom/client'
|
||||
import App from './App'
|
||||
import './index.css'
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>,
|
||||
)
|
1
src/vite-env.d.ts
vendored
Normal file
1
src/vite-env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="vite/client" />
|
Loading…
Add table
Add a link
Reference in a new issue