mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
Merge pull request #536 from JohnONolan/pagination
Move pagination to class rather than ID
This commit is contained in:
commit
88a6541ab6
2 changed files with 5 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
|
||||
<nav id="pagination" role="pagination">
|
||||
<nav class="pagination" role="pagination">
|
||||
{{#if next}}
|
||||
<div class="previous-page"><a href="/page/{{next}}/">Older Posts →</a></div>
|
||||
{{/if}}
|
||||
|
|
|
@ -249,7 +249,7 @@ describe('Core Helpers', function () {
|
|||
rendered = handlebars.helpers.pagination.call({pagination: {page: 1, prev: undefined, next: undefined, limit: 15, total: 8, pages: 1}});
|
||||
should.exist(rendered);
|
||||
// strip out carriage returns and compare.
|
||||
rendered.string.replace(/\r/g, '').should.equal('\n<nav id="pagination" role="pagination">\n \n <div class="page-number">Page 1<span class="extended"> of 1</span></div>\n \n</nav>');
|
||||
rendered.string.replace(/\r/g, '').should.equal('\n<nav class="pagination" role="pagination">\n \n <div class="page-number">Page 1<span class="extended"> of 1</span></div>\n \n</nav>');
|
||||
done();
|
||||
}).then(null, done);
|
||||
});
|
||||
|
@ -260,7 +260,7 @@ describe('Core Helpers', function () {
|
|||
rendered = handlebars.helpers.pagination.call({pagination: {page: 1, prev: undefined, next: 2, limit: 15, total: 8, pages: 3}});
|
||||
should.exist(rendered);
|
||||
// strip out carriage returns and compare.
|
||||
rendered.string.replace(/\r/g, '').should.equal('\n<nav id="pagination" role="pagination">\n \n <div class="previous-page"><a href="/page/2/">Older Posts →</a></div>\n \n <div class="page-number">Page 1<span class="extended"> of 3</span></div>\n \n</nav>');
|
||||
rendered.string.replace(/\r/g, '').should.equal('\n<nav class="pagination" role="pagination">\n \n <div class="previous-page"><a href="/page/2/">Older Posts →</a></div>\n \n <div class="page-number">Page 1<span class="extended"> of 3</span></div>\n \n</nav>');
|
||||
done();
|
||||
}).then(null, done);
|
||||
});
|
||||
|
@ -271,7 +271,7 @@ describe('Core Helpers', function () {
|
|||
rendered = handlebars.helpers.pagination.call({pagination: {page: 2, prev: 1, next: 3, limit: 15, total: 8, pages: 3}});
|
||||
should.exist(rendered);
|
||||
// strip out carriage returns and compare.
|
||||
rendered.string.replace(/\r/g, '').should.equal('\n<nav id="pagination" role="pagination">\n \n <div class="previous-page"><a href="/page/3/">Older Posts →</a></div>\n \n <div class="page-number">Page 2<span class="extended"> of 3</span></div>\n \n <div class="next-page"><a href="/page/1/">← Newer Posts</a></div>\n \n</nav>');
|
||||
rendered.string.replace(/\r/g, '').should.equal('\n<nav class="pagination" role="pagination">\n \n <div class="previous-page"><a href="/page/3/">Older Posts →</a></div>\n \n <div class="page-number">Page 2<span class="extended"> of 3</span></div>\n \n <div class="next-page"><a href="/page/1/">← Newer Posts</a></div>\n \n</nav>');
|
||||
done();
|
||||
}).then(null, done);
|
||||
});
|
||||
|
@ -282,7 +282,7 @@ describe('Core Helpers', function () {
|
|||
rendered = handlebars.helpers.pagination.call({pagination: {page: 3, prev: 2, next: undefined, limit: 15, total: 8, pages: 3}});
|
||||
should.exist(rendered);
|
||||
// strip out carriage returns and compare.
|
||||
rendered.string.replace(/\r/g, '').should.equal('\n<nav id="pagination" role="pagination">\n \n <div class="page-number">Page 3<span class="extended"> of 3</span></div>\n \n <div class="next-page"><a href="/page/2/">← Newer Posts</a></div>\n \n</nav>');
|
||||
rendered.string.replace(/\r/g, '').should.equal('\n<nav class="pagination" role="pagination">\n \n <div class="page-number">Page 3<span class="extended"> of 3</span></div>\n \n <div class="next-page"><a href="/page/2/">← Newer Posts</a></div>\n \n</nav>');
|
||||
done();
|
||||
}).then(null, done);
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue