wintercms / wn-tailwindui-plugin Goto Github PK
View Code? Open in Web Editor NEWProvides the TailwindUI-based modern backend skin for the Winter CMS backend
License: MIT License
Provides the TailwindUI-based modern backend skin for the Winter CMS backend
License: MIT License
When opening the CMS menu with the arrow, if a sub-menu items is clicked (e.g. Content), the Pages sub-menu is opened instead.
Subsequent clicks on sub-menu items work as expected.
The #20 PR introduces a display bug for me.
The sidenav layout overflow the content layout :
@joseph-sm can you test it with the default WinterCMS logo?
wn-tailwindui-plugin/skins/tailwindui/layouts/_menu-top.php
Lines 13 to 17 in cceeac9
I find the bar not contrasting enough in the overall interface.
I would prefer even a light color:
For it to be visible, a relative position and z-index must be added to the .layout-topmenu
element.
Also I would have chosen a wider shadow (shadow-md
).
I would be pleased to hear your thoughts on this.
I don't think the colors generated are the best.
wn-tailwindui-plugin/skins/tailwindui/layouts/_branding.php
Lines 11 to 19 in c757d8f
According to comments in phpColors.php, amout must be an integer.
https://github.com/mexitek/phpColors/blob/e10e44f67632096072237ff0822674a442d4bb50/src/Mexitek/PHPColors/Color.php#L401-L408
But if the base color is already dark (or light), it results in the generation of black (or white) past a certain percentage when using integer.
$color = new Color($colorString);
return [
'dark' => $color->darken(20),
'darker' => $color->darken(30),
'darkest' => $color->darken(40),
'light' => $color->lighten(25),
'lighter' => $color->lighten(30),
'lightest' => $color->lighten(35),
];
This is because the phpColors library calculates the percentage to be added based on 100% of the channel but not on the remaining percentage to reach the 0% (darker) or 100% (lighter).
$hsl['L'] = ($hsl['L'] * 100) - $amount;
So I've slightly modified the shade generation to caclulate a percentage of luminance :
$color = new Color($colorString);
$luminance = $color->getHsl()['L'] * 100;
return [
'dark' => $color->darken($luminance * 0.20),
'darker' => $color->darken($luminance * 0.30),
'darkest' => $color->darken($luminance * 0.40),
'light' => $color->lighten($luminance * 0.25),
'lighter' => $color->lighten($luminance * 0.30),
'lightest' => $color->lighten($luminance * 0.35),
];
And I think it give better results :
Maybe the amounts should be finely tuned.
Or equally spaced in the channel:
$color = new Color($colorString);
$luminance = $color->getHsl()['L'] * 100;
return [
'dark' => $color->darken(($luminance / 4) * 1),
'darker' => $color->darken(($luminance / 4) * 2),
'darkest' => $color->darken(($luminance / 4) * 3),
'light' => $color->lighten((100 - $luminance) / 4 * 1),
'lighter' => $color->lighten((100 - $luminance) / 4 * 2),
'lightest' => $color->lighten((100 - $luminance) / 4 * 3),
];
When using TailwindUI the snippets column doesn't display any of the snippets with codes assigned in the CMS partials. When disabling this plugin and using the default backend, these snippets appear again.
Excuse me, the builder plugin cannot be used for this skin
1.2.1
8.1.13
sqlite / any
wn-tailwindui-plugin
Installing this plugin removes
/modules/system/assets/js/build/system.debug.js
/modules/backend/assets/ui/js/build/manifest.js
/modules/backend/assets/ui/js/build/vendor.js
This prevents $.request
as CSRF header is not added to AJAX requests.
composer create-project wintercms/winter
At this point, the files are intact.
composer require winter/wn-tailwindui-plugin
Now the files are missing.
Login to backend check network requests
Download the above files from the main repository or use composer require winter/wn-tailwindui-plugin:dev-main#ed9af5c
which was the last commit before the changes.
The color-mod function requires the --primary & --secondary CSS vars to be present during compile time which fails under the current configuration rendering any color-mod defined colours unavailable at the moment.
A couple of different options are available:
@joseph-sm @jaxwilko thoughts?
As Tailwind unstyled headings (see: Headings are unstyled ), it make a significant difference between standard and tailwind backend UIs.
Wouldn't it be possible to add some substance to the titles, or the plugin devs have to add their owns styles ?
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.