Created
February 24, 2013 15:40
-
-
Save iso100/5024255 to your computer and use it in GitHub Desktop.
Sample code for Gareth that I'm using to size images used in a gallery.
This file contains hidden or 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
<!-- gallery.yaml --> | |
include: | |
- .meta | |
type: | |
prefix: number | |
fields: | |
_template: | |
display: Template | |
type: hidden | |
default: gallery | |
status: | |
display: status | |
type: status | |
page_content: | |
display: Content | |
type: redactor | |
gallery_images: | |
display: Gallery Images | |
type:grid | |
fields: | |
title: | |
display: Image Title | |
type: text | |
caption: | |
display: Caption | |
type: textarea | |
img: | |
display: Image | |
type: file | |
allowed: [png, gif, jpg, jpeg] | |
destination: assets/img/gallery | |
content: | |
display: Content | |
type: hidden | |
<!-- Template code (partial) below --> | |
{{ gallery_images }} | |
{{# <!-- portfolio item --> #}} | |
<article class="portfolio-item four columns"> | |
{{# <!-- lightbox with image --> #}} | |
<a href="{{ img src="{ img }" dim="960x800<" }}{{ image_url }}{{ /img }}" data-rel="prettyPhoto[folio]" class="img-link preload" | |
title="{{ caption }}"> | |
{{ image src="{{ img }}" dim="420x210#" }} | |
<img src="{{ image_url }}" alt="{{ title }}" class="scale-with-grid"> | |
{{ /image }}</a> | |
{{# <!-- end lightbox with image --> #}} | |
<header> | |
<h1>{{ title }}</h1> | |
</header> | |
<div class="portfolio-excerpt">{{ caption }}</div> | |
</article> | |
{{# <!-- end .portfolio-item --> #}} | |
{{ /gallery_images}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment