Using GSAP Timeline to create a masking effect for a background image.
A Pen by Lefteris Theodossiadis on CodePen.
/* Simple Responsive Grid Layout */ | |
.container { | |
display: grid; | |
grid-gap: 1rem; | |
grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); | |
grid-auto-rows: 10rem; | |
} |
<?php | |
/** | |
* CF 7 - version 5.4.1 | |
* Load JS & CSS only when necessary | |
* | |
* Use WP functions '__return_true', '__return_false' to load the | |
* necessary files. The 'is_page()' should be called after the init | |
* hook and the js+css must be enqueued before the wp_head hook. | |
* | |
*/ |
Using GSAP Timeline to create a masking effect for a background image.
A Pen by Lefteris Theodossiadis on CodePen.
{% for video in site.static_files %} | |
{% if video.path contains 'img/videos' %} | |
<video muted playsinline> | |
<source src="{{ site.baseurl }}{{ video.path }}" type="video/mp4"> | |
</video> | |
{% endif %} | |
{% endfor %} |
You can search the site like this: | |
http://example.com/?type=apartment&area=athens |
<?php | |
// | |
// | |
function css_js_versioning() { | |
add_filter( 'style_loader_src', 'set_custom_ver_css_js', 9999 ); // css files versioning | |
add_filter( 'script_loader_src', 'set_custom_ver_css_js', 9999 ); // js files versioning | |
} | |
add_action('init', 'css_js_versioning'); |
<?php | |
// | |
// | |
function set_custom_ver_css_js( $src ) { | |
// style.css URI | |
$style_file = get_stylesheet_directory().'/style.css'; | |
if ( $style_file ) { | |
// css file timestamp | |
$version = filemtime($style_file); |
<?php | |
// Get the style.css timestamp & make it a named constant | |
$css_timestamp = filemtime( get_stylesheet_directory().'/style.css' ); | |
define( 'THEME_VERSION', $css_timestamp ); | |
// Use it in your enqueues | |
wp_enqueue_style( | |
'style_name', | |
get_stylesheet_directory_uri() . '/style.css', | |
array(), |
<?php | |
// Get the theme version & make it a named constant | |
$theme_data = wp_get_theme(); | |
define( 'THEME_VERSION', $theme_data->Version ); | |
// Use it in your enqueues | |
wp_enqueue_style( | |
'style_name', | |
get_stylesheet_directory_uri() . '/style.css', | |
array(), |
# place above all other rewrite rules if using a CMS or program that redirects all request to index.php file (e.g. WordPress, Drupal, Laravel, etc...) | |
# if a file or directory does not exist on the local host, 302 redirect the request to the production host so the browser doesn't cache the file in case you replace the file locally | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# Redirect WordPress uploads | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule wp-content/uploads/(.*)$ http://REPLACEWITHYOURDOMAIN.COM/wp-content/uploads/$1 [R=302,L,NC] | |
</IfModule> |