Skip to content

Commit

Permalink
Support images
Browse files Browse the repository at this point in the history
  • Loading branch information
rstacruz committed Oct 11, 2017
1 parent 0d71152 commit 1e510e9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
12 changes: 11 additions & 1 deletion _js/behaviors/h3-section-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,24 @@

import Isotope from 'isotope-layout/dist/isotope.pkgd.js'
import onmount from 'onmount'
import on from 'dom101/on'
import qsa from 'dom101/query-selector-all'

/*
* Behavior: Isotope
*/

onmount('[data-js-h3-section-list]', function () {
new Isotope(this, {
const iso = new Isotope(this, {
itemSelector: '.h3-section',
transitionDuration: 0
})

const images = qsa('img', this)

images.forEach(image => {
on(image, 'load', () => {
iso.layout()
})
})
})
6 changes: 6 additions & 0 deletions _sass/2017/markdown/p.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
* Crosslink (eg, phoenix.md)
*/

.MarkdownBody.MarkdownBody {
img {
max-width: 100%;
}
}

.MarkdownBody.MarkdownBody p.-crosslink {
& > a {
display: block;
Expand Down
Loading

0 comments on commit 1e510e9

Please sign in to comment.