Skip to content

Commit 8edf6e2

Browse files
committed
Update image style
1 parent 3772e3b commit 8edf6e2

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

content/posts/markdown-test-file.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Markdown test files
2+
title: Markdown test file
33
date: 2019-02-06
44
published: true
55
tags: ['Markdown','Test files']
@@ -45,6 +45,13 @@ used to open the header. (The number of opening hashes
4545
determines the header level.)
4646

4747

48+
### Images
49+
50+
Images are added with `![Image Alt](./images/image.jpg)`
51+
52+
![Image](./images/alexandr-podvalny-220262-unsplash.jpg)
53+
54+
4855
### Blockquotes
4956

5057
Markdown uses email-style `>` characters for blockquoting. If you're

src/templates/Post.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,11 @@ query Post ($path: String!) {
7777
margin-bottom: calc(var(--space) / 2);
7878
overflow: hidden;
7979
border-radius: var(--radius) var(--radius) 0 0;
80+
8081
img {
8182
width: 100%;
8283
}
84+
8385
&:empty {
8486
display: none;
8587
}
@@ -94,10 +96,12 @@ query Post ($path: String!) {
9496
font-size: 1.2em;
9597
color: var(--title-color);
9698
}
99+
97100
img {
98101
width: calc(100% + var(--space) * 2);
99102
margin-left: calc(var(--space) * -1);
100103
display: block;
104+
max-width: none;
101105
}
102106
}
103107
}

0 commit comments

Comments
 (0)