Minor tweaks
All checks were successful
CI / Check typos (push) Successful in 8s
CI / Check links (push) Successful in 9s
CI / Clippy (push) Successful in 50s
CI / Build and test (push) Successful in 2m15s
CI / Build container (push) Successful in 1m43s
CI / Deploy on waypoint (push) Successful in 54s
All checks were successful
CI / Check typos (push) Successful in 8s
CI / Check links (push) Successful in 9s
CI / Clippy (push) Successful in 50s
CI / Build and test (push) Successful in 2m15s
CI / Build container (push) Successful in 1m43s
CI / Deploy on waypoint (push) Successful in 54s
This commit is contained in:
@@ -10,31 +10,33 @@
|
||||
padding-right: 1ex;
|
||||
}
|
||||
|
||||
.handout-ul li:hover {
|
||||
margin-left: 1ex;
|
||||
transition: 50ms;
|
||||
}
|
||||
// Only do hover magic on mouse devices
|
||||
@media(hover: hover) and (pointer: fine) {
|
||||
.handout-ul li:hover {
|
||||
margin-left: 1ex;
|
||||
transition: 50ms;
|
||||
}
|
||||
|
||||
.handout-ul li {
|
||||
transition: 50ms;
|
||||
transition-delay: 50ms;
|
||||
.handout-ul li {
|
||||
transition: 50ms;
|
||||
transition-delay: 50ms;
|
||||
}
|
||||
|
||||
.handout-ul li:hover .handout-li-links {
|
||||
display: inline-block;
|
||||
opacity: 1;
|
||||
transition: 100ms;
|
||||
}
|
||||
|
||||
.handout-ul li .handout-li-links {
|
||||
transition-delay: 50ms;
|
||||
transition: 100ms;
|
||||
opacity: 0;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.handout-ul li:hover .handout-li-links,
|
||||
.handout-ul .handout-li-desc {
|
||||
display: inline-block;
|
||||
opacity: 1;
|
||||
transition: 100ms;
|
||||
}
|
||||
|
||||
.handout-ul li:hover .handout-li-desc,
|
||||
.handout-ul li .handout-li-links {
|
||||
transition-delay: 50ms;
|
||||
transition: 100ms;
|
||||
opacity: 0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Email obfuscation
|
||||
// Works with "{{ email_*() }}" shortcodes.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
use axum::{
|
||||
Router,
|
||||
extract::{ConnectInfo, Path, State},
|
||||
http::{HeaderValue, StatusCode, header},
|
||||
http::{HeaderMap, HeaderValue, StatusCode, header},
|
||||
response::{IntoResponse, Response},
|
||||
routing::get,
|
||||
};
|
||||
@@ -83,7 +83,8 @@ impl PageMetadata {
|
||||
root_node: &Node,
|
||||
) -> Result<Option<PageMetadata>, serde_yaml::Error> {
|
||||
root_node
|
||||
.children.first()
|
||||
.children
|
||||
.first()
|
||||
.and_then(|x| x.cast::<FrontMatter>())
|
||||
.map(|x| serde_yaml::from_str::<PageMetadata>(&x.content))
|
||||
.map_or(Ok(None), |v| v.map(Some))
|
||||
@@ -298,8 +299,9 @@ impl PageServer {
|
||||
Path(route): Path<String>,
|
||||
State(state): State<Arc<Self>>,
|
||||
ConnectInfo(addr): ConnectInfo<ServiceConnectInfo>,
|
||||
headers: HeaderMap,
|
||||
) -> Response {
|
||||
trace!("Serving {route} to {}", addr.addr);
|
||||
trace!(message = "Serving route", route, addr = ?addr.addr, user_agent = ?headers["user-agent"]);
|
||||
|
||||
let now = Utc::now();
|
||||
let headers = [(
|
||||
@@ -326,7 +328,9 @@ impl PageServer {
|
||||
Router::new()
|
||||
.route(
|
||||
"/",
|
||||
get(|state, conn| async { Self::handler(Path(String::new()), state, conn).await }),
|
||||
get(|state, conn, headers| async {
|
||||
Self::handler(Path(String::new()), state, conn, headers).await
|
||||
}),
|
||||
)
|
||||
.route("/{*path}", get(Self::handler))
|
||||
.with_state(self)
|
||||
|
||||
@@ -59,6 +59,7 @@ fn build_list_for_group(handouts: &[HandoutEntry], group: &str) -> Markup {
|
||||
span class="handdout-li-title" {
|
||||
strong { (h.title) }
|
||||
}
|
||||
" "
|
||||
span class="handout-li-links" {
|
||||
"[ "
|
||||
|
||||
@@ -69,7 +70,7 @@ fn build_list_for_group(handouts: &[HandoutEntry], group: &str) -> Markup {
|
||||
} @else {
|
||||
a href=(h.handout) {"handout"}
|
||||
}
|
||||
"] "
|
||||
" ]"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user