-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from jim-taylor-business/home_improvements
Homepage, progressive enhancement, error handling and more
- Loading branch information
Showing
38 changed files
with
4,267 additions
and
1,276 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,47 @@ | ||
## Contributing | ||
|
||
### Local development | ||
### Tools and environment | ||
|
||
If you don't have `cargo-leptos` installed you can install it with: | ||
Install `cargo-leptos` with: | ||
|
||
`cargo install --locked cargo-leptos` | ||
`cargo install cargo-leptos` | ||
|
||
Install `taplo` with: | ||
|
||
`cargo install taplo-cli` | ||
|
||
Install `machete` with: | ||
|
||
`cargo install cargo-machete` | ||
|
||
Then run: | ||
|
||
`pnpm i` | ||
|
||
to install daisyUI. | ||
to install Tailwind and daisyUI. | ||
|
||
Then do: | ||
You can run your own local instance of Lemmy or run the UI with a test instance provided by the Lemmy community. | ||
|
||
`cargo leptos watch` | ||
Ensure that the version of the Lemmy API you are using in the UI is compatible with the instance you are using. | ||
|
||
and goto http://localhost:1237 | ||
This project does yet not handle multiple versions of the Lemmy API gracefully. Changing the API version will cause compilation errors in this project and errors when communicating with your Lemmy instance. | ||
|
||
Any changes you make while coding will require a page refresh. | ||
Create the environment variables to point to your instance and specify Tailwind version (defaults shown here): | ||
|
||
### Formatting | ||
``` | ||
export LEPTOS_TAILWIND_VERSION=v3.4.1 | ||
export LEMMY_UI_LEPTOS_LEMMY_HOST=localhost:8536 | ||
export LEMMY_UI_LEPTOS_LEMMY_HTTPS=false | ||
``` | ||
|
||
Run `./format.sh` | ||
Compile and run with: | ||
|
||
### Tooling / IDE setup | ||
`cargo leptos watch` | ||
|
||
and browse to `http://localhost:1237` to see the UI. | ||
|
||
Any changes you make while coding might require a page refresh as the automatic reload may become detached. | ||
|
||
### Formatting | ||
|
||
See the [leptos tailwind example](https://github.com/leptos-rs/leptos/tree/main/examples/tailwind) for tooling, and additional IDE help. | ||
Code submissions need to follow strict formatting guidelines. Run `./format.sh` or use the commands within to automate this process. |
Oops, something went wrong.