strong bold medium and heading tag handling

This commit is contained in:
2024-09-20 10:44:59 +02:00
parent 6650366e60
commit f3c4df4458
8 changed files with 17 additions and 25 deletions

View File

@ -55,7 +55,6 @@ async fn main() {
// - fotos
// TODO Colors
// Text slate, and gray should be somehow customised
// STRONG bold-medium
// TODO print css and other 404 css linked in base.html
// TODO go live pipeline
// TODO after release

View File

@ -177,12 +177,9 @@ pub fn parse_html(markdown: &str, generate_images: bool) -> String {
});
Event::Html(
formatdoc!(
r##"
<a name="{heading_id}" class="anchor" href="#{heading_id}">
<span class="header-link"></span>
</a>
r##"id="{heading_id}">
{text}
"##
"##
)
.into(),
)
@ -197,7 +194,7 @@ pub fn parse_html(markdown: &str, generate_images: bool) -> String {
}) => {
let id_str = id.map(|id| id.to_string());
text_kind = TextKind::Heading(id_str);
Event::Html(format!("<{level}>").into())
Event::Html(format!("<{level} ").into())
}
Event::Start(_) => event,
Event::End(TagEnd::Image) => Event::Html("</figcaption></figure>".into()),

View File

@ -76,6 +76,10 @@ a {
}
}
strong {
@apply font-medium;
}
.article-body {
h1 {
@apply px-4 text-2xl font-semibold text-blue-900 mb-3 mt-4 max-w-read mx-auto md:text-4xl lg:text-5xl;
@ -95,9 +99,6 @@ a {
p {
@apply px-4 my-2 text-slate-950 text-justify mx-auto max-w-read md:text-lg md:my-8 lg:text-readxl;
}
strong {
@apply font-medium;
}
pre {
@apply p-4 my-1 overflow-auto text-sm mx-auto max-w-read;
}

View File

@ -888,10 +888,6 @@ video {
border-radius: 0.25rem;
}
.rounded-2xl {
border-radius: 1rem;
}
.rounded-full {
border-radius: 9999px;
}
@ -908,10 +904,6 @@ video {
border-width: 2px;
}
.border-4 {
border-width: 4px;
}
.border-blue-500 {
--tw-border-opacity: 1;
border-color: rgb(23 137 224 / var(--tw-border-opacity));
@ -1144,6 +1136,10 @@ a {
}
}
strong {
font-weight: 500;
}
.article-body {
h1 {
margin-left: auto;
@ -1407,9 +1403,6 @@ a {
font-weight: 400;
}
}
strong {
font-weight: 500;
}
pre {
margin-top: 0.25rem;
margin-bottom: 0.25rem;

View File

@ -9,7 +9,7 @@
{% else %}
<h1 class="m-5 text-4xl text-blue-950 font-extrabold md:text-6xl">
{% if let Some(t) = tag %}
<em>{{t}}</em>
#{{t}}
{% else %}
Blog posts
{% endif %}

View File

@ -1,3 +1,3 @@
<div class="rounded-2xl w-[180px] h-[240px] bg-blue-100 border-4 border-blue-500 flex justify-center items-center">
<div class="w-[180px] h-[240px] bg-blue-100 flex justify-center items-center">
<span class="text-blue-500 text-8xl -translate-y-1.5">{{post.metadata.title|fmt("{:.1}")|lower}}</span>
</div>

View File

@ -3,7 +3,7 @@
{% match header_props.back_link %}
{% when Some with (link) %}
<a
class="px-3 py-2 text-lg font-medium drop-shadow-md"
class="px-3 py-2 text-lg font-medium"
href="{{link.href}}"
>
{{link.label}}