Download the PHP package martyfriedel/les-mills-class-types without Composer
On this page you can find all versions of the php package martyfriedel/les-mills-class-types. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download martyfriedel/les-mills-class-types
More information about martyfriedel/les-mills-class-types
Files in martyfriedel/les-mills-class-types
Package les-mills-class-types
Short Description A custom button for Bard in Statamic 4 to allow a span with a class to be added to selected text. In this instance, Les Mills group fitness class types.
License MIT
Informations about the package les-mills-class-types
Bard add-on for Statamic 4 for adding a span and class to selected content
This is an example Bard addon for Statamic 4 that adds a span with a class to selected content. In this example, you can select from a number of Les Mills group fitness classes.
This addon has been updated for Statamic 4. It will no longer work on Statamic 3.x. However, you can use 1.x for Statamic 3.
While this has a personal purpose for my own use, it also shows a simple working example of how to wrap selected content with an element, and add a class. Something that does have many use cases beyond something as trivial as this example.
Personally, I'll use this package as is... but for others, it is a simple and working example of how to write your own addon for Bard in Statamic 4.
Installation
Install it via the composer command
In your Bard editor instances (note, not the configuration view), you'll see the new button added.
Select some text, click the new icon, and select a class type, and voilà!
Output
When output, the markup will be a span with a class attached.
Use on the front end
Styles have been included for a handful of programs (the ones I teach, funnily enough), and will style the selected text within the Statamic administration area.
You will need to add classes to your front end stylesheets to see them come through there too.
Essentially it will add a generic class les-mills-class
followed by the program name - so this way you can target
all class types, and then tweak per program.
A finished class might be les-mills-class bodyattack
for example.
Your CSS for your frontend can then target that specific class.
License
This addon is licensed under the MIT license.
Les Mils
Les Mills are an awesome company based on New Zealand, who make the best group fitness classes in the world, including BODYPUMP - I've been trained in 5 of their programs, and teaching Les Mills group fitness classes for over 14 years. Their "L" letter has been used for the button for this plugin purely for demonstration purposes.