diff --git a/composer.json b/composer.json index 1b09112..a2e25e1 100644 --- a/composer.json +++ b/composer.json @@ -8,9 +8,7 @@ "require": { "twbs/bootstrap": "4.*", "wp-bootstrap/wp-bootstrap-navwalker": "*", - "kenwheeler/slick": "1.6.1", - "desandro/masonry": "4.*", - "desandro/imagesloaded": "4.*" + "kenwheeler/slick": "1.6.1" }, "scripts": { "post-install-cmd": "bash install.sh", diff --git a/composer.lock b/composer.lock index 96fd486..0150d95 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "e76fd93afcf5cccb4b58c468e70bbeba", + "content-hash": "3d0374e3fd2d6b43ef8af59ab09d04f8", "packages": [ { "name": "composer/installers", @@ -126,84 +126,6 @@ ], "time": "2017-12-29T09:13:20+00:00" }, - { - "name": "desandro/imagesloaded", - "version": "v4.1.4", - "source": { - "type": "git", - "url": "https://github.com/desandro/imagesloaded.git", - "reference": "67c4e57453120935180c45c6820e7d3fbd2ea1f9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/desandro/imagesloaded/zipball/67c4e57453120935180c45c6820e7d3fbd2ea1f9", - "reference": "67c4e57453120935180c45c6820e7d3fbd2ea1f9", - "shasum": "" - }, - "type": "component", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "David DeSandro", - "homepage": "http://desandro.com/", - "role": "developer" - } - ], - "description": "JavaScript is all like _You images done yet or what?_", - "homepage": "http://imagesloaded.desandro.com", - "keywords": [ - "dom", - "images", - "javascript", - "jquery-plugin", - "library", - "loaded", - "ui" - ], - "time": "2018-01-02T16:53:35+00:00" - }, - { - "name": "desandro/masonry", - "version": "v4.2.2", - "source": { - "type": "git", - "url": "https://github.com/desandro/masonry.git", - "reference": "3b0883cf4a4a046896719b9cf282ea74be7ffecd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/desandro/masonry/zipball/3b0883cf4a4a046896719b9cf282ea74be7ffecd", - "reference": "3b0883cf4a4a046896719b9cf282ea74be7ffecd", - "shasum": "" - }, - "type": "component", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "David DeSandro", - "homepage": "http://desandro.com/", - "role": "developer" - } - ], - "description": "Cascading grid layout library", - "homepage": "https://masonry.desandro.com", - "keywords": [ - "browser", - "dom", - "grid", - "javascript", - "layout", - "library", - "outlayer" - ], - "time": "2018-07-04T18:01:15+00:00" - }, { "name": "kenwheeler/slick", "version": "1.6.1", diff --git a/install.sh b/install.sh index 120ab28..e705696 100644 --- a/install.sh +++ b/install.sh @@ -39,13 +39,6 @@ echo "Copy Slick for Slider...\n\n"; copy("vendor/kenwheeler/slick/slick/ajax-loader.gif", "src/assets/vendor/slick/ajax-loader.gif"); recurse_copy("vendor/kenwheeler/slick/slick/fonts", "src/assets/vendor/slick/fonts"); -echo "Copy Masonry & ImageLoaded... \n\n"; - if (!file_exists("src/assets/vendor/desandro")) { - mkdir("src/assets/vendor/desandro/", 0777, true); - } - copy("vendor/desandro/masonry/dist/masonry.pkgd.min.js", "src/assets/vendor/desandro/masonry.pkgd.min.js"); - copy("vendor/desandro/imagesloaded/imagesloaded.pkgd.min.js", "src/assets/vendor/desandro/imagesloaded.pkgd.min.js"); - echo "Finish Copy files! \n\n"; function recurse_copy($src,$dst) { diff --git a/src/assets/js/js.js b/src/assets/js/js.js index 1c462e0..6ad8e4d 100644 --- a/src/assets/js/js.js +++ b/src/assets/js/js.js @@ -36,22 +36,6 @@ jQuery(document).ready(function( $ ) { */ $('.wp-block-button a').toggleClass().addClass('btn btn-jelly-bean'); - // Instantiates Masonry; - var observer = new MutationObserver(function(mutations) { - mutations.forEach(function(mutation) { - if ($('.tainacan-masonry-view')[0]) { - $('.tainacan-masonry-view').masonry({ - percentPosition: true, - itemSelector: '.grid-item', - /* columnWidth: '.grid-sizer', */ - columnWidth: 277, - //gutter: '.gutter-sizer', - horizontalOrder: true, - }); - } - }); - }); - $('.showInput').on('click', function(){ $('.tainacan-form-search').removeClass('d-none'); $('.tainacan-form-search').addClass('d-flex'); @@ -81,15 +65,6 @@ jQuery(document).ready(function( $ ) { } }); - var config = { - attributes: true, - childList: true, - characterData: true - }; - - if(document.getElementById('items-list-area')) - observer.observe(document.getElementById('items-list-area'), config); - $('.tainacan-list-post .table .tainacan-list-collection td').click(function(){ window.location = $('.tainacan-list-post .table .tainacan-list-collection').data("href"); }); diff --git a/src/assets/scss/_view-mode-masonry.scss b/src/assets/scss/_view-mode-masonry.scss deleted file mode 100644 index b23f42a..0000000 --- a/src/assets/scss/_view-mode-masonry.scss +++ /dev/null @@ -1,50 +0,0 @@ -.tainacan-masonry-view { - min-height: 50vh; - .grid-item{ - .card{ - img{ - width: 247.5px; - height: auto; - } - &:hover{ - background-color: #eaeaea; - } - /* &:selected{ - background-color: #e6f6f8; - } */ - .card-body{ - padding: 0.85rem; - .card-title{ - a{ - color: #000 !important; - font-weight: 400; - font-size: 0.85rem; - } - } - } - } - } - /* margin: 1.5em 0; - padding: 0; - -moz-column-gap: 1.5em; - -webkit-column-gap: 1.5em; - column-gap: 0.5em; - - .gutter-sizer { width: 4%; } - - .grid-sizer, .grid-item{ - width: 20%; - @media only screen and (max-width: 700px){ - width: 100%; - } - } - - .grid-item{ - margin-bottom: 10px; - .card{ - border: none; - img{ - } - } - } */ -} \ No newline at end of file diff --git a/src/assets/scss/style.scss b/src/assets/scss/style.scss index e739a64..0c38043 100644 --- a/src/assets/scss/style.scss +++ b/src/assets/scss/style.scss @@ -460,8 +460,6 @@ form{ @import "_view-mode-frame.scss"; -@import "_view-mode-masonry.scss"; - @import "_view-mode-books.scss"; @import "_view-mode-polaroid.scss"; diff --git a/src/functions.php b/src/functions.php index b85dfaf..1100d47 100644 --- a/src/functions.php +++ b/src/functions.php @@ -61,14 +61,6 @@ if(!function_exists('tainacan_setup')) { 'icon' => '', 'dynamic_metadata' => false, ]); - - tainacan_register_view_mode('masonry', [ - 'label' => 'Masonry', - 'description' => 'A masonry view', - 'icon' => '', - 'dynamic_metadata' => false, - ]); - } add_image_size( 'tainacan-theme-list-post', 300, 200, true ); diff --git a/src/functions/enqueues.php b/src/functions/enqueues.php index 4bd6372..624cd3b 100644 --- a/src/functions/enqueues.php +++ b/src/functions/enqueues.php @@ -14,12 +14,6 @@ if ( ! function_exists('tainacan_Enqueues') ) { wp_deregister_script( 'jquery' ); wp_register_script( 'jquery', includes_url( '/js/jquery/jquery.js' ), false, NULL, true ); wp_enqueue_script( 'jquery' ); - - wp_register_script('masonryJS', get_template_directory_uri() . '/assets/vendor/desandro/masonry.pkgd.min.js', '', '', true); - wp_enqueue_script( 'masonryJS' ); - - wp_register_script('imageLoadedJS', get_template_directory_uri() . '/assets/vendor/desandro/imagesloaded.pkgd.min.js', '', '', true); - wp_enqueue_script( 'imageLoadedJS' ); /** * Bootstrap 4.1.3 */ diff --git a/src/tainacan/view-mode-masonry.php b/src/tainacan/view-mode-masonry.php deleted file mode 100644 index b8a3ce8..0000000 --- a/src/tainacan/view-mode-masonry.php +++ /dev/null @@ -1,33 +0,0 @@ -