Compare commits
2 Commits
837dca4371
...
991eb92562
| Author | SHA1 | Date | |
|---|---|---|---|
| 991eb92562 | |||
| 529dfc468e |
23
README.md
Normal file
23
README.md
Normal 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]
|
||||
@@ -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)
|
||||
and the [BMC](https://mathcircle.berkeley.edu).
|
||||
|
||||
<br></br>
|
||||
|
||||
{{color(--pink, "For my students:")}} \
|
||||
Don't look at solutions we haven't discussed,
|
||||
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).\
|
||||
Some are written in LaTeX, some are in [Typst](https://typst.app). \
|
||||
The latter is vastly superior.
|
||||
|
||||
<br></br>
|
||||
<hr></hr>
|
||||
<hr style="margin:5rem 0 5rem 0;"></hr>
|
||||
<br></br>
|
||||
|
||||
@@ -5,7 +5,7 @@ Also see [what's a "betalupi?"](/whats-a-betalupi)
|
||||
- [Handouts](/handouts): Math circle lessons I've written
|
||||
- [Links](/links): Interesting parts of the internet
|
||||
|
||||
<hr style="margin-top: 8rem; margin-bottom: 8rem"/>
|
||||
<hr style="margin-top: 5rem; margin-bottom: 5rem"/>
|
||||
|
||||
## Projects
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ use page::page::{Page, PageMetadata};
|
||||
use std::pin::Pin;
|
||||
|
||||
use crate::components::{
|
||||
fa::FAIcon,
|
||||
md::{Markdown, backlinks, meta_from_markdown},
|
||||
misc::FarLink,
|
||||
};
|
||||
@@ -150,7 +151,7 @@ pub fn page_wrapper<'a>(
|
||||
(inner)
|
||||
|
||||
@if footer {
|
||||
footer {
|
||||
footer style="margin-top:10rem;" {
|
||||
hr class = "footline" {}
|
||||
div class = "footContainer" {
|
||||
p {
|
||||
@@ -158,11 +159,19 @@ pub fn page_wrapper<'a>(
|
||||
(FarLink("https://rust-lang.org", "Rust"))
|
||||
", "
|
||||
(FarLink("https://maud.lambda.xyz", "Maud"))
|
||||
", "
|
||||
(FarLink("https://github.com/connorskees/grass", "Grass"))
|
||||
", and "
|
||||
(FarLink("https://docs.rs/axum/latest/axum", "Axum"))
|
||||
"."
|
||||
". "
|
||||
|
||||
(
|
||||
FarLink(
|
||||
"https://git.betalupi.com/Mark/webpage",
|
||||
html!(
|
||||
(FAIcon::Git)
|
||||
"Source here!"
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user