This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var files = [ | |
"file.ext", | |
] | |
var i; | |
var targets_count = files.length; | |
for (i = 0; i < targets_count; i++) { | |
files[i] | |
var partsArr = files[i].split('/'); | |
console.log(partsArr); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Roni Pinili | |
* 12/17/2017 | |
* Laravel treebuilding (Parent - Child Collection) | |
Params child collection, parent collection | |
*/ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_the_first_image() { | |
$files = get_children('post_parent='.get_the_ID().'&post_type=attachment&post_mime_type=image'); | |
if($files) : | |
$keys = array_reverse(array_keys($files)); | |
$j=0; | |
$num = $keys[$j]; | |
$image=wp_get_attachment_image($num, 'large', false); | |
$imagepieces = explode('"', $image); | |
$imagepath = $imagepieces[1]; | |
$thumb=wp_get_attachment_thumb_url($num); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Load more post | |
*/ | |
var ajaxurl = "<?php echo admin_url( 'admin-ajax.php' ); ?>"; | |
var page = 2; | |
jQuery(function($) { | |
$('body').on('click', '.loadmore', function() { | |
var data = { | |
'action': 'load_posts_by_ajax', | |
'page': page, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin w1580 { | |
@media only screen and (max-width: 1580px) { | |
@content; | |
} | |
} | |
@mixin w1480 { | |
@media only screen and (max-width: 1480px) { | |
@content; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row gallery-carousel"> | |
{% for block in section.blocks %} | |
<div class="gallery-section-item gallery-section-item-{{ block.id }}" {{ block.shopify_attributes }}> | |
<div class="gallery-section-item-inner"> | |
{% if block.settings.link != blank %}<a href="{{ block.settings.link }}">{% endif %} | |
{% if block.settings.image != blank %} | |
<img src="{{ block.settings.image | img_url: 'master' }}" alt="{{ block.settings.image.alt }}"> | |
<noscript> | |
<img src="{{ block.settings.image | img_url: '1024x' }}" alt="{{ block.settings.image.alt }}"> | |
</noscript> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section id="text-and-image-side-by-side-{{ section.id }}" class="text-and-image-side-by-side index-section" data-section-id="{{ section.id }}" data-section-type="image-section"> | |
<div class="row"> | |
<div class="desktop-6 tablet-2 mobile-2"> | |
<h2>{{section.settings.heading}}</h2> | |
<div class="h2-border"></div> | |
<p>{{section.settings.content}}</p> | |
<div class="cta"> | |
<a href="{{section.settings.button_url_link}}">{{section.settings.button_text}}</a> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Shortcircuit variable | |
let triggered = false; | |
function ScrollExecute() { | |
// Locate loadmore button | |
let moreButon = $('#more').last(); | |
// Get URL from the loadmore button | |
let nextUrl = $(moreButon).find('a').attr("href"); | |
console.log(nextUrl); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadmoreByButton(){ | |
//var moreButon = $('#more').last(); | |
var nextUrl = $('.more').attr("link"); | |
$('body').on('click', '.more', function(){ | |
$.ajax({ | |
url: nextUrl, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section class="home-our-products hop"> | |
<div class="container-fluid"> | |
<div class="row"> | |
{% if section.settings.title != blank %} | |
<div class="section-header text-center"> | |
<h2>{{ section.settings.title | escape }}</h2> | |
</div> | |
{% endif %} |
OlderNewer