|
| 1 | +--- |
| 2 | +layout: default.liquid |
| 3 | +--- |
| 4 | + |
| 5 | +<br> |
| 6 | +<br> |
| 7 | + |
| 8 | +<div class="demo-container"> |
| 9 | +{% if targets == "html5" %} |
| 10 | + |
| 11 | + {% unless height %} |
| 12 | + {% assign height = 480 %} |
| 13 | + {% endunless %} |
| 14 | + |
| 15 | + {% unless width %} |
| 16 | + {% assign width = 640 %} |
| 17 | + {% endunless %} |
| 18 | + |
| 19 | + <iframe class="html5-demo" src="https://demos.haxeflixel.com/html5/{{title}}" |
| 20 | + width="{{width}}" |
| 21 | + height="{{height}}" |
| 22 | + ></iframe> |
| 23 | +{% endif %} |
| 24 | + |
| 25 | +{% if targets == "flash" %} |
| 26 | + <div class="flash-demo"> |
| 27 | + <div id="demoSWF"> |
| 28 | + </div> |
| 29 | + </div> |
| 30 | +{% endif %} |
| 31 | + |
| 32 | +</div> |
| 33 | + |
| 34 | + <div class="container-main-content"> |
| 35 | + <div class="demo-content"> |
| 36 | + |
| 37 | + <br> |
| 38 | + |
| 39 | + <h1 class="title">{{ title }}</h1> |
| 40 | + |
| 41 | + <a href="https://github.com/HaxeFlixel/flixel-demos/tree/dev/{{source}}/source" target="_blank" style="float: right;"> |
| 42 | + <span class="glyphicon glyphicon-book"></span> |
| 43 | + source code |
| 44 | + </a> |
| 45 | + |
| 46 | + {{ content }} |
| 47 | + |
| 48 | + <hr> |
| 49 | + |
| 50 | + <ul class="pager"> |
| 51 | + {% assign prevDemo = collections.demo-item | getPreviousCollectionItem %} |
| 52 | + {% if prevDemo %} |
| 53 | + <li class="previous"> |
| 54 | + <a href="{{prevDemo.url}}" title="Previous"> |
| 55 | + {% comment %} <img src="<%= @getThumbnail("/images/demos/#{@getPagerPrevious('demos').attributes.title}.png", "zoomcrop", { w: 70, h:70 }) %>" alt="Previous"> {% endcomment %} |
| 56 | + </a> |
| 57 | + </li> |
| 58 | + {% endif %} |
| 59 | + |
| 60 | + {% comment %} this is to loop back to the last demo, if you're on the first one {% endcomment %} |
| 61 | + {% unless prevDemo %} |
| 62 | + <li class="previous"> |
| 63 | + <a href="<%= @getLast('demos').attributes.url %>" title="Previous"> |
| 64 | + {% comment %} <img src="<%= @getThumbnail("/images/demos/#{@getLast('demos').attributes.title}.png", "zoomcrop", { w: 70, h:70 }) %>" alt="Previous"> {% endcomment %} |
| 65 | + </a> |
| 66 | + </li> |
| 67 | + {% endunless %} |
| 68 | + |
| 69 | + {% assign nextDemo = collections.demo-item | getNextCollectionItem %} |
| 70 | + {% if nextDemo %} |
| 71 | + <li class="next"> |
| 72 | + <a href="{{ nextDemo.url }}" title="Next"> |
| 73 | + {% comment %} <img src="<%= @getThumbnail("/images/demos/#{@getPagerNext('demos').attributes.title}.png", "zoomcrop", {w: 70, h:70 }) %>" alt="Next"> |
| 74 | + > {% endcomment %} |
| 75 | + </a> |
| 76 | + </li> |
| 77 | + {% endif %} |
| 78 | + |
| 79 | + {% comment %} gets the first demo, if the "next" one doesn't exist {% endcomment %} |
| 80 | + {% unless nextDemo %} |
| 81 | + <li class="next"> |
| 82 | + <a href="{{ nextDemo.url }}" title="Next"> |
| 83 | + {% comment %} <img src="<%= @getThumbnail("/images/demos/#{@getFirst('demos').attributes.title}.png", "zoomcrop", { w:70, h:70 }) %>" alt="Next"> |
| 84 | + > {% endcomment %} |
| 85 | + </a> |
| 86 | + </li> |
| 87 | + {% endunless %} |
| 88 | + </ul> |
| 89 | + |
| 90 | + </div> |
| 91 | + </div> |
| 92 | + |
| 93 | +</div> |
| 94 | + |
| 95 | + |
| 96 | +{% if targets == "flash" %} |
| 97 | +<script type="text/javascript" src="/vendor/swfobject/swfobject/swfobject.js"></script> |
| 98 | +{% endif %} |
0 commit comments