Created
April 10, 2014 21:43
-
-
Save vguerra/10426226 to your computer and use it in GitHub Desktop.
multicolumn summary - SquareSpace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type='text/javascript'> | |
YUI().use('node', 'event-base', function (Y) { | |
Y.on('domready', function () { | |
Y.all('.summary-block').each( | |
function () { | |
// 4 -> 3 cols | |
// 3 -> 4 cols | |
// 6 -> 2 cols | |
Y.all('.summary-item', this).wrap('<div class="col sqs-col-4 span-4"></div>'); | |
Y.all('.col > .summary-item').wrap('<div class="newSummary"></div>'); | |
} | |
); | |
}); | |
}); | |
</script> | |
<style type="text/css" style="display: none"> | |
.newSummary { | |
margin-left: 4%; | |
margin-right: 4%; | |
margin-bottom: 20px; | |
} | |
.summary-item img { | |
width: 100% !important; | |
height: auto !important; | |
left: 0 !important; | |
} | |
.summary-thumbnail { | |
display: block !important; | |
overflow: hidden; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Inject this code snippet on the page including the Summary ( Page Settings -> Advanced -> Page Header Code Injection ).