Compare commits

...

5 commits

Author SHA1 Message Date
Adam
46b43eb10e style code blocks 2024-01-19 20:13:26 -05:00
Adam
bb3de6becc rm unused 2024-01-19 18:27:32 -05:00
Adam
348203176c get frontmatter 2024-01-19 18:26:38 -05:00
Adam
7366f7ba62 listen for css changes 2024-01-19 18:25:32 -05:00
Adam
f489f70825 fix css for jump links 2024-01-19 18:25:01 -05:00
4 changed files with 55 additions and 26 deletions

View file

@ -49,7 +49,7 @@ site-root = "target/site"
site-pkg-dir = "pkg"
# [Optional] The source CSS file. If it ends with .sass or .scss then it will be compiled by dart-sass into CSS. The CSS is optimized by Lightning CSS before being written to <site-root>/<site-pkg>/app.css
# style-file = "style/main.scss"
style-file = "style/tailwind.css"
# The tailwind input file.
#

View file

@ -13,7 +13,8 @@ pub async fn slingshot(path: String) -> Result<Vec<ArticleData>, ServerFnError>
if let Some(filetype) = filepath.extension() {
if filetype == "md" {
let file = std::fs::read_to_string(filepath)?;
let html_from_md = femark::process_markdown_to_html(&file.to_string())
let html_from_md =
femark::process_markdown_to_html_with_frontmatter(&file.to_string(), true)
.expect("Problem processing markdown");
let content = html_from_md.content;
let _toc = html_from_md.toc;

View file

@ -1,13 +1,7 @@
use std::any::type_name;
use cfg_if::cfg_if;
use http::status::StatusCode;
use leptos::*;
use thiserror::Error;
#[cfg(feature = "ssr")]
use leptos_axum::ResponseOptions;
#[derive(Clone, Debug, Error)]
pub enum AppError {
#[error("Not Found")]

View file

@ -19,18 +19,19 @@ article p {
}
article h3 {
@apply mt-8;
}
article h3 {
@apply text-2xl text-orange-600;
@apply mt-8 text-2xl text-orange-600;
}
article a {
@apply text-orange-300 hover:underline;
}
article ul, article ol {
article h3 > a {
@apply text-orange-600;
}
article ul,
article ol {
@apply mt-5 list-inside;
}
@ -41,3 +42,36 @@ article ul {
article ol {
@apply list-decimal;
}
.hh4 {
@apply text-orange-600;
}
.hh3 {
@apply text-blue-500;
}
.hh13 {
@apply text-orange-800;
}
.hh10 {
@apply text-slate-500;
}
.hh5 {
@apply text-orange-300;
}
/* dunno what this is yet */
.hh18 {
color: red;
}
.code-block {
@apply bg-black bg-opacity-40 p-3 rounded-lg shadow-lg shadow-black;
}
.code-block-inner {
@apply p-2;
}