diff --git a/content/posts/markdown-test-file.md b/content/posts/markdown-test-file.md index 535a199..bf12e22 100644 --- a/content/posts/markdown-test-file.md +++ b/content/posts/markdown-test-file.md @@ -1,5 +1,5 @@ --- -title: Markdown test files +title: Markdown test file date: 2019-02-06 published: true tags: ['Markdown','Test files'] @@ -45,6 +45,13 @@ used to open the header. (The number of opening hashes determines the header level.) +### Images + +Images are added with `![Image Alt](./images/image.jpg)` + +![Image](./images/alexandr-podvalny-220262-unsplash.jpg) + + ### Blockquotes Markdown uses email-style `>` characters for blockquoting. If you're diff --git a/src/templates/Post.vue b/src/templates/Post.vue index 5c81fb5..0477127 100644 --- a/src/templates/Post.vue +++ b/src/templates/Post.vue @@ -77,9 +77,11 @@ query Post ($path: String!) { margin-bottom: calc(var(--space) / 2); overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; + img { width: 100%; } + &:empty { display: none; } @@ -94,10 +96,12 @@ query Post ($path: String!) { font-size: 1.2em; color: var(--title-color); } + img { width: calc(100% + var(--space) * 2); margin-left: calc(var(--space) * -1); display: block; + max-width: none; } } }