-
Notifications
You must be signed in to change notification settings - Fork 25
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
Multiple Theme #223
Comments
@dvdcut it is going to he hell of job to do all css. first you need to take out all css code from exiting css files, and then save it in one file to call it default theme, and then each theme would have its of css file. i dont know any other way of doing this may be your or someone else have better idea, but i dont mind having option to alternate theme. |
How about creating another folder called "themes" witch would contain sub-folders with the css files? The folders tree would look like "/themes/theme_name/css/". A php script could copy (overwrite) the css folder into the destination folder. Every theme path first gets inserted into database and $src gets value from there. The GUI would have a dropdownlist with all the themes.
|
And maybe add this to the php code so there wouldn't be problems with browser cache
|
creating folder is the right way to do this, but i think copying css file for selected theme doesn't sound right, what all these theme sellers do? there must be better way doing this. |
I believe that multiple theme changing modes exist, but they must be implemented. I believe that overwiting files is the simplest way to go, rather than changing the base theme(file paths) in order to add more themes. |
i was googling around and here is one from stackoverflow if we have css only we can simply use following code can do:
|
i think first extracting css from exiting css is the way to start this, once we have that anyone can have their own style and we can start modifying or each one can modify the theme as you please and if you want to include in PiHome you are welcome. |
@sandreialexandru you want to to work with me on this one? we can work on this to extract all the css code from all css files, what you say? |
Please let me try something this weekend. I have an idea about how I can merge css files. |
Searched for all the css files that are used for GUI and only 2 files need to be modified index.php and header.php . I'm sorry that i cannot test this right now, as i am not home and i haven't got a RaspberryPI nearby. |
@sandreialexandru |
I guess it is not as simple as i thought or maybe i have missed something. I'll keep working on this, maybe with the help of @dvdcut . |
There has to some sort of simple solution for this.
… On 9 May 2020, at 17:56, sandreialexandru ***@***.***> wrote:
I guess it is not as simple as i thought or maybe i have missed something. I'll keep working on this, maybe with the help of @dvdcut .
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@sandreialexandru i m in, let me know what you want me to do, |
I'm guessing that I might have missed something while merging the *.css files found in css folder and sub-folders. Maybe it needs to be re-merged. |
my plan was to extract css code line by line, i know it wasn't easy but i dont say any other way,
We should focust on following:
|
what do you think of these two? |
following two would be more important some items in bootstrap.min.css gets overwritten in sb-admin-2.css. may be there is way automatically combine this but so far i can not see anything and google failed to bring anything useful. may be it is manual work.
|
@dvdcut tools look good, but they are used to minify the resulted css file. |
@sandreialexandru lets start extracting code item by item, i know it is not going to be simple task. |
this is more difficult then i thought, but even after extracting all css we still need to somehow manage switch between theme, for example if you have Homebridge installed and you can switch between theme right there and i think it is done through ajax. i m going to extract css in next few days and i'll share what i have don, may be someone with better knowledge of ajax can help us on this. |
here is extracted file, but I also realise most of the custom code is in sb-admin-2.css, and we don't need to extract everything, may be few parts need to be brought in from bootstrap.min.css. |
Yes, I can. I will test your version and give you my feedback. I have been working on an "extraction" myself. |
@dvdcut I'm sorry but your version does not work I'm trying to browse through the site and use the "inspector" to select all the used css code, but it is a lot to do. I have to be careful at repeating elements. |
i left all the other css in place and added mine at the end. |
@sandreialexandru i did the same thing, but i also noticed that most of the customization is in sb-admin-2.css |
@sandreialexandru, did you made any progress? do you need any hlep? |
I've managed to get to the point where I cannot merge boostrap.min.css. I have done some testing and untill now, it is working with only two css files (excluding fonts and icons css). The web interface is a bit faster and I did not find any broken elements. Please help with some testing. Replace bootstrap.min.css and copy pihome_css.css into /var/www/css
with
|
@sandreialexandru |
@sandreialexandru i tested your css files and i have no issues so far, now its time to customize some items to see how easy it would be. |
i can confirm your css.zip file is working great, |
can we make this official update then? |
i been thinking about Multiple Theme long time, can we have option to have multiple theme? i think it will only need css modification, anyone else thinking about this? or i have lost my mind :D
The text was updated successfully, but these errors were encountered: