openSUSE / chameleon

openSUSE Design System for Web
https://static.opensuse.org/chameleon/
GNU General Public License v3.0
13 stars 10 forks source link

can't use chamelon theme in own app #14

Closed lnussel closed 4 years ago

lnussel commented 4 years ago

I've written a small app using jquery and bootstrap and wanted to switch to openSUSE's theme. However, including chameleon doesn't work:

Looking at https://bootswatch.com/ it seems it's possible to have a bootstrap theme with only a css. Would it be possible to have a variant of chameleon that only replaces the css? Ie to only get the colors and styling but not extra controls?

guoyunhe commented 4 years ago

Hi, so the issue is related to Cookies/localStorage/CrossStorage. I think I can simply add a flag to disable all these things. All these storage accesses are actually for only one feature: the dark/light mode switching. If we disable the switch, the issue can also be fixed.

guoyunhe commented 4 years ago

I removed all cookies/localStorage/CrossStorage related code. Should be okay now. (need to wait 1 hour so static.opensuse.org pulls the latest code)

lnussel commented 4 years ago

Works better now, thanks! I still get this though:

Do I actually need the js btw or is the css enough?

guoyunhe commented 4 years ago

I think your app configuration doesn't allow any external resources. So even CSS linking is blocked.

So I suggest to not use static.opensuse.org . Just download the repo, copy things ender dist folder into your app. Link chameleon.css and chameleon-no-bootstrap.js from there.

lnussel commented 4 years ago

ic. closing then. Thanks!