Skip to content

Commit

Permalink
Ohhhh more styles you know how it is
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjunetime committed Sep 3, 2024
1 parent 98e2504 commit ee8df6c
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
4 changes: 4 additions & 0 deletions TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
- Make a little table on the wedding admin page about total rsvp'd size, total invited size, estimated size accounting for current rsvp rate, etc.
- Make table/field names based on constants - don't just trust everything to be correct each time
- Maybe consider contributing to leptos to make compiles fail if `ActionForm`s don't contain all the necessary field names
- Clear current inputs in new guest form when it's submitted
- Contribute to leptos to note that if you're running into an issue with wasm panicking, make sure the output of your html when you inspect it in the browser is exactly what you're actually trying to render.
- If e.g. it inserts a `<tbody>` around the contents of your `<table>` inner html when you're not explicitly rendering that in the `view` macro, then that could be causing an issue.
- Also if you're trying to re-insert a `<!DOCTYPE>` or `<head>` somewhere nested inside a `<body>`, that will also cause issues.
2 changes: 1 addition & 1 deletion backend/src/home.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl RenderOnce for Posts {
div(class = "post-content") : Raw(
// only do the first 5 paragraphs since it's gonna hide past that
post.html.split("</p>")
.take(5)
.take(4)
.collect::<Vec<&str>>()
.join("</p>")
+ "</p>"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}

println!("Storing assets to/Reading assets from {asset_dir}");
println!("Read .env...");
println!("Trying to connect to postgres...");

let pool = PgPoolOptions::new()
.max_connections(num_connections)
Expand Down
1 change: 0 additions & 1 deletion frontend/Trunk.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[build]
release = true
pattern_preload = "<link rel=\"preload\" href=\"{base}{wasm}\" as=\"fetch\" type=\"application/wasm\" crossorigin>"

[[proxy]]
Expand Down
9 changes: 6 additions & 3 deletions frontend/src/edit_post.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,11 @@ pub fn edit_post(props: &PostProps) -> Html {
background: none;
color: var(--secondary-text);
border: none;
margin-right: -4px;
margin-left: 4px;
margin-left: 8px;
padding: 0;
}
#tags span.tag {
padding: 3px 6px 4px 6px;
}
#edit-and-render {
display: grid;
Expand Down Expand Up @@ -588,6 +591,7 @@ fn submit_resolved_view(code: u16, text: &String, post_id: u32, submit_state: Us

html! {
<>
<SharedStyle />
<style>
{
"
Expand Down Expand Up @@ -621,7 +625,6 @@ fn submit_resolved_view(code: u16, text: &String, post_id: u32, submit_state: Us
"
}
</style>
<SharedStyle />
{ res_html }
</>
}
Expand Down
14 changes: 7 additions & 7 deletions shared_data/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ pub static BASE_STYLE: &str = r#"
size-adjust: 10%;
}
* {
--body-background: #3f3540;
--main-text: #f1f6ff;
--secondary-text: #f7ebec;
--main-background: #1d1e2c;
--body-background: #31242b;
--main-text: #fbebe2;
--secondary-text: #ffd8f0;
--main-background: #3c2c35;
--secondary-background: #59656f;
--border-color: #ac9fbb;
--border-color: #a16d8f;
--title-text: #d1bbe4;
--code-background: #2b303b;
--code-background: #2a1e24;
font-family: Isenheim, "serif fallback";
color: var(--main-text);
}
Expand All @@ -110,7 +110,7 @@ body {
span.tag {
margin-left: 8px;
background-color: var(--secondary-background);
padding: 3px 6px 2px 6px;
padding: 6px 6px 2px 6px;
border-radius: 8px 0;
}
input, textarea {
Expand Down

0 comments on commit ee8df6c

Please sign in to comment.