flyntwp / flynt-core Goto Github PK
View Code? Open in Web Editor NEWThe core building block of the Flynt Framework.
License: MIT License
The core building block of the Flynt Framework.
License: MIT License
Since TWIG is just a templating language for files, not just HTML files, is a good practice to append the file type extension to file name so code editors can guess and configure themselves accordingly.
I just wanted to know your point of view regarding this.
I figured out that installing this package via Composer without using a registered SSH key will not work and you'll need to enter a Github Auth Token which can't be done in a lot of terminal emulators because copy/paste is disabled.
Maybe it's just better to use HTTPS so you don't need a Github account to use this.
Currently it wants to install from [email protected]:bleech/wp-starter-plugin.git
As far as I can see from the code, Flynt is currently not capable of having nested/grouped components. This can get confusing for bigger projects, especially if you want to create a set of shared components (which seems also not possible currently).
For shared components we currently using this workaround to register a twig namespace and reference it in a sibling template. How do you at bleech realise shared components currently? E.g. have a teaser article shown in a grid and in a listing.
add_filter('timber/loader/loader', function($loader) {
$loader->addPath(Feature::getOption('flynt-components', 0), 'Component');
return $loader;
});
{{ include '@Component/BlockButton/index.twig' }}
To have it more structured we thought it would be helpful to have a grouped folder structure like this:
Components
Block
Button
Image
List
Posts
Users
Then add the parent folders as namespaces:
add_filter('timber/loader/loader', function($loader) {
$loader->addPath(Feature::getOption('flynt-components', 0) . '/Block', 'Block');
$loader->addPath(Feature::getOption('flynt-components', 0) . '/List', 'List');
// etc…
return $loader;
});
To reference it like this in the twig templates:
{{ include '@Block/Button/index.twig' }}
Did you thought about this already? If so, why did you chose the current way? Before start working on a POC I thought asking for your thoughts first 🙏
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.