DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:ideas:templatestyler

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Both sides next revision
devel:ideas:templatestyler [2015-04-04 20:59]
ach
devel:ideas:templatestyler [2015-08-11 12:00] (current)
ach added note about finished implementation
Line 1: Line 1:
 ====== Template Styler ====== ====== Template Styler ======
 +
 +:!: This has now been implemented as the [[plugin:Styling]] plugin and integrated into the core since Detritus.
  
 Most DokuWiki [[:templates]] contain a ''[[devel:style.ini]]'' file which lets you customise various aspects of each template (main colours, layout width, font sizes, etc). There is currently no user-friendly way to do that as you would need to update that file manually on the file system level. Most DokuWiki [[:templates]] contain a ''[[devel:style.ini]]'' file which lets you customise various aspects of each template (main colours, layout width, font sizes, etc). There is currently no user-friendly way to do that as you would need to update that file manually on the file system level.
Line 55: Line 57:
  
 If we edit some styles through a program interface, then it might be inconvenient to deal with manually edited files like ''userstyle.css'' or ''userstyle.<theme>.css'', because that might need full-fledged parser. While for style files edited only through UI we could just use some hard-coded format, without variations. So probably if I want to create a multi-skinned template, I would just use stylesheet files of a proper format and list/remove them in the ''[stylesheets]'' section. --- [[user>sancaya|Constant Illumination]] //2015-04-04 20:12// If we edit some styles through a program interface, then it might be inconvenient to deal with manually edited files like ''userstyle.css'' or ''userstyle.<theme>.css'', because that might need full-fledged parser. While for style files edited only through UI we could just use some hard-coded format, without variations. So probably if I want to create a multi-skinned template, I would just use stylesheet files of a proper format and list/remove them in the ''[stylesheets]'' section. --- [[user>sancaya|Constant Illumination]] //2015-04-04 20:12//
 +
 +==== Template editing on-screen ====
 +
 +In order to edit template and see how it would change, we might do this:
 +  * Plugin adds an element to a page (like [[plugin:loadskin]] does) to open style editing. So a user could edit template styles from any DokuWiki page.
 +  * See picture: [[https://forum.dokuwiki.org/thread/12449]]. This element (#1) would toggle an ovelapping div (#2) over the page. So a user could use control elements to edit styles, not interfering with a page content.
 +  * Clicking "save" there we can send an action request through AJAX, like <code>
 +jQuery.ajax({
 +    type: 'POST',
 +    url: '?do=style',
 +    data: action,
 +}); </code>
 +  * Plugin would take data from this request, for example like ''?do=style&__background_site__=#F3F1E5'' and process, updating conf/tpl/<...>/style.ini etc.
 +  * Javascript rebuilds the page styles according to received data.
 +What do you think? --- [[user>sancaya|Constant Illumination]] //2015-04-06 03:54//
  
devel/ideas/templatestyler.1428173983.txt.gz ยท Last modified: 2015-04-04 20:59 by ach