-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: initial styling and page setup
- Loading branch information
Showing
10 changed files
with
101 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head></head> | ||
<body></body> | ||
<html lang="en" class="h-full"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link data-trunk rel="rust" data-wasm-opt="z" /> | ||
<!--<link data-trunk rel="icon" type="image/ico" href="/public/favicon.ico" />--> | ||
<link data-trunk rel="tailwind-css" href="/style/tailwind.css" /> | ||
<title>Algorithmically-Assisted Metro Map Design</title> | ||
</head> | ||
|
||
<body class="h-full"></body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
use leptos::*; | ||
|
||
#[component] | ||
pub fn Canvas() -> impl IntoView { | ||
view! { | ||
<div class="flex bg-zinc-50 dark:bg-neutral-700 text-black dark:text-white"> | ||
<canvas id="canvas" class="grow m-5"/> | ||
</div> | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
mod canvas; | ||
mod navbar; | ||
mod sidebar; | ||
|
||
pub use canvas::Canvas; | ||
pub use navbar::Navbar; | ||
pub use sidebar::Sidebar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
use leptos::*; | ||
|
||
#[component] | ||
pub fn Navbar() -> impl IntoView { | ||
view! { | ||
<nav class="relative flex w-full items-center justify-between bg-zinc-100 py-2 shadow-dark-mild shadow-sm dark:shadow-neutral-900 dark:bg-neutral-750 lg:py-4"> | ||
<div class="flex w-full items-center justify-between px-3"> | ||
<div class="ms-2"> | ||
<a class="text-2xl font-extrabold text-black dark:text-white" href="#">Metro Map Editor</a> | ||
</div> | ||
</div> | ||
</nav> | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
use leptos::*; | ||
|
||
#[component] | ||
pub fn Sidebar() -> impl IntoView { | ||
view! { | ||
<div class="h-full w-full flex flex-column bg-zinc-100 py-2 shadow-right shadow-dark-mild dark:shadow-black dark:bg-neutral-750 text-black dark:text-white px-2"> | ||
<div class="px-3 py-3 w-full">sidebar</div> | ||
</div> | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,26 @@ | ||
use leptos::*; | ||
|
||
mod components; | ||
|
||
pub use components::*; | ||
|
||
fn main() { | ||
mount_to_body(|| view! { <p>"Hello world!"</p> }) | ||
mount_to_body(|| view! { <App/> }) | ||
} | ||
|
||
#[component] | ||
fn App() -> impl IntoView { | ||
view! { | ||
<header> | ||
<Navbar/> | ||
</header> | ||
<div class="h-full flex flex-row justify-start items-center"> | ||
<div class="h-full flex-none w-1/5 md:w-52"> | ||
<Sidebar/> | ||
</div> | ||
<div class="h-full grow"> | ||
<Canvas/> | ||
</div> | ||
</div> | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module.exports = { | ||
content: { | ||
files: ["*.html", "./src/**/*.rs"], | ||
}, | ||
theme: { | ||
extend: { | ||
boxShadow: { | ||
right: "4px 0 6px -1px rgb(0 0 0 / 0.1)", | ||
}, | ||
colors: { | ||
neutral: { | ||
750: "#333333", | ||
}, | ||
}, | ||
}, | ||
}, | ||
plugins: [], | ||
}; |