diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-04-27 17:02:55 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-04-27 17:04:47 -0400 |
| commit | 934a8ac8afdaa2afc2061542abbf3f4864a476b1 (patch) | |
| tree | 37f3a7d795545fdef683569275e5bcad67356fff | |
| parent | 03d2e95c057e1dcbcf9994c3f32d8e28e6b6af53 (diff) | |
prev/next buttons
| -rw-r--r-- | site/db.json | 4 | ||||
| -rw-r--r-- | site/index.js | 2 | ||||
| -rw-r--r-- | site/public/assets/javascripts/_env.js | 8 | ||||
| -rw-r--r-- | site/public/assets/style.css | 1 | ||||
| -rw-r--r-- | site/templates/project.liquid | 11 |
5 files changed, 13 insertions, 13 deletions
diff --git a/site/db.json b/site/db.json index c391558..66d905f 100644 --- a/site/db.json +++ b/site/db.json @@ -16,7 +16,7 @@ "title": "", "thumb": "" }, - "images": [ + "media": [ { "type": "vimeo", "token": "112498725", @@ -74,7 +74,7 @@ "title": "", "thumb": "" }, - "images": [ + "media": [ { "uri": "https://ltho.s3.amazonaws.com/twohustlers%2Fefd9dcf8-03c1-42c3-b6cc-3472acf908e4.jpg", "caption": "" diff --git a/site/index.js b/site/index.js index a7b207a..3434742 100644 --- a/site/index.js +++ b/site/index.js @@ -5,7 +5,7 @@ var projectSchema = { title: {type: 'string'}, menu: {type: 'string'}, description: {type: 'text'}, - images: {type: 'media-list'}, + media: {type: 'media-list'}, thumbnail: {type: 'image'}, } diff --git a/site/public/assets/javascripts/_env.js b/site/public/assets/javascripts/_env.js index 8c1270f..aae60b9 100644 --- a/site/public/assets/javascripts/_env.js +++ b/site/public/assets/javascripts/_env.js @@ -446,16 +446,14 @@ function build_gallery () { // load_video($el) } else { - next() + gallery.next() } }) - // $next.on("click", next) - function next(){ - gallery.next() - } gallery.loader.on("progress", function(imagesLoaded, loadingImage){ $(loadingImage.img).addClass('loaded') }) + $(".nextbutton").click(function(){ gallery.next() }) + $(".prevbutton").click(function(){ gallery.previous() }) } function resize_gallery () { if (! gallery) return; diff --git a/site/public/assets/style.css b/site/public/assets/style.css index 9fb1a3a..8c7594d 100644 --- a/site/public/assets/style.css +++ b/site/public/assets/style.css @@ -446,6 +446,7 @@ nav .sub.active a { padding: 20px 0px 0.6em 2px; margin-bottom: 0.7em; font-size: 1em; + text-transform: uppercase; } diff --git a/site/templates/project.liquid b/site/templates/project.liquid index 3d32c0d..0dc828c 100644 --- a/site/templates/project.liquid +++ b/site/templates/project.liquid @@ -6,11 +6,12 @@ <span class="nextbutton">NEXT ASSET</span> </div> <div class="gallery" id="okgallery"> - {% if project.video.token %} - <div class="cell video" style="background-image:url({{ project.video.thumb }})" data-video="https://player.vimeo.com/video/{{ project.video.token }}" data-caption="{{ project.video.title }}"></div> - {% endif %} - {% for image in project.images %} - <div class="cell" data-caption="{{ image.caption }}"><img src="{{ image.uri }}"></div> + {% for media in project.media %} + {% if media.token %} + <div class="cell video" style="background-image:url({{ media.thumb }})" data-video="https://player.vimeo.com/video/{{ media.token }}" data-caption="{{ media.title }}"></div> + {% else %} + <div class="cell" data-caption="{{ media.caption }}"><img src="{{ media.uri }}"></div> + {% endif %} {% endfor %} </div> <div class="caption"></div> |
