Compare commits

..

No commits in common. "c56a182d1471b1d12e96612cb88bd4c890d662fe" and "a68fa7cf4895bdfe895109aff6826910a761c3ba" have entirely different histories.

3 changed files with 13 additions and 39 deletions

View file

@ -6,11 +6,11 @@ use thiserror::Error;
// fronma is too lazy to implement std::error::Error for their own types
#[derive(Debug)]
#[repr(transparent)]
pub struct FronmaError(fronma::error::Error);
pub struct FronmaBalls(fronma::error::Error);
impl std::error::Error for FronmaError {}
impl std::error::Error for FronmaBalls {}
impl Display for FronmaError {
impl Display for FronmaBalls {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("failed to parse front matter: ")?;
match &self.0 {
@ -29,14 +29,14 @@ pub enum PostError {
#[error(transparent)]
AskamaError(#[from] askama::Error),
#[error(transparent)]
ParseError(#[from] FronmaError),
ParseError(#[from] FronmaBalls),
#[error("post {0:?} not found")]
NotFound(String),
}
impl From<fronma::error::Error> for PostError {
fn from(value: fronma::error::Error) -> Self {
Self::ParseError(FronmaError(value))
Self::ParseError(FronmaBalls(value))
}
}

View file

@ -1,7 +1,5 @@
.anchor {
text-decoration: none;
font-size: x-large;
vertical-align: middle;
}
.anchor::before {
content: "§";
@ -11,10 +9,8 @@
}
code {
padding: 0.15em 0.3em;
overflow-wrap: break-word;
word-break: break-all;
white-space: pre-wrap;
font-size: larger;
padding: 0.15em 0.4em;
background-color: var(--surface0);
color: var(--subtext1);
@ -25,6 +21,8 @@ pre > code {
border: 2px solid var(--surface0);
padding: 1.25em 1.5em;
display: block;
overflow-wrap: break-word;
white-space: pre-wrap;
background-color: var(--base);
color: var(--text);
@ -33,24 +31,3 @@ pre > code {
img {
max-width: 100%;
}
table,
td,
th {
border: 1px solid var(--text);
border-collapse: collapse;
padding: 0.5em;
}
th {
font-weight: bold;
}
td {
word-break: break-word;
}
th,
td:nth-child(1) {
word-break: keep-all;
}

View file

@ -27,14 +27,11 @@
}
}
:root,
code {
/* please have one at least one good monospace font */
font-family: "Hack", "Hack Nerd Font", "JetBrains Mono",
"JetBrainsMono Nerd Font", "Ubuntu Mono", monospace, sans-serif;
}
:root {
/* please have one at least one good monospace font */
font-family: "Hack Nerd Font", "Hack", "JetBrains Mono",
"JetBrainsMono Nerd Font", "Ubuntu Mono", monospace, sans-serif;
background-color: var(--base);
color: var(--text);
}