mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
Images as figures
This commit is contained in:
@@ -305,9 +305,9 @@ const config = {
|
|||||||
dashes: "oldschool",
|
dashes: "oldschool",
|
||||||
},
|
},
|
||||||
|
|
||||||
// layout: {
|
layout: {
|
||||||
// _: "./src/lib/mdlayouts/default.svelte"
|
_: "./src/lib/mdlayouts/default.svelte"
|
||||||
// },
|
},
|
||||||
|
|
||||||
highlight: {
|
highlight: {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|||||||
@@ -59,6 +59,7 @@
|
|||||||
}
|
}
|
||||||
.navbar-logo {
|
.navbar-logo {
|
||||||
width: 3rem;
|
width: 3rem;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
.navbar-links {
|
.navbar-links {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -1,8 +1,31 @@
|
|||||||
<script>
|
<script>
|
||||||
export let src;
|
export let src;
|
||||||
export let alt;
|
export let alt;
|
||||||
|
let className = ""
|
||||||
|
export { className as class };
|
||||||
// console.log(src)
|
// console.log(src)
|
||||||
// import _PastedImage20240716123726Png from "./Pasted%20image%2020240716123726.png?meta";
|
// import _PastedImage20240716123726Png from "./Pasted%20image%2020240716123726.png?meta";
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<img src={src} alt={alt}/>
|
|
||||||
|
<figure class={className}>
|
||||||
|
<img {src} {alt} />
|
||||||
|
{#if alt}
|
||||||
|
<figcaption>{alt}</figcaption>
|
||||||
|
{/if}
|
||||||
|
</figure>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
img {
|
||||||
|
max-height: 60vh;
|
||||||
|
display: block;
|
||||||
|
margin-inline: auto;
|
||||||
|
}
|
||||||
|
figure {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
figcaption {
|
||||||
|
|
||||||
|
font-size: 0.95em;
|
||||||
|
margin-block: calc(var(--spacing)/2);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -83,8 +83,8 @@ body {
|
|||||||
iframe,
|
iframe,
|
||||||
img,
|
img,
|
||||||
svg {
|
svg {
|
||||||
width: 100%;
|
max-width: 100%;
|
||||||
height: 100%;
|
max-height: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user