Change links to social media and source code, update README.

This commit is contained in:
Ada Werefox 2024-05-01 16:22:37 -05:00
parent c887ddade4
commit 642dde2e4f
6 changed files with 29 additions and 82 deletions

View File

@ -1,30 +1,12 @@
# [void.werefox.cafe](https://void.werefox.cafe) # [info.werefox.cafe](https://info.werefox.cafe)
> This will be used to replace my *"A Letter To The Void"* collection of poems on [write.as](https://write.as) for hosting my poetry. > This will be used to replace the former `next.js` project that was hosting the info site.
## Usage ## Development
> This project works by using a Cargo workspace with two projects `void-fe` and `void-be` > This project works by using `Dioxus'` `fullstack` platform.
### Backend If you want a developer environment, you'll need to do the following:
You can develop the backend by simply running the project from the root directory
```
cargo run
```
Generally, any commands you'd use for any other standard Rust project will work for this.
Ex:
```
cargo build
```
### Frontend
If you want to develop the Dioxus frontend, you'll need to do the following:
- [From the official Dioxus docs](https://dioxuslabs.com/docs/0.3/guide/en/getting_started/web), ensure you have `dioxus-cli` and the `wasm32-unknown-unknown` target installed - [From the official Dioxus docs](https://dioxuslabs.com/docs/0.3/guide/en/getting_started/web), ensure you have `dioxus-cli` and the `wasm32-unknown-unknown` target installed
@ -36,68 +18,38 @@ rustup target add wasm32-unknown-unknown
``` ```
- Additionally, you *may* need to have the [Tauri prerequisites](https://tauri.app/v1/guides/getting-started/prerequisites/) installed. - Additionally, you *may* need to have the [Tauri prerequisites](https://tauri.app/v1/guides/getting-started/prerequisites/) installed.
Then, you should be able to run the development server after moving into the `rust-letter-fe` directory. Then, you should be able to run the development server.
(Linux example) (Linux example)
``` ```
cd rust-letter-fe && dioxus serve dx serve --hot-reload
``` ```
If you'd link to know about how to use `dioxus-cli`, you should run `dioxus --help` or [reference the official documentation.*](https://github.com/DioxusLabs/cli) If you'd like to know about how to use `dioxus-cli`, you should run `dioxus --help` or [reference the official documentation.](https://github.com/DioxusLabs/dioxus/tree/main/packages/cli)
\* At the time of writing this, the link to the documentation is broken. If you'd like to see what I normally use to run the project, here's an example: `dioxus serve --hot-reload --port [port #]`
## Running ## Running
> Here are some ways you can run the project Have `Dioxus` build a run binary.
### Cargo
You can either do the standard `run --release`
``` ```
cargo run --release dx build --release
``` ```
Or, referencing the Dockerfile, you can install and then run. Then, execute the resulting binary (which should end up in `dist/` by default).
``` ```
cargo install --path . ./dist/info-werefox-cafe
``` ```
```
rust-letter
```
<!--
### Docker
You can run this in a container using the included `Dockerfile`.
```
docker build -t rust-letter-werefox-cafe
docker run -p 3469 -d -t rust-letter-werefox-cafe
```
Or, run through docker compose.
```
docker compose up --build -d
``` -->
## Project Structure ## Project Structure
``` ```
.dioxus-letter-werefox-cafe info-werefox-cafe
|- data # text files that will be read to for data in the app |- data # text files that will be read to for data in the app
|- public # save the assets you want include in your project. |- public # save the assets you want include in your project.
|- void-be |- src # Rust code for the project
|\ |\
||- src # source code folder for backend ||
|- void-fe ||- utils # save some public function
|\ ||- components # save some custom components
||- src # source code folder for frontend
||\
|||- utils # save some public function
|||- components # save some custom components
|- src # code for running the workspace
|- templates # put template files here, right now just using handlebar
``` ```

View File

@ -1,6 +1,6 @@
use crate::components::back_button::*;
use crate::components::footer_card::*; use crate::components::footer_card::*;
use crate::components::title_card::*; use crate::components::title_card::*;
use crate::components::back_button::*;
use crate::info_app::Route; use crate::info_app::Route;
use dioxus::prelude::*; use dioxus::prelude::*;
@ -9,12 +9,11 @@ pub fn BasicPage(page_title: String, children: Element) -> Element {
rsx! { rsx! {
div { class: "min-h-screen bg-alice-werefox-grey-light dark:bg-alice-werefox-grey font-nerd", div { class: "min-h-screen bg-alice-werefox-grey-light dark:bg-alice-werefox-grey font-nerd",
head { head {
link { rel: "me", href: "https://bark.lgbt/@alicew" } link { rel: "me", href: "https://yiff.life/@werefox" }
link { rel: "me", href: "https://dragon.style/@alice" } link { rel: "me", href: "https://dragon.style/@alice" }
link { rel: "me", href: "https://mspsocial.net/@alice" }
link { rel: "icon", href: "/favicon.ico" } link { rel: "icon", href: "/favicon.ico" }
} }
div { class: "container space-y-4 mx-auto px-4 py-4", div { class: "container px-4 py-4 mx-auto space-y-4",
TitleCard { card_title: page_title } TitleCard { card_title: page_title }
BackButton { back_to: Route::Home {} } BackButton { back_to: Route::Home {} }
{children}, {children},

View File

@ -6,20 +6,20 @@ pub fn FaqCard(question: String, answer: String, image_props: ImageProps) -> Ele
rsx! { rsx! {
div { class: "space-y-2", div { class: "space-y-2",
div { class: "ring-2 ring-alice-werefox-blue-dark dark:ring-alice-werefox-blue", div { class: "ring-2 ring-alice-werefox-blue-dark dark:ring-alice-werefox-blue",
p { class: "p-8 text-center text-lg sm:text-xl text-alice-werefox-blue-dark dark:text-alice-werefox-blue-light", p { class: "p-8 text-lg text-center sm:text-xl text-alice-werefox-blue-dark dark:text-alice-werefox-blue-light",
"{question}" "{question}"
} }
} }
div { class: " ring-2 ring-alice-werefox-red-dark dark:ring-alice-werefox-red hover:ring-alice-werefox-blue-dark dark:hover:ring-alice-werefox-blue text-alice-werefox-red-dark dark:text-alice-werefox-red-light hover:text-alice-werefox-blue-dark dark:hover:text-alice-werefox-blue-light hover:animate-yip transition", div { class: "transition ring-2 ring-alice-werefox-red-dark dark:ring-alice-werefox-red hover:ring-alice-werefox-blue-dark dark:hover:ring-alice-werefox-blue text-alice-werefox-red-dark dark:text-alice-werefox-red-light hover:text-alice-werefox-blue-dark dark:hover:text-alice-werefox-blue-light hover:animate-yip",
a { href: "https://bark.lgbt/@alicew", target: "_blank", a { href: "https://yiff.life/@werefox", target: "_blank",
div { class: "p-2 flex", div { class: "flex p-2",
div { class: "order-1 flex-shrink-0 relative inline sm:w-32 w-16 min-h-full items-center justify-center align-middle pt-4 pb-4 pl-4", div { class: "relative items-center justify-center flex-shrink-0 order-1 inline w-16 min-h-full pt-4 pb-4 pl-4 align-middle sm:w-32",
img { img {
alt: "{image_props.alt}", alt: "{image_props.alt}",
src: "{image_props.src}" src: "{image_props.src}"
} }
} }
div { class: "order-2 flex overflow-auto items-center justify-center animate-wiggle p-4 sm:text-lg text-xs text-center sm:min-h-full h-full", div { class: "flex items-center justify-center order-2 h-full p-4 overflow-auto text-xs text-center animate-wiggle sm:text-lg sm:min-h-full",
"{answer}" "{answer}"
br {} br {}
"{\"- @alice\"}" "{\"- @alice\"}"

View File

@ -8,10 +8,10 @@ pub fn FooterCard() -> Element {
div { class: "flex text-alice-werefox-red-darker dark:text-alice-werefox-red-light", div { class: "flex text-alice-werefox-red-darker dark:text-alice-werefox-red-light",
div { class: "flex-1" } div { class: "flex-1" }
FooterButton { url: "https://werefox.cafe/", inner_text: "Contact" } FooterButton { url: "https://werefox.cafe/", inner_text: "Contact" }
FooterButton { url: "https://gitea.werefox.cafe/ada/werefox-cafe", inner_text: " /src" } FooterButton { url: "https://gitea.werefox.cafe/ada/info-werefox-cafe", inner_text: " /src" }
div { class: "flex-1" } div { class: "flex-1" }
} }
div { class: "text-center text-xs text-alice-werefox-grey-darkest dark:text-alice-werefox-grey-lightest", div { class: "text-xs text-center text-alice-werefox-grey-darkest dark:text-alice-werefox-grey-lightest",
"This site uses" "This site uses"
div { class: "inline-block pt-1 pb-1", div { class: "inline-block pt-1 pb-1",
FooterButton { url: "https://mutant.tech", inner_text: "Mutant Standard emoji" } FooterButton { url: "https://mutant.tech", inner_text: "Mutant Standard emoji" }

View File

@ -11,7 +11,6 @@ pub fn HomePage(page_title: String, card_title: String, children: Element) -> El
link { rel: "icon", href: "/favicon.ico" } link { rel: "icon", href: "/favicon.ico" }
link { rel: "me", href: "https://yiff.life/@werefox" } link { rel: "me", href: "https://yiff.life/@werefox" }
link { rel: "me", href: "https://dragon.style/@alice" } link { rel: "me", href: "https://dragon.style/@alice" }
link { rel: "me", href: "https://mspsocial.net/@alice" }
} }
div { class: "container px-4 py-4 mx-auto space-y-4", div { class: "container px-4 py-4 mx-auto space-y-4",
TitleCard { card_title: card_title } TitleCard { card_title: card_title }

View File

@ -3,11 +3,8 @@ use dioxus::prelude::*;
pub fn PageBase(props: PageChildren) -> Element { pub fn PageBase(props: PageChildren) -> Element {
rsx! { rsx! {
span { hidden: true,
a { rel: "me", href: "https://yiff.life/@werefox", "Mastodon" }
}
div { class: "min-h-screen", div { class: "min-h-screen",
div { class: "container space-y-4 pt-4 pb-4 max-w-3xl", {props.children} } div { class: "container max-w-3xl pt-4 pb-4 space-y-4", {props.children} }
} }
} }
} }