Reformat project
This commit is contained in:
parent
a5bc12acae
commit
2fe57be382
@ -2,7 +2,7 @@
|
|||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
members = [
|
members = [
|
||||||
"leptos_webpage", "session_iter",
|
"leptos_webpage", "session_iter", "app",
|
||||||
]
|
]
|
||||||
|
|
||||||
[profile]
|
[profile]
|
||||||
|
|||||||
@ -13,4 +13,4 @@ leptos = { version = "0.7", features = ["csr"] }
|
|||||||
console_error_panic_hook = "0.1.7"
|
console_error_panic_hook = "0.1.7"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
session_iter = { path = "../session_iter"}
|
session_iter = { path = "../session_iter" }
|
||||||
@ -8,17 +8,21 @@ The project currently uses leptos, so you'll want to install trunk (`cargo insta
|
|||||||
For the build to work you'll need the `wasm32-unknown-unknown` target (`rustup target add wasm32-unknown-unknown`).
|
For the build to work you'll need the `wasm32-unknown-unknown` target (`rustup target add wasm32-unknown-unknown`).
|
||||||
|
|
||||||
You can build the projekt with
|
You can build the projekt with
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
trunk build --release
|
trunk build --release
|
||||||
```
|
```
|
||||||
|
|
||||||
which will create the app in the `target/dist` folder.
|
which will create the app in the `target/dist` folder.
|
||||||
|
|
||||||
Alternatively you can serve it locally with
|
Alternatively you can serve it locally with
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
trunk serve
|
trunk serve
|
||||||
```
|
```
|
||||||
|
|
||||||
To also access the local hosted page from other devices, use
|
To also access the local hosted page from other devices, use
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
trunk serve -a 0.0.0.0
|
trunk serve -a 0.0.0.0
|
||||||
```
|
```
|
||||||
@ -26,6 +30,7 @@ trunk serve -a 0.0.0.0
|
|||||||
## Deployment
|
## Deployment
|
||||||
|
|
||||||
Just use pythons webserver and point it to the dist folder
|
Just use pythons webserver and point it to the dist folder
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 -m http.server 8080 --directoy target/dist
|
python3 -m http.server 8080 --directoy target/dist
|
||||||
```
|
```
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<title>Band Sessions</title>
|
<title>Band Sessions</title>
|
||||||
<link data-trunk rel="css" href="styles.css">
|
<link data-trunk href="styles.css" rel="css">
|
||||||
<link data-trunk rel="rust" data-bin="jana_sessions_webpage">
|
<link data-bin="jana_sessions_webpage" data-trunk rel="rust">
|
||||||
</head>
|
</head>
|
||||||
<body></body>
|
<body></body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -9,24 +9,30 @@
|
|||||||
--yellow: #bbbb11;
|
--yellow: #bbbb11;
|
||||||
--green: #1fd51f;
|
--green: #1fd51f;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
list-style-position: inside;
|
list-style-position: inside;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 1000px) {
|
@media screen and (max-width: 1000px) {
|
||||||
body {
|
body {
|
||||||
font-size: 3rem;
|
font-size: 3rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.background {
|
.background {
|
||||||
background-color: var(--darkgray);
|
background-color: var(--darkgray);
|
||||||
color: var(--white);
|
color: var(--white);
|
||||||
@ -38,11 +44,13 @@ p {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
.column {
|
.column {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box {
|
.box {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
@ -55,39 +63,50 @@ p {
|
|||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wide {
|
.wide {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 1000px;
|
max-width: 1000px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button:hover {
|
.button:hover {
|
||||||
filter: brightness(1.2);
|
filter: brightness(1.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.elem-background {
|
.elem-background {
|
||||||
background-color: var(--darkgreen);
|
background-color: var(--darkgreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-background {
|
.error-background {
|
||||||
background-color: var(--darkred);
|
background-color: var(--darkred);
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlight-background {
|
.highlight-background {
|
||||||
background-color: var(--green);
|
background-color: var(--green);
|
||||||
}
|
}
|
||||||
|
|
||||||
.cancel-background {
|
.cancel-background {
|
||||||
background-color: var(--red);
|
background-color: var(--red);
|
||||||
}
|
}
|
||||||
|
|
||||||
.change-background {
|
.change-background {
|
||||||
background-color: var(--yellow);
|
background-color: var(--yellow);
|
||||||
}
|
}
|
||||||
|
|
||||||
.small-text {
|
.small-text {
|
||||||
color: var(--darkgray);
|
color: var(--darkgray);
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.strikethrough {
|
.strikethrough {
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bold {
|
.bold {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@ -17,7 +17,7 @@ impl DatedSessionIter {
|
|||||||
pub fn new<D, S>(start_date: D, sessions: S) -> DatedSessionIter
|
pub fn new<D, S>(start_date: D, sessions: S) -> DatedSessionIter
|
||||||
where
|
where
|
||||||
D: Into<Day>,
|
D: Into<Day>,
|
||||||
S: IntoIterator<Item = Session>,
|
S: IntoIterator<Item=Session>,
|
||||||
{
|
{
|
||||||
let current_date = start_date.into();
|
let current_date = start_date.into();
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@ pub struct SessionDayIter<R> {
|
|||||||
|
|
||||||
impl<R, S> Iterator for SessionDayIter<R>
|
impl<R, S> Iterator for SessionDayIter<R>
|
||||||
where
|
where
|
||||||
R: Deref<Target = S>,
|
R: Deref<Target=S>,
|
||||||
S: SessionRuleLike,
|
S: SessionRuleLike,
|
||||||
{
|
{
|
||||||
type Item = Day;
|
type Item = Day;
|
||||||
@ -67,7 +67,7 @@ where
|
|||||||
|
|
||||||
impl<R> SessionDayIter<R>
|
impl<R> SessionDayIter<R>
|
||||||
where
|
where
|
||||||
R: Deref<Target = SessionRule>,
|
R: Deref<Target=SessionRule>,
|
||||||
{
|
{
|
||||||
pub fn to_owned(&self) -> SessionDayIter<SessionRule> {
|
pub fn to_owned(&self) -> SessionDayIter<SessionRule> {
|
||||||
SessionDayIter {
|
SessionDayIter {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user