Coder Social home page Coder Social logo

craft-cpcss's People

Contributors

khalwat avatar lindseydiloreto avatar mmikkel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

craft-cpcss's Issues

Per member group

First off, thanks for writing the Control Panel CSS plugin. One thing I thought of was that it would be cool if you could define custom CSS on a per member group basis. Not sure what's involved technically with this but would be awesome for a number of things.

Inject Twig Code into CSS

Hi there

  1. Just wanted to ask if it's somehow possible to inject some twig code into the CSS (file)?
    • Reason: I want to conditionally hide elements based on .env/config variables.
  2. Is it possible to set the CSS File(s) path in the config file? This would be very helpful if you are working with a version system like Git.

Thanks for your help :)

Link to external file?

This is a sweet plugin! It would be cool if there was an option to link to an external override.css file, instead of writing everything in the CP. Otherwise, it works exactly as expected.

Cheers!

FR - Multiple CSS files

Hello Lindsey :)

Any chance to add support to edit more than 1 css files.

Table for settings will do whats needed

Feature Request: Allow twig code in cssFile settings

I am using Vite to compile my css, and the output is name.xxxxx.css

By allowing Twig in the field, I could use Andrew's Vite plugin and enter {{ craft.vite.entry('name.css') }} which would grab the correct file path from the manifest.

Invalid CSS causes memory leak and CP becomes inaccessible

So, for funsies, go ahead and place this within the "additional CSS" field...

#details-container {
  flex: 0 0 200px;
  width: 200px;

Doing so will cause the control panel to become completely inaccessible you'll hit your max memory limit pretty fast. Why? I have no idea. The settings are saved in the project config, so some weird parse or escaping issue could be the cause. I'm unsure, but it may be worth doing some sort of syntax checker before save.

To get the control to be unbroken you'll need to go into your projectconfig table in your database, find the row with the plugins.cp-css.settings.additionalCss path, and clear it out to "". Then, you can run the ./craft clear-caches/all.

problem with thumbnail elements

As shown on the screenshot, I have a problem with thumbnail elements in models forms. The label overlaps the element below. I have found that the problem is caused by fixed height of .element class.
movie-title

Failed to install cp-css

Trying to install cp-css from the command line and getting the error "No plugin exists with the handle cp-css"
I have repeated the same steps for cp-js and it works as expected.

composer require doublesecretagency/craft-cpcss
./craft plugin/install cp-css
*** installing cp-css
*** failed to install cp-css: No plugin exists with the handle "cp-css".


composer require doublesecretagency/craft-cpjs
./craft plugin/install cp-js
*** installing cp-js
*** installed cp-js successfully (time: 0.034s)

CraftCMS: 3.5.13.2
PHP 7.4
Ubuntu: 20.04

can not install plugin

how do I install the plugin?
Do I rename the folder?
I can not see the plugin in my settings

URL vs path & CP warning

CP CSS is installed in a site I've taken over, where the setting for CSS file contains:

@web/assets/css/cp.css

Using ./craft serve, I get the following:

2021-11-11 21:12:29 [-][1765][-][warning][application] Can't bust cache of CP CSS, unable to load contents of http://localhost:8080/assets/css/cp.css

I can fix that by setting 'cacheBusting' => false. The file exists, and if I disable cache busting, I can see it applied in the control panel. But I can't use the control panel because every screen takes 2 minutes to try to load that.

I'm guessing this is because the built-in PHP server is single-threaded, and it times out waiting for file_get_contents to respond.

Isn't _addHash just adding a querystring param? Does the file actually need to be loaded from its URL?

Using a Twig template/front-end URL for a CSS File

Potentially related to #16, but I can't seem to get the path to a front-end URL or template working when listed in the CSS File(s) field.

I currently have a custom plugin generating CSS custom variables, and using variables to output them to the main wrapper. I've moved this its own template which loads successfully and outputs the processed Twig variables, but this content is not included in the CP CSS.

CSS File(s) field value:

@web/styleGuide,@web/dist/css/redactor.css

The redactor.css file is working properly, but the /styleGuide content is not being included. Any ideas?

External CSS Not parsing siteUrl

For some reason the path to the external css file is not parsing {siteUrl}, but treating it as a string literal. {siteUrl} works in other parts of the CMS, so it's definitely not a site-wide setting. Any thoughts why this might not be working?

Support hashes in linked file

I use a hash in my css file name that changes when the content of the file has changed. It's a part of my building process to bust caches.

I'd be thankful if I could see a support of such hashes in the linked file setting. So, I'll be able to use something like cp.*.css where * could be anything.

Plugin causes very slow CP load times

Hi Lindsey,

First, thanks for sharing this plugin, it's been easy to use for adding styles to the redactor formatting menu. Unfortunately, I have been having issues developing this site locally because the CP takes forever to load (5+ sec.) and I wasn't sure what the issue was until today as I started disabling plugins. I put together a short video [removed] to demonstrate what's going on. Essentially loading an external style sheet with a environment variable {baseUrl} causes the slowest load times. If I move the styles into the database this speeds things up, but is still not desirable.

Plugin Page 404

Hello, all of a sudden the CP CSS page is showing a 404.

I've removed the plugin and re-installed with no joy..

Screenshot 2023-03-23 at 16 45 42

Screenshot 2023-03-23 at 16 48 43

Craft: 3.7.65.2
CP CSS: 2.4.0

Thanks

Craft 3 or 2?

How do I actually install this? Unzipped and put in Craft 2 plugins folder and nothing shows up.

Installation failed on Craft 3.7.43

`Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for doublesecretagency/craft-cpcss ^2.5 -> satisfiable by doublesecretagency/craft-cpcss[2.5.0].
- doublesecretagency/craft-cpcss 2.5.0 requires craftcms/cms ^4.0.0-beta -> satisfiable by craftcms/cms[4.0.0, 4.0.0-RC1, 4.0.0-RC2, 4.0.0-RC3, 4.0.0-beta.1, 4.0.0-beta.2, 4.0.0-beta.3, 4.0.0-beta.4, 4.0.0.1, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.0.5.1, 4.0.5.2, 4.0.6, 4.1.0, 4.1.0.1, 4.1.0.2, 4.1.1, 4.1.2, 4.1.3, 4.1.4, 4.1.x-dev, 4.2.x-dev] but these conflict with your requirements or minimum-stability.

Installation failed, reverting ./composer.json to its original content.`

According to https://plugins.craftcms.com/cp-css it should be compatible with Craft 3 as well though...

Redirect to same route on Save?

I'm spoiled by CSS preprocessors, would it be possible, if on save, there was an option to redirect you back to the editor screen. It would make debugging small header changes incredibly easy!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.