Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

Commit 4549dff

Browse files
committed
improve reliability of placekittens in example
1 parent 441ea5c commit 4549dff

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Include required Javascripts
1818
<script src="dist/poplockit.min.js"></script>
1919
```
2020

21-
Create html like this:
21+
Create html like this
2222
```html
2323
<div id="feed">
2424
<article>
@@ -56,6 +56,6 @@ Contributions and pull requests are very welcome. Please follow these guidelines
5656

5757
#### Submitting pull requests
5858

59-
1. Add tests for the change you want to make. Run `grunt test` to see if tests fail.
59+
1. Add tests for the change you want to make. Run `grunt jasmine` to see if tests fail.
6060
1. Run `grunt` to compile new dist and make sure nothing is broken
6161
1. Submit a Pull Request using GitHub.

example/js/lockit.example.coffee

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ App =
2929
generateFeedHtml: ->
3030
[1..@defaults.numberItems].map =>
3131
"<ul>" + [1..@defaults.numberColumns].map =>
32-
@generateKittensHtml 2
32+
@generateKittensHtml Math.ceil(1 + (Math.random() * 6))
3333
.join('') + "</ul>"
3434
.join('')
3535

36+
3637
generateKittensHtml: (num) ->
3738
"<ul style='width: #{@columnWidth}px'>" + [1..num].map =>
38-
height = Math.ceil((50 + (Math.random() * 600))/ 10) * 10
39+
height = Math.ceil((50 + (Math.random() * 300))/ 10) * 10
3940
width = @columnWidth - @defaults.columnPadding
4041
"<li style='width: #{width}px'><img height='#{height}' width='#{width}' src='http://placekitten.com/#{width}/#{height}'></li>"
4142
.join('') + "</ul>"

example/js/lockit.example.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)