Skip to content

Instantly share code, notes, and snippets.

@vguerra
Created April 10, 2014 21:43
Show Gist options
  • Save vguerra/10426226 to your computer and use it in GitHub Desktop.
Save vguerra/10426226 to your computer and use it in GitHub Desktop.
multicolumn summary - SquareSpace
<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>
@vguerra
Copy link
Author

vguerra commented Apr 10, 2014

Inject this code snippet on the page including the Summary ( Page Settings -> Advanced -> Page Header Code Injection ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment