@@ -48,20 +48,23 @@ layout: default.liquid
48
48
<hr >
49
49
50
50
<ul class =" pager" >
51
+
51
52
{% assign prevDemo = collections .demo-item | getPreviousCollectionItem %}
52
53
{% if prevDemo %}
53
54
<li class =" previous" >
54
55
<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
+ {% capture imgURL %}src/files/images/demos/{{prevDemo .data .title }}.png{% endcapture %}
57
+ {% image imgURL , "Previous" , 70 , 70 %}
56
58
</a >
57
59
</li >
58
60
{% endif %}
59
61
60
- {% comment %} this is to loop back to the last demo, if you're on the first one {% endcomment %}
61
62
{% unless prevDemo %}
63
+ {% assign lastDemo = collections .demo-item | last %}
62
64
<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 href =" {{lastDemo .url }}" title =" Previous" >
66
+ {% capture imgURL %}src/files/images/demos/{{lastDemo .data .title }}.png{% endcapture %}
67
+ {% image imgURL , "Previous" , 70 , 70 %}
65
68
</a >
66
69
</li >
67
70
{% endunless %}
@@ -70,16 +73,19 @@ layout: default.liquid
70
73
{% if nextDemo %}
71
74
<li class =" next" >
72
75
<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 %}
76
+ {% capture imgURL %} src/files/ images/demos/{{ nextDemo . data .title }} .png{% endcapture %}
77
+ {% image imgURL , "Next" , 70 , 70 %}
75
78
</a >
76
79
</li >
77
80
{% endif %}
78
81
79
82
{% comment %} gets the first demo, if the "next" one doesn't exist {% endcomment %}
80
83
{% unless nextDemo %}
84
+ {% assign firstDemo = collections .demo-item | first %}
81
85
<li class =" next" >
82
- <a href =" {{ nextDemo .url }}" title =" Next" >
86
+ <a href =" {{ firstDemo .url }}" title =" Next" >
87
+ {% capture imgURL %}src/files/images/demos/{{ firstDemo .data .title }}.png{% endcapture %}
88
+ {% image imgURL , "Next" , 70 , 70 %}
83
89
{% comment %} <img src="<%= @getThumbnail("/images/demos/#{@getFirst('demos').attributes.title}.png", "zoomcrop", { w:70, h:70 }) %>" alt="Next">
84
90
> {% endcomment %}
85
91
</a >
0 commit comments