It basically fetches JSON data, parses image and video sources, embedded players or templated content and turns it into optimized React components. The design is minimalistic and based entirely on Semantic UI.
With iframes, video players and heavy GIFs mixing over infinite scrolling, the main idea was to mount and unmount components depending on their visibility. And it was just too easy with react-lazyload.
I had some fun setting the volume of videos in relation to their position on the viewport. It works pretty well, try it out !
Some UI effects are very simple, yet difficult to achieve. I already solved the vertical slide dilemma with jQuery, but I needed to implement it for React Transition Group.
When items are entering a list, we want them to fade in and smoothly slide the surrounding elements away, instead of brutally shifting our interface.
Transitions work by easing from one initial value to an other defined one. The problem with vertical sliding is that most HTML element containers do not have a predefined height, but rather auto adapt this value to fit the content. Therefor, it is quite tricky to animate the entrance of randomly sized blocks without jumping stroboscopically into the margin, padding and box-sizing soup.
My approach is to use the CSSTransition component callbacks to animate a negative margin and slide our items from the top.
Configuration of the plugin is optional, but you should at least register your variables if you are using a CSS framework.
Paths to Sass files are relative to the theme directory.
Use the filter 'sass_configuration' to return your configurations array.
In order to list and edit your Sass variables on the plugin dedicated page, it is necessary to register their “definition” file(s). It is assumed that those files’ only role is to declare variables and their values.
It will prepend the code to compile with an @import directive for each listed file. Useful to compile dependencies, and to “hide” them from the Compiler page. It is necessary to hit the “Compile” button once for these imports to be compiled.
Allows you to define the path to your cache directory. This directory has to be writable (0755). The default cache directory path is wp-content/cache.
Wether or not to display the “Search Variables” filter box. It can come handy if you have a lot of variables. Default is true.
Once registered, you can access any variables with the function sass_get( 'my-variable' );, or override its value (upon what has been set on the Variables page) with sass_set( 'my-variable', 'my-value' ).
It is also possible to use @import directives, as well as any Sass language features, straight from the Compiler page.
It will be compared to the cached version, compiled if changes occurred, and the resulting stylesheet will be enqueued.
Don’t forget to set the main Sass stylesheet handle 'wm-sass' as a dependency (… if it is one).