[Owncloud] Theming and Formfactors

Frank Karlitschek frank at owncloud.org
Wed Feb 1 15:47:12 UTC 2012


On 01.02.2012, at 16:34, Tom Needham wrote:

>> The idea is to support theming in ownCloud to make this kind of changes easiert.
> 
> This would be very handy :)
> 
>> Formfactors:
>> All parts of the core and every app has a template, a js and a css folder. We could extend the templating and the js/css loader that it first looks for a foo-mobile.php template if the app wants to load the foo.php template and the current formfactor is "mobile". If it finds the file it loads it. If not if falls back to the default foo.php. The same logic for the js and css files.
>> By doing this we don´t have to implement the complete interface right now for all formfactors. We can do this over time. And if one App developer want´s to provide a special tablet optimized css he just add an additional css with this special name and it´s automatically used.
> 
> I was thinking along similar lines too. Are we still looking to use jQuery mobile for the mobile framework?

sure. jQuery mobile is the best choice at the moment. But at the end of the day it´s the decision of the app developer. We only provide a functionality to load css,js files and templates.


>> Theming:
>> I propose a similar system for the theming. We add a "theme" config option to the config.php so that the theme can be configured during deployment and controlled from the outside without the need to understand our database structure.
>> We add "themes" directory into /core where every theme has a directory named after the theme name.
>> The template and css loader looks into the selected theme directory first for templates and css files and loads them if a file is present. If not it just falls back to the default files in the individual app directories. This has the benefit that the person who creates the themes can override what ever has to be changed but don´t have to provide a complete new frontend.
>> The directory structure inside the themes folder is the same as the rest of owncloud. This means that a theme developer can just put a different "apps/contacts/css/styles.css" in the theme directory to change the style of the contacts app.
> 
> Sounds good. Where should we store / develop themes? Something similar to app.owncloud.com would be cool, but maybe just a git repo would do for now.

I think for the first step it´s enough to provide a git repository for themes. If we have a lot of high quality themes in the future we should make it easy for users to load them. But let´s see.



> Also should we have a similar interface to 'Apps' in the admin where users can select the theme and/or upload new ones?
> 
> Tom
> 
> Tom Needham
> tom at owncloud.com
> 
> 
> 
> _______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud




More information about the Owncloud mailing list