Permalink
Browse files

Fixed module layout. Added masonry and imagesloaded to dependancies u…

…pon install
  • Loading branch information...
1 parent a26b688 commit e7db7d516b5b5ee9e68d87c9593800b37d20bbfc @sergeychernyshev sergeychernyshev committed Dec 21, 2014
Showing with 47 additions and 14 deletions.
  1. +3 −0 .gitmodules
  2. +20 −13 admin/modules.php
  3. +1 −0 imagesloaded
  4. +22 −0 index.php
  5. +1 −1 masonry
View
@@ -31,3 +31,6 @@
[submodule "bootswatch"]
path = bootswatch
url = git@github.com:thomaspark/bootswatch.git
+[submodule "imagesloaded"]
+ path = imagesloaded
+ url = git@github.com:desandro/imagesloaded.git
View
@@ -96,10 +96,7 @@
foreach ($module_categories as $category_slug => $module_category) {
$category_modules = array();
foreach ($builtin_modules as $module_slug => $module) {
- if ($module['category_slug'] == $category_slug
- && ($show_experimental
- || !array_key_exists('experimental', $module)
- || !$module['experimental'])
+ if ($module['category_slug'] == $category_slug && ($show_experimental || !array_key_exists('experimental', $module) || !$module['experimental'])
) {
$category_modules[$module_slug] = $module;
}
@@ -254,16 +251,26 @@
}
?>
</div>
-<script src="<?php echo UserConfig::$USERSROOTURL ?>/masonry/jquery.masonry.min.js"></script>
-<script>
- $('.modules').masonry({
- columnWidth: function( containerWidth ) {
- if (containerWidth > 800) {
- return containerWidth / 2;
- } else {
- return containerWidth;
- }
+<style>
+ .modules .startupapi-module {
+ width: 44%;
+ }
+
+ @media (max-width: 800px) {
+ .modules .startupapi-module {
+ width: 100%;
}
+ }
+</style>
+<script src="<?php echo UserConfig::$USERSROOTURL ?>/imagesloaded/imagesloaded.pkgd.min.js"></script>
+<script src="<?php echo UserConfig::$USERSROOTURL ?>/masonry/dist/masonry.pkgd.min.js"></script>
+<script>
+ $('.modules').imagesLoaded(function () {
+ $('.modules').masonry({
+ columnWidth: '.startupapi-module',
+ itemSelector: '.startupapi-module',
+ gutter: 20
+ });
});
</script>
<?php
Submodule imagesloaded added at 0ebb57
View
@@ -90,6 +90,28 @@
'url' => 'https://github.com/rviscomi/trunk8',
'ready' => true
),
+ array(
+ 'path' => __DIR__ . '/masonry/',
+ 'file' => __DIR__ . '/masonry/dist/masonry.pkgd.min.js',
+ 'name' => 'Masonry JavaScript library',
+ 'description' => 'Cascading grid layout library. Masonry works by placing elements in optimal position based on available vertical space, sort of like a mason fitting stones in a wall. You’ve probably seen it in use all over the Internet.',
+ 'git-repo' => 'https://github.com/desandro/masonry.git',
+ 'github-user' => 'desandro',
+ 'github-repo' => 'masonry',
+ 'url' => 'https://github.com/desandro/masonry',
+ 'ready' => true
+ ),
+ array(
+ 'path' => __DIR__ . '/imagesloaded/',
+ 'file' => __DIR__ . '/imagesloaded/imagesloaded.pkgd.min.js',
+ 'name' => 'imagesLoaded JavaScript library',
+ 'description' => 'JavaScript is all like "You images done yet or what?"',
+ 'git-repo' => 'https://github.com/desandro/imagesloaded.git',
+ 'github-user' => 'desandro',
+ 'github-repo' => 'imagesloaded',
+ 'url' => 'https://github.com/desandro/imagesloaded',
+ 'ready' => true
+ ),
);
$code_none_ready = true;
Submodule masonry updated 79 files
+4 −2 .gitignore
+12 −0 .jshintrc
+1 −1 .tm_properties
+6 −11 CONTRIBUTING.mdown
+75 −0 Gruntfile.js
+39 −15 README.mdown
+0 −6 _config.yml
+0 −75 _layouts/default.html
+0 −206 _posts/demos/2011-05-01-basic-single-column.html
+0 −213 _posts/demos/2011-05-02-basic-multi-column.html
+0 −57 _posts/demos/2011-05-03-images.html
+0 −226 _posts/demos/2011-05-04-tumblelog.html
+0 −144 _posts/demos/2011-05-05-animating-jquery.html
+0 −132 _posts/demos/2011-05-06-animating-css-transitions.html
+0 −136 _posts/demos/2011-05-07-animating-modernizr.html
+0 −89 _posts/demos/2011-05-08-adding-items.html
+0 −268 _posts/demos/2011-05-09-infinite-scroll.html
+0 −209 _posts/demos/2011-05-10-gutters.html
+0 −135 _posts/demos/2011-05-11-right-to-left.html
+0 −137 _posts/demos/2011-05-17-centered.html
+0 −219 _posts/demos/2011-07-26-fluid.html
+0 −249 _posts/demos/2011-10-07-corner-stamp.html
+0 −149 _posts/docs/2011-05-01-intro.mdown
+0 −157 _posts/docs/2011-05-02-options.mdown
+0 −155 _posts/docs/2011-05-03-methods.mdown
+0 −96 _posts/docs/2011-05-04-animating.mdown
+0 −139 _posts/docs/2011-05-30-help.mdown
+0 −189 _posts/pages/2011-05-02-2.html
+0 −174 _posts/pages/2011-05-03-3.html
+0 −159 _posts/pages/2011-05-04-4.html
+0 −167 _posts/pages/2011-05-05-5.html
+0 −14 _posts/tests/2011-01-01-index.html
+0 −1,438 _posts/tests/2011-05-14-lots-of-bricks.html
+0 −247 _posts/tests/2011-05-17-dual.html
+0 −217 _posts/tests/2011-05-18-first-child-no-width.html
+0 −205 _posts/tests/2011-05-19-empty.html
+0 −214 _posts/tests/2011-08-08-destroy.html
+0 −50 _posts/tests/2011-09-27-centered-few.html
+38 −0 bower.json
+69 −0 changelog.md
+0 −9 component.json
+0 −616 css/style.css
+2,960 −0 dist/masonry.pkgd.js
+9 −0 dist/masonry.pkgd.min.js
+61 −0 examples/basic.html
+118 −0 examples/bottom-up.html
+42 −0 examples/browserify/browserify.html
+19 −0 examples/browserify/main.js
+67 −0 examples/element-sizing.html
+33 −0 examples/examples.css
+67 −0 examples/fit-width.html
+63 −0 examples/jquery.html
+100 −0 examples/js/masonry-v2-shim.js
+69 −0 examples/js/require-js.js
+41 −0 examples/require-js.html
+119 −0 examples/right-to-left.html
+123 −0 examples/stamps.html
+72 −0 examples/v2-shim.html
+0 −132 index.html
+0 −502 jquery.masonry.js
+0 −10 jquery.masonry.min.js
+0 −38 js/box-maker.js
+0 −4 js/jquery-1.7.1.min.js
+0 −47 js/jquery.infinitescroll.min.js
+0 −2 js/modernizr-transitions.js
+211 −0 masonry.js
+0 −16 minify.sh
+44 −0 package.json
+27 −0 test/.jshintrc
+133 −0 test/basic-layout.js
+25 −0 test/element-sizing.js
+9 −0 test/empty.js
+12 −0 test/fit-width.js
+16 −0 test/gutter.js
+14 −0 test/helpers.js
+143 −0 test/index.html
+57 −0 test/stamp.js
+118 −0 test/tests.css
+11 −0 test/zero-column-width.js

0 comments on commit e7db7d5

Please sign in to comment.