Compare commits

...

2 Commits

Author SHA1 Message Date
991eb92562 Tweaks
Some checks failed
CI / Check typos (push) Successful in 28s
CI / Check links (push) Failing after 31s
CI / Clippy (push) Successful in 1m2s
CI / Build and test (push) Successful in 1m21s
CI / Build container (push) Successful in 1m5s
CI / Deploy on waypoint (push) Successful in 44s
2025-11-12 14:18:44 -08:00
529dfc468e README 2025-11-12 14:18:41 -08:00
4 changed files with 38 additions and 9 deletions

23
README.md Normal file
View File

@@ -0,0 +1,23 @@
[utoipa]: https://docs.rs/utoipa/latest/utoipa/
[axum]: https://docs.rs/axum/latest/axum/
[betalupi.com]: https://betalupi.com
# Mark's webpage
This is the source code behind [betalupi.com], featuring a very efficient mini web framework written from scratch in Rust. It uses...
- [Axum](https://github.com/tokio-rs/axum) as an http server
- [Maud](https://maud.lambda.xyz/) for html templates
- [Grass](https://github.com/connorskees/grass) to parse and compile [sass](https://sass-lang.com/)
- [markdown-it](https://github.com/markdown-it-rust/markdown-it) to convert md to html
## Overview & Arch:
- [`bin/webpage`](./crates/bin/webpage/): Simple cli that starts `service-webpage`
- [`lib/libservice`](./crates/lib/libservice): Provides the `Service` trait. A service is a group of http routes with an optional [utoipa] schema. \
This library decouples compiled binaries from the services they provide, and makes sure all services are self-contained.
- [`lib/page`](./crates/lib/page): Provides `PageServer`, which builds an [axum] router that provides a caching and headers for resources served through http.
- Also provides `Servable`, which is a trait for any resource that may be served.
- the `Page` servable serves html generated by a closure.
- the `StaticAsset` servable serves static assets (css, images, misc files), and provides transformation parameters for image assets (via [`pixel-transform`](./crates/lib/pixel-transform)).
- [`service/service-webpage`](./crates/service/service-webpage): A `Service` that runs a `PageServer` that provides the content on [betalupi.com]

View File

@@ -13,8 +13,6 @@ arguably the best math circle in the western world. We teach students mathematic
far beyond the regular school curriculum, much like [AOPS](https://artofproblemsolving.com) far beyond the regular school curriculum, much like [AOPS](https://artofproblemsolving.com)
and the [BMC](https://mathcircle.berkeley.edu). and the [BMC](https://mathcircle.berkeley.edu).
<br></br>
{{color(--pink, "For my students:")}} \ {{color(--pink, "For my students:")}} \
Don't look at solutions we haven't discussed, Don't look at solutions we haven't discussed,
and don't start any handouts before class. That spoils all the fun! and don't start any handouts before class. That spoils all the fun!
@@ -36,7 +34,6 @@ If the class finishes early, the lesson is either too short or too easy.
The sources for all these handouts are available [here](https://git.betalupi.com/mark/handouts).\ The sources for all these handouts are available [here](https://git.betalupi.com/mark/handouts).\
Some are written in LaTeX, some are in [Typst](https://typst.app). \ Some are written in LaTeX, some are in [Typst](https://typst.app). \
The latter is vastly superior. The latter is vastly superior.
<br></br> <br></br>
<hr></hr> <hr style="margin:5rem 0 5rem 0;"></hr>
<br></br> <br></br>

View File

@@ -5,7 +5,7 @@ Also see [what's a "betalupi?"](/whats-a-betalupi)
- [Handouts](/handouts): Math circle lessons I've written - [Handouts](/handouts): Math circle lessons I've written
- [Links](/links): Interesting parts of the internet - [Links](/links): Interesting parts of the internet
<hr style="margin-top: 8rem; margin-bottom: 8rem"/> <hr style="margin-top: 5rem; margin-bottom: 5rem"/>
## Projects ## Projects

View File

@@ -4,6 +4,7 @@ use page::page::{Page, PageMetadata};
use std::pin::Pin; use std::pin::Pin;
use crate::components::{ use crate::components::{
fa::FAIcon,
md::{Markdown, backlinks, meta_from_markdown}, md::{Markdown, backlinks, meta_from_markdown},
misc::FarLink, misc::FarLink,
}; };
@@ -150,7 +151,7 @@ pub fn page_wrapper<'a>(
(inner) (inner)
@if footer { @if footer {
footer { footer style="margin-top:10rem;" {
hr class = "footline" {} hr class = "footline" {}
div class = "footContainer" { div class = "footContainer" {
p { p {
@@ -158,11 +159,19 @@ pub fn page_wrapper<'a>(
(FarLink("https://rust-lang.org", "Rust")) (FarLink("https://rust-lang.org", "Rust"))
", " ", "
(FarLink("https://maud.lambda.xyz", "Maud")) (FarLink("https://maud.lambda.xyz", "Maud"))
", "
(FarLink("https://github.com/connorskees/grass", "Grass"))
", and " ", and "
(FarLink("https://docs.rs/axum/latest/axum", "Axum")) (FarLink("https://docs.rs/axum/latest/axum", "Axum"))
". " ". "
(
FarLink(
"https://git.betalupi.com/Mark/webpage",
html!(
(FAIcon::Git)
"Source here!"
)
)
)
} }
} }
} }