A simple jQuery plugin to extract the dominant color of an image and apply it to the background of its parent element.
And another website dealing with Flexbox patterns.
„Flexbox is awesome, but it introduces many new concepts that can make it difficult to use. These interactive examples will show you practical ways to use it to build UI components. They start out simple and get more complex near the end. You can start using these patterns in your own code right away, though I recommend you apply accessibility best practices to the markup (like using semantic HTML5 elements).“
Solved by Flexbox is not framework, but a website that showcases how Flexbox makes many CSS hacks obsolete.
„This site is not another CSS framework. Instead, its purpose is to showcase problems once hard or impossible to solve with CSS alone, now made trivially easy with Flexbox. And with the recent release of Internet Explorer 11 and Safari 6.1, the latest Flexbox spec is now supported in every modern browser.“
Flexbox is here to stay and its time to start using it. Flexbox has more than 95% support globally, which matches support for calc and viewport units. Bootstrap 4 will be supporting it and my new website will be Flexbox based as well :)
Oh and if you need older browser support … use Flexibility.
Bulma is a modern CSS framework based on Flexbox. It provides a nice set of core functionality and almost every kind component you might need to build a quick skeleton for your project.
I am starting a small list of Material Design resources. If you have anything to share, let me know in the comments.
Sometimes we need to debug a WordPress plugin, even though the website is live.
This would display the errors for anyone.
1 |
define('WP_DEBUG', true); |
Gladly WordPress provides options to do this more subtle.
1 2 3 4 5 6 7 8 9 10 11 |
// Turns WordPress debugging on define('WP_DEBUG', true); // Tells WordPress to log everything to the /wp-content/debug.log file define('WP_DEBUG_LOG', true); // Doesn't force the PHP 'display_errors' variable to be on define('WP_DEBUG_DISPLAY', false); // Hides errors from being displayed on-screen @ini_set('display_errors', 0); |
Pattern Lock is a light weight plugin to simulate the Android Pattern Lock Mechanism. It’s easy to configure and style.
1 2 3 |
var lock = new PatternLock("#patternContainer"); var lock= new PatternLock('#patternHolder',{radius:30,margin:20}); |
Gridify is a jQuery plugin that utilizes CSS3 transformations to transform your website into a multi page grid with smooth animations.
Uses jQuery and Velocity.js!
„Have you ever needed to perform a single or periodic task on your page based on user’s actual presence? Do you think you really need to fetch new notifications from your servers all the time, or isn’t such task quite pointless unless there actually is an active user sitting in front of your page?“
jQuery-IdleCat to the rescue …
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
// Create an instance of idleCat on a jQuery object. var instance = $('#status').idleCat({ // Number of seconds to wait between two scans of user activity. interval: 2, // How many seconds to hold the activity from the moment of knowing there was not any activity. release: 2, // The default state of the idleness (use 'active' or 'idle'). state: 'idle', // Callback fired after the discovery of user activity on the page. activeCallback: function() { $(this).addClass('active'); }, // Callback fired after the discovery of used idleness on the page. // (+ number of seconds defined in the 'release' property) idleCallback: function(element) { $(this).removeClass('active'); }, // See below for more options... }); // Log current state from idleCat attached to that jQuery object. window.setInterval(function() { console.log(instance.getState()); }, 1000) |
Code My UI provides handpicked code snippets, you can use in your own web projects. You can find website design inspiration, plus some code samples.