Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
luis-marques committed Sep 7, 2024
1 parent 64fe764 commit 081f57b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
18 changes: 18 additions & 0 deletions sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,21 @@ $color-selection-dark: false !default;
@import "_figures.scss";
@import "_footnotes.scss";
@import "_highlight.scss";


.katex {
max-width: 100%;
display: inline-block;
}

.katex-display {
text-align: center;
font-size: 1em; /* Default size */
}

/* Scale down when the equation gets too wide */
@media (max-width: 600px) {
.katex-display {
font-size: 0.7em; /* Reduce font size */
}
}
20 changes: 18 additions & 2 deletions templates/shortcodes/figure.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set this = page | default(value = section) %}
<figure>
{% if src | length > 1 %}
<div style="display: flex; flex-direction: row; justify-content: center; align-items: center;">
<div class="responsive-figures">
{% endif %}
{% for item in src %}
{% if src | length > 1 %}
Expand All @@ -28,4 +28,20 @@
{% if body %}
<figcaption>{{ body | markdown(inline = true) | safe }}</figcaption>
{% endif %}
</figure>
</figure>


<style>
.responsive-figures {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}

@media (max-width: 900px) {
.responsive-figures {
flex-direction: column;
}
}
</style>

0 comments on commit 081f57b

Please sign in to comment.