Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Remote Stylesheet #13

Open
TRexStark opened this issue Dec 1, 2021 · 1 comment
Open

Allow Remote Stylesheet #13

TRexStark opened this issue Dec 1, 2021 · 1 comment

Comments

@TRexStark
Copy link

Hi Harvey

First, thank you for such an awesome package.

Is there a way to modify the script to allow for the stylesheet added to be remote (.i.e from a CDN)?

Thanks

@harvzor
Copy link
Owner

harvzor commented Dec 1, 2021

@TRexStark The script looks a bit like it would work with a remote stylesheet but I guess it's not since you're making this issue.

I haven't been working with Umbraco for a few years now so I'm a bit out of the loop and don't plan to update this package.

Feel free to fork the package, or if you want a quick fix, you can change the iconator.controller.js file in your project.

The cssPath variable is what you're interested in: https://github.com/Harvzor/iconator/blob/88b0a8e2fa0ce94016ff0b99d7d26437b1a25af0/content/App_Plugins/Iconator/iconator.controller.js#L33

My guess is that the assetsService (from Umbraco) probably doesn't support remote resources: https://github.com/Harvzor/iconator/blob/88b0a8e2fa0ce94016ff0b99d7d26437b1a25af0/content/App_Plugins/Iconator/iconator.controller.js#L94

Likely the CSS can be injected into the <head>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants